Clover-for-Maven 2 and 3 User's Guide
The Maven 2 and 3 Clover plugin produces Clover reports from Maven 2 and 3 projects.
Maven Site Documentation
For documentation presented in the standard Maven format, see the Maven Site Docs.
On this page:
Basic Usage
How to quickly set up basic Clover configuration in settings.xml and pom.xml and run Clover's goals from a command line.
Configuring instrumentation
How to set which source files shall be instrumented, control level of instrumentation, set JDK level and location of coverage data.
Configuring reports
How to choose report formats, generate historical reports and customize report content.
Configuring a coverage goal
How to set a coverage level as a quality gate and fail a build if it drops below certain threshold or drops compared to a previous build.
Using Test Optimization
Test Optimization saves valuable time in the build and test cycle, by only running tests that cover code which has changed since the last build.
Working with distributed systems
- Using Distributed Per-test Coverage
- Using Clover in various environment configurations
- Using Clover for web applications
Working with multi-module projects
You can use the clover:aggregate goal to combine the Clover databases of child projects into a single database at the parent project level.
You can also create a single database for all modules with singleCloverDatabase parameter set to true in clover:setup goal.
Because of this Maven bug, aggregation of databases occurs before the child databases have been generated, when you use the site
target.
You can create Clover reports for a multi-module project with the command line mvn clover:setup test clover:aggregate clover:clover
.
べスト プラクティス
Using Clover with other Maven plug-ins
- Compiling Groovy with GMaven plugin
- Compiling Groovy with Groovy Eclipse Plugin
- Using Clover via the maven-antrun-plugin
- Using with Surefire and Failsafe Plugins
- Using Clover with the GWT-maven plugin
- Using Clover with JAXB plugin
- Using Clover with the maven-bundle-plugin
- Using Clover with Maven Tycho Plugin