Override maven.clover.historyDir not working

Radek Antoniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2013

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
Answer accepted
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2013

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
TAGS
AUG Leaders

Atlassian Community Events