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 Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

91 views 0 1
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