Hi, I’m running into an issue with our Monorepo setup. I’m able to generate the Jacoco Reports & .exec file for each subproject. In our root settings.gradle.kts file I made a JacocoMergeReport task to consolidate all the execuation data file from each subproject and I do see it in the root dirctory ~/build/jacoco/text.exec.
Our project is built using Jenkins pipeline. After configuring the plugin by checking Enable injection of SonarQube server pointing to our server url. It’s not picking up the changes.
It looks like you’ve upgraded the Java analyzer independently of your SonarQube version. You’re now at the point where the .exec reports are no longer recognized. You’ll need to switch to generating .xml reports. Note that you’ll probably need to update the relevant analysis parameter (value and key) too.
Looking at our build gradle, looks like we did enable xml for the reports. So for my understanding with the updated java analyzer version it no longer looks at the .exec file, but for jacocoTestReport.xml? And which analysis parameters would I need to update?
Would this work to get all the subprojects xml reports? property("sonar.coverage.jacoco.xmlReportPaths","**/*/jacocoTestReport.xml")
or do comma separated? property("sonar.coverage.jacoco.xmlReportPaths", "${rootDir}/model1/reports/jacocoTestReport.xml,${rootDir}/model2/reports/jacocoTestReport.xml")
This is not my area of expertise, but the docs say path wildcards are supported by this property, so… it ought to work. That said. I’m truly not sure what the implications are in a multi-module/subproject context. Given that you’ve mentioned having a ‘build’ directory, I’m guessing Maven. So if what you’ve outlined doesn’t work, then defining them in the module poms should.