Message-ID: <1904126228.3543.1409605699013.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3542_710659885.1409605699013" ------=_Part_3542_710659885.1409605699013 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>
You may also find the README.md of the sample pro= ject helpful.
If your project uses the
argLine property to configure=
the surefire-maven-plugin, be sure that
argLine defined =
property, rather than as part of the plugin configur=
ation. Doing so will allow JaCoCo to set its agent properly. Otherwise the =
JVM may crash while tests are running.
argLine should b=
e 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 Component Viewer documentation to dis= play this information in SonarQube.