After upgrading the SonarJava plugin from 5.14 to 6.1, Sonar scan went from 15min to 45-50 min.
Also coverage data disappeared
In maven logs I see:
[INFO] 20:28:17.254 Java Test Files AST scan (done) | time=5888ms
[INFO] 20:28:17.254 29/29 source files have been analyzed
[INFO] 20:28:17.255 Sensor JavaSquidSensor [java] (done) | time=161312ms
[INFO] 20:28:17.256 Sensor JaCoCo XML Report Importer [jacoco]
[DEBUG] 20:28:17.258 Reading report ‘C:\jenkins\workspace \ [project dir] \ [module dir]\target\site\jacoco-aggregate\jacoco.xml’
[INFO] 20:28:17.307 Sensor JaCoCo XML Report Importer [jacoco] (done) | time=51ms
[INFO] 20:28:17.307 Sensor SurefireSensor [java]
I updated maven arguments to use xmlreports instead of reports config field, e.g.: mvn clean verify jacoco:report-aggregate sonar:sonar -am -e -X -P sonarqube,allTests -Dsonar.java.coveragePlugin=jacoco -Dsonar.dynamicAnalysis=reuseReports -Dsonar.language=java -Dsonar.coverage.jacoco.xmlReportPaths="target/site/jacoco-aggregate/jacoco.xml" -Dmaven.multiModuleProjectDirectory="C:\jenkins\workspace\XXXXX"
Hi @sergek,
Could you try to check your maven configuration and command line using this guide: [Coverage & Test Data] Importing JaCoCo coverage report in XML format?
Then could you check the content of target/site/jacoco-aggregate/jacoco.xml to figure out if the xml file does not contain coverage information or if JaCoCo XML report importer is not able to import the coverage report.
@alban.auzeill I checked the .xml reports and saw module-specific content in them.
There were no errors in the logs.
The coverage simply stopped being shown in SQ. Jenkins still shows coverage though