I want to display coverage on SonarQube

I want to display the coverage of java project on SonarQube.

I am using sonar-scanner.

However, the coverage is not reflected on SonarQube.

Please let me know if there is something missing in the execution content.

【Execution content】
①Run the following in a JDK 11 environment
mvn test jacoco:report
(Create “./target/site/jacoco/jacoco.xml”)

Next, in the JDK8 environment, the following was executed for the execution result of ①.


【version information】

SonarQube Community EditionVersion 7.3 (build 15553)


SonarQube Scanner

Java 1.8.0_201 Oracle Corporation (64-bit)

Linux amd64


First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.3 → 7.9.6 → 8.9.2 → 9.1 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your actual question I believe you’ll need to do the upgrade for your JaCoCo XML report to be read properly.

Also since, you’re using Maven to build. You should use it to analyze as well. Then I believe including coverage should just work. And you’ll be able to eliminate many of the parameters you’re using.

And finally, once you upgrade you’ll find that you can run analysis with Java 11. In fact, you’ll have to.



Thank you.

Plan for version upgrade.


1 Like