Clover 2.1 Documentation
Installing the Clover Ant Tasks
Clover provides a set of Ant tasks to make project integration easy. To make these tasks available in your project build file, you need to:
load the 'cloverlib.xml ' antlib by adding the following line to your build file:
<taskdef resource="cloverlib.xml" classpath="/path/to/clover.jar" />
Make sure you change the above "/path/to/clover.jar " to point directly to your clover.jar.
For further options, see also Ant Installation Options .
The tasks
<clover-setup >
Installs Clover as the Ant build.compiler . This means that Clover will be invoked whenever the Ant <javac> is used, resulting in instrumented compilation.
<clover-report >
Produces coverage reports in different formats.
<clover-html-report >
Generates a HTML report with default settings.
<clover-pdf-report >
Generates a PDF report with default settings.
<clover-historypoint >
Records a coverage history point for use in historical coverage reports.
<clover-merge >
Merges several Clover databases into one, to allow for combined reports to be generated.
<clover-check >
Tests project/package code coverage against criteria, optionally failing the build if the criteria are not met.
<clover-log >
Reports coverage results to the console at various levels.
<clover-instr >
Allows manual instrumentation of source files, for cases where the normal <clover-setup > integration approach can't be used.
<clover-clean >
Deletes the coverage database and/or associated coverage records.
<clover-env >
This task should be used for troubleshooting and debugging Clover installation problems only. It outputs Clover version and classpath information.