# Sonarqube not generating CodeCoverage report for both Jacoco or Cobertura

**URL:** <https://community.sonarsource.com/t/sonarqube-not-generating-codecoverage-report-for-both-jacoco-or-cobertura/46572>\
**Category:** SonarQube Server / Community Build\
**Tags:** cobertura, maven, azuredevops-services, jacoco, sonarqube\
**Created:** [July 16, 2021, 12:58pm UTC](https://community.sonarsource.com/t/sonarqube-not-generating-codecoverage-report-for-both-jacoco-or-cobertura/46572 "2021-07-16T12:58:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [July 18, 2021, 4:23am UTC](https://community.sonarsource.com/t/sonarqube-not-generating-codecoverage-report-for-both-jacoco-or-cobertura/46572/4 "2021-07-18T04:23:35Z")

</div>

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](https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/12151)

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

I give a simplified pipeline yaml here:

```auto
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'

```

---

_[View the full topic](https://community.sonarsource.com/t/sonarqube-not-generating-codecoverage-report-for-both-jacoco-or-cobertura/46572)._
