Message-ID: <1892617971.2431.1432371278964.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2430_2132519022.1432371278964" ------=_Part_2430_2132519022.1432371278964 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
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 Ja= va code coverage tool, developed by the authors of EclEmma). For more = information, see: Comp= arison of Emma, Clover, Cobertura and JaCoCo.
SonarQube Java Plugin
||1.2= td>||1.3= td>||1.4= td>||1.5= td>||2.0= td>||2.1= td>||
Reports generated with JaCoCo
To launch JaCoCo as part of your Maven build, use this command:
For more on JaCoCo, see its documentation.= p>
If your project uses the
argLine property to conf=
igure the surefire-maven-plugin, be sure that
p;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: =
By default, when no coverage report is found, the JaCoCo plugin will not= set any value for coverage metric. This behaviour can be overriden to forc= e coverage to 0% in case of a lack of report by setting the following prope= rty :
Using some unit test listeners you can collect the information on which = lines where covered by which tests and display them in SonarQube. See  = ;the pom.xml of the sample project to = configure this and see the Componen= t Viewer documentation to display this information in SonarQube.= p>