Switch from JACOCO Binary format to XML format

I would like to import Jacoco Coverage reports in XML format using JacocoXML reporter. The configuration property ‘sonar.coverage.jacoco.xmlReportPaths’ is well specified.

The issue that I faced is that the build logs indicates that SonarScanner executes both ‘JaCoCo XML Report Importer’ and ‘JaCoCoSensor’. Then the plugin parses the generated XML reports first and analyzes the binary jacoco files.

Please find below the logs from the build:

Sensors : JavaSquidSensor -> PmdSensor -> OWASP Dependency-Check -> Embedded CSS Analyzer Sensor -> JaCoCo XML Report Importer -> jDepend sensor -> Packages sensor -> FindBugs Sensor -> SurefireSensor -> JaCoCoSensor -> SonarJavaXmlFileSensor -> XML Sensor

I estimate that this is not the expected behavior because I would like to use only XML import option and I am wondering if the analysis of the binary format overrides the result of XML import.

Please find below the versions of the plugins:

  • sonar-maven-plugin:
  • maven-jacoco-plugin: 0.8.4

The version of SonarQube is: 6.7.3

Do you have any idea about this issue ?

Thank you in advance.


What version of the SonarJava plugin are you running? Support for the binary JaCoCo format was deprecated starting in SonarJava 5.12 and finally removed in SonarJava 6.1.

SonarQube 6.7.3 is quite old; I’d encourage you to upgrade to at least the SonarQube 7.9.2 LTS release and upgrade SonarJava as well, then you’ll have a guarantee of only the XML format being used for coverage.



Thank you very much for your reply.
The version of SonarJava is 5.3.

First, I will upgrade the this plugin and test.

Thank you again.
Best Regards.