Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

After changing setting cloverDatabase, clover2:aggregate fails

I'm using the maven clover2 pluging, version 3.0.5, and I'm having issues invoking clover2:aggregate. If I do chagne the name/locatio of the clover database, I'm successfull in executing clover2:aggregate. The minute I change it to something other than the default, I get "No Clover databases found in children projects - No merge done"

Is there a bug in the aggregate goal if you change the location or name of the database file?

Thanks

3 answers

0 votes

"No Clover databases found in children projects - No merge done"

This message typically occurs when you have clover2:aggregate goal defined in pom.xml. For example a following definition is incorrect for multi-module projects:

<plugin>
  <groupId>com.atlassian.maven.plugins</groupId>
  <artifactId>maven-clover2-plugin</artifactId>
  <executions>
    <execution>
      <phase>verify</phase>
      <goals>
         <goal>instrument</goal>
         <goal>aggregate</goal>
         <goal>clover</goal>
      </goals>
    </execution>
  </executions>
</plugin>

mvn verify

Instead of this you should call aggregate goal in mvn commandline, for example this is correct:

mvn clean clover2:setup verify clover2:aggregate clover2:clover

Background reason:

Maven starts building projects from top-level module, going through all phases, next it starts to build sub-modules (again going through all phases) one after another. As a result, when you have clover2:aggregate bound in top-level pom.xml to some build phase (like 'verify' in my example), Maven will come to aggregate goal in top-level module and fail, because sub-modules were not built yet and there are no databases availalble.

In case when you declare phases/goals in command line, Maven will execute first declared phase (for example, building all modules), next execute second phase etc... So in my correct example it will: clean all modules, setup Clover, build and test all modules, aggregate results, generate report.

Regards
Marek

Hi,

Thanks for your answer. How do I include the aggregated report in the site then?

Tom

Adding site to the end of the command did the trick:

mvn clean clover2:setup verify clover2:aggregate clover2:clover site

Thanks,
Tom

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

163 views 2 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you