Sonarqube not generating CodeCoverage report for both Jacoco or Cobertura

Hi @Raja_Shekar ,

You need to use .xml format, not .exec format. See my earlier link: [Coverage & Test Data] Importing JaCoCo coverage report in XML format

Here’s an example of a simple maven single-module project with successful code coverage (sample projects here): https://dev.azure.com/joetingsanchali/_git/azo-maven-basic?path=%2Fazure-pipelines.yml

I give a simplified pipeline yaml here:

trigger:
- master

pool:
  vmImage: ubuntu-latest

steps:
- task: SonarQubePrepare@4
  inputs:
    SonarQube: 'ee89'
    scannerMode: 'Other'
    extraProperties: |
      sonar.coverage.jacoco.xmlReportPaths=**/jacoco.xml
- task: Maven@3
  inputs:
    mavenPomFile: 'pom.xml'
    goals: 'clean install sonar:sonar'
    publishJUnitResults: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    codeCoverageToolOption: 'JaCoCo'
    javaHomeOption: 'JDKVersion'
    mavenVersionOption: 'Default'
    mavenAuthenticateFeed: false
    effectivePomSkip: false
    sonarQubeRunAnalysis: true
    sqMavenPluginVersionChoice: 'latest'
- task: SonarQubePublish@4
  inputs:
    pollingTimeoutSec: '300'