Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

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.

See Code Coverage by Unit Tests for Java Project tutorial.

Known Issue

If your project is using the argLine property to configure the surefire-maven-plugin please be sure to define this as a property and not directly via the plugin configuration to let JaCoCo set its agent properly.

For example, such a configuration :

will generate a crash of JVM on tests when running the goal  org.jacoco:jacoco-maven-plugin:prepare-agent  To avoid this it should be defined as : 

In order to let JaCoCo set up its agent properly. 


  • No labels