Getting zero code coverage in sonarqube for branches other than main

One of my projects is showing zero code coverage on sonar dashboard for all the branches except main. I am not sure what is causing this issue as pom.xml for the branches are almost identical.

main branch:

other branches:

coverage report path is already present in pom.xml



I checked the jacoco report locally and it is showing a bigger number(not zero) but sonar is still showing zero.

Hey there, as requested in the template post, what version of SonarQube are you using?

And, what do the coverage logs say?

I am using sonarqube 10.0 and the coverage logs say that the report is not getting generated. I am not able to find any coverageReport folder in the workspace as well. If I run on local though, everything is working as expected.

Sonarcube log:
[WARNING] No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘target/coverageReport/xyz-service/jacoco.xml’. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml

You should probably look back in your logs to make sure that JaCoCo is producing your report in your CI enviornment.