This plugin is not supported by Atlassian.
Download the following binaries:
- Clover JAR (the com.atlassian.clover:clover Maven artifact)
- Clover AspectJ Compiler JAR (the com.atlassian.clover:clover-aspectj-compiler Maven artifact)
- AspectJ Runtime JAR (the org.aspectj:aspectjrt Maven artifact)
- AspectJ Tools JAR (the org.aspectj:aspectjrtools Maven artifact)
This integration was tested against: Clover 4.1.1 + Clover AspectJ Compiler 0.8.0 + AspectJ 1.8.9.
Find your Clover license key or request an evaluation key on the my.atlassian.com page.
Compile the code with Clover
Clover AspectJ Compiler (CloverAJC) is a wrapper over the AspectJ Compiler (AJC) command line tool. You can pass any standard ajc parameters as well as additional options exclusive for Clover, such as:
- --initstring <path/to/clover.db> - location of the Clover database (default is ".clover/clover.db")
- --instrlevel (method/statement) - detail level of instrumentation (default is "statement")
- --encoding <charset> - character encoding used (uses a system encoding by default)
To run the CloverAJC:
- declare Clover, Clover AspectJ Compiler and AspectJ on the class path
- ensure that Clover license key will be found - you can just add -Dclover.license.path=/path/to/clover.license option
- run com.atlassian.clover.instr.aspectj.CloverAjc class
- pass any options required by ajc - typically a list of files to be compiled and output directory
- optionally pass Clover-related options
Run the code
Run the code as usual. Just ensure that Clover JAR is present in the class path.
While running the code, Clover will write coverage recording files to the folder where Clover database was created during compilation.
Generate coverage reports
You can use any Clover integration to generate reports (Ant, Maven etc). One of the easiest ways is to use the HtmlReporter command line tool, for example:
This plugin is open source. You can clone the Mercurial repository from Bitbucket, e.g:
Feel free to contribute!
In the src/test/resources folder you will find a sample project with an Ant build.xml script.
This plugin has been created during Atlassian ShipIt days. Atlassian does not provide technical support for this plugin.
You can ask questions on our community forum - answers.atlassian.com.
You can report bugs and feature requests (hoping that some good soul will fix it) in the issue tracker on Bitbucket.