This documentation is for Clover 3.2.x View the latest version of

Unknown macro: {spacejump}

or visit the current Clover documentation home page.

Clover provides a set of Command line tools for integration with legacy build systems such as Make, or custom build scripts. If you use Jakarta Ant to build your project, a set of Clover Ant Tasks provides easier Ant integration.

To use the tools in your build system, the synopsis is:

  1. Copy and instrument your source files using CloverInstr.
  2. Compile the instrumented source files using a standard java compiler.
  3. Execute your tests using whatever framework.
  4. (Optional) If you have multiple separate coverage databases, merge them using CloverMerge.
  5. Use either the XMLReporter, HtmlReporter , PDFReporter or ConsoleReporter to view the measured coverage results.

Command line tools:

CloverInstr

Copies and instruments individual java source files, or a directory of source files.

CloverMerge

Merges existing Clover databases to allow for combined reports to be generated.

XMLReporter

Produces coverage reports in XML.

HtmlReporter

Produces coverage reports in HTML.

PDFReporter

Produces coverage reports in PDF format.

ConsoleReporter

Reports coverage results to the console.

Troubleshooting

Troubleshooting License Problems

When running Clover Command Line Tools you may come across the following error:

ERROR: No license file found.
Exception in thread "main" java.lang.RuntimeException: Invalid or missing License.. Please visit http://my.atlassian.com to obtain a valid license.
at com.cenqua.clover.CloverStartup.loadLicense(CloverStartup.java:58)
at com.cenqua.clover.CloverStartup.loadLicense(CloverStartup.java:25)

Please ensure that your clover.license file is in the same directory as the clover.jar file, or use the clover.license.path parameter when running Clover Command Line Tools. For example:

java -Dclover.license.path=/path/to/clover.license -cp /path/to/clover.jar com.cenqua.clover.CloverInstr ...
  • No labels