Wildcard support for jacocoxmlreportspath property is not working as expected

As per the documentation it says this property “sonar.coverage.jacoco.xmlReportPaths” supports wildcards Test Coverage & Execution | SonarQube Docs

But if I try to use wildcard like below, it is not working and showing code coverage as ‘0’.

sonar.coverage.jacoco.xmlReportPaths=**/jacoco.xml If I give absolute path to the jacoco.xml file then only it is working and showing code coverage. Isn’t it supposed to work with wildcards as the documentation says?

Hello @sai1408

I have a few additional questions:
What version of SonarQube are you using?

In addition, could you link the logs of the analysis (only the part related to the coverage import if you don’t want to share everything)?

  • Version 7.9.4
    Below is the log when I try to give basedir**. In our case site/jacoco could be present either on basedir-web/target or basedir/target
    WARN: Report doesn’t exist: ‘/jenkins/jenkins.p/workspace/op-springboot-oci-Release-jacoco/source/devsecop-springboot-oci**/target/site/jacoco/jacoco.xml’

The property sonar.coverage.jacoco.xmlReportPaths in SonarQube 7.9.4 is not supporting wildcards.

Since 7.9.6 is past EOL anyway, you should consider updating to benefit from this feature (and many others!).

Best,
Quentin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.