How to genarate .exec to .xml for code covarage

Hello Team,

I am using below sonar versions

Whenever i buld the code its creates jacoco.exec file but in the sonarqube.properties i am using jacoco.xml.

Could you please let me know how to gearate jacoco.xml instead of jacoc.exec so that it will pick up the file and genarate the code covarage report.

Getting below error:

INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/home/vsts/work/1/s/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=3ms
INFO: Sensor Removed properties sensor [java]
WARN: Property ‘sonar.jacoco.reportPath’ is no longer supported. Use JaCoCo’s xml report and sonar-jacoco plugin.
INFO: Sensor Removed properties sensor [java] (done) | time=2ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=2ms

Sonar.properties:

sonar.surefire.reportsPath=service/target/surefire-reports
sonar.jacoco.xmlReportPaths=service/target/site/jacoco/jacoco.xml
sonar.coverage.jacoco.xmlReportPaths=service/target/site/jacoco/jacoco.xml
sonar.binaries=service/target/classes

Thanks,

Hello,

SonarQube just consumes your reports. Generating them is a bit out of scope for this community. :slightly_smiling_face:

I believe this is going to be a matter of how you configure the JaCoCo plugin in your pom.

 
:woman_shrugging:
Ann