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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

OpenClover Check Goal calculates different coverage into Maven multi-module project than Log Edited

Hi all!


I'm facing some issues about how to check the coverage threshold with openclover maven plugin with a multi-module Maven Project.

I execute the tests with:

mvn clover:setup test clover:aggregate clover:clover


Then, i execute the Log goal with

mvn clover:log


After that, i'm trying to check the coverage with:

mvn clover:check -Dmaven.clover.targetPercentage=XX%


The build fails because clover calculates a different value, from parent project, compared to the HTML Report or Log goal


Here is the output:

INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openclover:clover-maven-plugin:4.3.1:check (default-cli) on project example-parent: Build failed to meet Clover coverage targets: The following coverage targets for null were not met:
[ERROR] Total coverage of 53.5% did not meet target of 100%
[ERROR] -> [Help 1]


What am I doing wrong? 

Does Clover check goal require additional steps to work?



1 answer

0 votes

As you use 'clover:aggregate' it suggests that you have multiple modules in your project, am I correct? Maybe what happens is that clover:check is ran on a different clover.db file.

I suggest the following:

  • find all clover.db files generated in your project, including cloverMerge.db
  • run clover:check on all of them (passing cloverMergeDatabase or cloverDatabase options) 
  • check if any of these produce valid results

Note that clover:check searches for both cloverDatabase and cloverMergeDatabase

Note that clover:aggregate runs in the last Maven module being built and writes cloverMerge.db to that location. Which means that probably you may want to add cloverMergeDatabase parameter in your root pom to specify the location.

Suggest an answer

Log in or Sign up to answer
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...

178 views 2 9
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