Override maven.clover.historyDir not working

I have a historyDir defined in my pom.xml, however I have two bamboo plans doing different things. I would like to use a different history point storages for them. I tried adding -Dmaven.clover.historyDir=/some/other/path to the build command but it doesn't work. Am I missing something?

1 answer

1 accepted

This widget could not be displayed.

Then answer is - yes, it's possible to override setting from pom.xml.

However, the maven.clover.historyDir shall be declared as a property (with some default value) and referred in the "<configuration><historyDir>" tag.

The following code snippet works:

&lt;properties&gt;
  &lt;maven.clover.historyDir&gt;/default/dir&lt;/maven.clover.historyDir&gt;
&lt;/properties&gt;
	
&lt;build&gt;
  &lt;plugins&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;com.atlassian.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-clover2-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.1.11&lt;/version&gt;
      &lt;configuration&gt;
        &lt;historyDir&gt;${maven.clover.historyDir}&lt;/historyDir&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;

TIP: you can use help:effective-pom to see how Maven resolves properties.

mvn help:effective-pom
mvn -Dmaven.clover.historyDir=/another/dir help:effective-pom

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

217 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you