This page contains the installation instructions for Clover-for-Maven 2 and 3.
Install Clover-for-Maven 2 and 3 by adding it to your Maven 2 and 3 build file (pom.xml):Set up your pom.xmlby adding:
pom.xml
Either change ${clover.version} to the current Clover version, or define a property in your pom.xml that sets this value.
Clover ships with a 30 day evaluation license. After 30 days you need a valid Clover license file to run Clover. You can obtain a free 30 day evaluation license or purchase a commercial license at http://my.atlassian.com. You will need to set up your licence, as a <licenseLocation>element in yourpom.xmlconfiguration file.- Now, simply invoke Clover with Maven on the command line. This will instrument your sources, build your project, run your tests and create a Clover coverage database.
You can also have Clover run as part of your build. Learn how.
There are three basic parts executed when recording code coverage with Clover.
- The clover2:setup goal will instrument your Java source files.
- The test phase is Maven 2 and 3's standard command for running a unit test phase.
- The clover2:clover goal generates an HTML, XML, PDF or JSON report.
The command clover2:aggregate goal is used for merging coverage data generated by multi-module projects.
Hence, if you use the following code:
This will create a coverage report, which will be created in this directory:
Clover should now be fully set up for basic operation.
For more license configuration options, see the FAQ pages.
For more instructions, see the Clover-for-Maven 2 and 3 User's Guide.







1 Comment
Hide/Show CommentsAug 11, 2010
Siri Vias Khalsa
How do you find out what the latest version is for Maven 2?