Clover doesn't generate single clover.db

I have following configuration in my pom.xml, I am still seeing that a multiple clover.db files are getting generated in each modules target folder. Am I missing something?






1 answer

0 vote

As per

If true, then a single cloverDatabase will be used for the entire project. This flag will be ignored if a custom cloverDatabase location is specified.


You have the following options:

1) Keep the <singleCloverDatabase>true</singleCloverDatabase> and remove the <cloverDatabase> tag. Database will be written to the /target/clover folder inside the last Maven module compiled.


2) Remove the <singleCloverDatabase> tag and keep the <cloverDatabase> tag with an absolute path declared in it. When instrumenting subsequent modules, Clover will update the same database file as the path is absolute. However, this may have a performance impact if you have have many modules (like few hundreds) and a lot of unit tests (like one thousand or more). This is because a number of coverage recording files created on disk will be roughly equal to: number of clover.db updates * number of tests.

3) Remove the <singleCloverDatabase> and the <cloverDatabase> tags. Instead of this, declare the <mergedCloverDatabase> and call clover2:aggregate at the end of the build (typically after a testing phase), but before report generation. For instance:

mvn clean clover2:setup test clover2:aggregate clover2:clover

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,197 views 6 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot