Code Coverage on SonarQube UI Showing 0.0%

Hi,
We are integrating SonarQube in GitHub build pipeline. On SonarQube UI code coverage showing 0.0%. We have 98% code coverage but it’s not showing on SonarQube UI. We have added these properties. Need help on this.

ecs-ci.yml

  sonar:
    needs: [ java-test ]
    uses: sonarqube.workflow/.github/workflows/maven.yml@v1
    with:
      image-name: maven:3-openjdk-17

pom.xml

    <!--SonarQube Properties--><sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <sonar.language>java</sonar.language>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.sources>src/main</sonar.sources>
    <sonar.tests>src/test</sonar.tests>
    <sonar.java.binaries>target/classes</sonar.java.binaries>
<sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  </properties>
![image|535x500](upload://mQXCqaUlEuF5FHXa2xdA97NQr7C.png)
 And I see these info in GitHub logs

It pulled Java 11 but we using java 17


Hi,

Welcome to the community!

Regarding the Java version, your pom must specify that you’re coding to Java 11, because that’s what that highlighted bit means.

Regarding your coverage, could you add -X or -Dsonar.verbose=true to your analysis command line and post the full text (we’re not a fan of log screenshots) of the analysis log, starting from the analysis command itself?

 
Thx,
Ann