we are triggering sonar scan through a jenkins groovy pipeline as follows:
- stage-build- using mvn clean install where we use jacoco.skip=true and skipTests
- stage-run unit tests- using mvn verify
- stage-sonar where we using sonarscanner cli to scan by module static code and build artifacts and using parameters to report coverage.
Now, in our Jenkins we do see the index.html and xml reports per module with correct coverage but when we try to pass this to Sonar the coverage is reported as 0%. We are using sonar.coverage.jacoco.xmlReportPaths (and passing it multiple paths comma separated) and NOT using the deprecated parameter i.e. sonar.jacoco.reportPaths
Please help where we might be going wrong.