Maven Plug-in
The JaCoCo Maven plug-in provides the JaCoCo runtime agent to your tests and allows basic report creation.
If you want to have line number information included in the coverage reports or you want source code highlighting the class files of the test target must be compiled with debug information.
Prerequisites
The JaCoCo Maven plug-in require
- Maven 2.1.0 or higher and
- Java 1.5 or higher (for both, the Maven runtime and the test executor).
Usage
The Maven plug-in can be included in your build with the following declaration:
<plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>@project.version@</version> </plugin>
To receive a full list of goals and available parameters you can use maven-help-plugin:
mvn help:describe -Dplugin=org.jacoco:jacoco-maven-plugin -Ddetail