Provide a Clover diff between two reports, excluding test classes and showing global TPC contribution diffs for each Maven module with the goal of finding out which modules are negatively contributing to the global TPC
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Maven plugin that we execute in our Clover CI pipeline to verify that we don't lower the global coverage. It's indeed possible that at the module level the coverage stays flat or increases (as measure by Jacoco), while we reduce the global coverage:

  • If some modules with a high coverage are moved to Contrib for example the global TPC will decrease.
  • If a new module with a coverage lower than the global one is introduce, it'll lower the global TPC.
  • If some refactoring are done in a given module and that module was tested by functional tests, and the refactoring causes different code to be exercised, then the global coverage can be reduced.



Make sure the XWiki Maven Repository is added to your Maven settings.xml file so that this plugin can be found.

Configuration inside a pom.xml:


And then mvn clean xwiki-clover:report.

Directly from the command line:

mvn clean xwiki-clover:report \
  -DoldCloverXMLReport=reports/clover-20171222-1835.xml -DoldReportId=20171222-1835 \
  -DnewCloverXMLReport=reports/clover-20181129-1122.xml -DnewReportId=20181129-1122


  • It's possible to pass the reports either as file locations or as URLs.
  • The output directory is configurable with the outputDirectory configuration property in the pom.xml or by using the diffReportOutputDirectory command line system property.