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

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted 7 hours ago in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

31 views 1 2
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