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 votes
Accepted answer

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
Published Monday in Jira Service Desk

Frequently Asked Questions for Jira Service Desk (AKA JSD FAQ)

Just the FAQs! Welcome to the Community, and this Focused-FAQ! Here, we've pulled together some of the most frequently asked questions associated with Jira Service Desk (JSD). We hope ...

137 views 0 11
Read article

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