We got the staging license and have set up 9.9 LTS EE and configured our projects. Previously, we were using 7.8.
Generally, the sonar analysis is working fine with 9.9. However, it’s showing the coverage as 0.0%
We have configured the sonar.coverage.jacoco.xmlReportPaths and sonar.coverage.exclusions correctly since we were seeing some warnings for these properties.
Even after the corrections, the code coverage is still showing as 0%
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
We can see the below snippet in the log for all the modules
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 3 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=109ms
We are using the below jenkins jacoco plugin at jenkins side
name=‘Jenkins JaCoCo plugin’ groupId=‘org.jenkins-ci.plugins’ artifactId=‘jacoco’ version=‘3.3.2’
We can see the below in sonarqube 9.9 EE
sonar-jacoco-plugin-1.3.0.1538.jar
We can see the coverage details correctly in jenkins
I’ve moved this into a new thread. Each topic deserves its own thread, and in the rush of getting back from vacation I overlooked the topic change yesterday.
Thanks for the full log. I didn’t need the JaCoCo report generation, just analysis.
I see from the log that your SonarScanner version is 4.6. The current version is 4.8. It’s probably not the problem here, but you should upgrade it.
And for that matter, is this a Java project? If so, why are you using the sonar-scanner to analyze? You should be using the scanner relevant to your build system. You’ll find that if you use the SonarScanner for Maven it’ll better understand your multi-module project. I suspect that the fact that your project is multi-module is the root of the problem here. From your log, it looks like the same three coverage reports are imported for every single module(?).