This is the documentation for Clover 3.3. View this page for the

Unknown macro: {spacejump}

of Clover, or visit the latest Clover documentation.

To get started with Clover-for-Maven 2 and 3, carry out the following steps.

Add com.atlassian.maven.plugins in .m2/settings.xml

Before you get started, add this to your .m2/settings.xml file so you can reference Clover by its short name clover2.

<pluginGroups>
    <pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>

Run Clover goals from a command line

The quickest and easiest way to try Clover is from the command line:

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

Goals:

  • clean - to ensure that all sources will be recompiled (Clover uses source-code instrumentation)
  • clover2:setup - to initialize Clover and instrument sources
  • test - to compile code, run tests and record code coverage
  • clover2:aggregate - to merge coverage data from a multi-module project
  • clover2:clover - to generate HTML report for a project

You can find a report in target/site/clover directory.

Further reading

For more instructions, see the Clover-for-Maven 2 and 3 User's Guide.

For documentation presented in the standard Maven format, see the Maven Site Docs.

  • No labels