Description / Feature
This plugin is included in the Java Ecosystem.
It provides the ability to feed SonarQube with code coverage data coming from JaCoCo (an open source and robust Java code coverage tool, developed by the authors of EclEmma). For more information, see: Comparison of Emma, Clover, Cobertura and JaCoCo.
SonarQube Java Plugin
Reports generated with JaCoCo
To launch JaCoCo as part of your Maven build, use this command:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
For more on JaCoCo, see its documentation.
You may also find the README.md of the sample project helpful.
If your project uses the
argLine property to configure the surefire-maven-plugin, be sure that
argLine defined as a
property, rather than as part of the plugin configuration. Doing so will allow JaCoCo to set its agent properly. Otherwise the JVM may crash while tests are running.
argLine should be defined this way: