Java coverage @ 0.0% with JacocoXMLReport

Hi Devin,

Could you share your versions of the following plugins on each of your SonarQube servers (in SonarQube / Administration / Marketplace):

  • SonarJava, Code Analyzer for Java (e.g. 6.2)
  • JaCoCo, JaCoCo XML report importer (e.g. 1.0.3)

Because before SonarJava 5.12, it was SonarJava that was responsible for importing JaCoCo binary format report (build/jacoco/test.exec) through the property sonar.jacoco.reportPaths.
And now, it’s recommended to use the JaCoCo XML report importer plugin that imports the XML format report (build/reports/jacoco/test/jacocoTestReport.xml) through the property sonar.coverage.jacoco.xmlReportPaths.

So depending on your plugin versions, the import property could be different.
You should also run the analysis in debug mode to be able to see what is imported, e.g.:

[INFO] 16:59:10.201 Sensor JaCoCo XML Report Importer [jacoco]
[INFO] 16:59:10.201 1/1 source files have been analyzed
[DEBUG] 16:59:10.203 Reading report '/home/user/project/build/reports/jacoco/test/jacocoTestReport.xml'
[INFO] 16:59:10.208 Sensor JaCoCo XML Report Importer [jacoco] (done) | time=7ms

See: [Coverage & Test Data] Importing JaCoCo coverage report in XML format