Azure pipelines task uses sonar.jacoco.reportPaths

I am recently getting the following warning recently with my Azure devops builds

Property ‘sonar.jacoco.reportPaths’ is deprecated (JaCoCo binary format). ‘sonar.coverage.jacoco.xmlReportPaths’ should be used instead (JaCoCo XML format).

I am suspecting it may just need a fix to the the following task in https://github.com/SonarSource/sonar-scanner-vsts

  - task: SonarSource.sonarqube.15B84CA1-B62F-4A2A-A403-89B77A063157.SonarQubePrepare@4
    displayName: 'Prepare analysis on SonarQube'

Hi,

Which build task are you using ? Maven, Gradle, something else ?

Thanks.

  - task: SonarSource.sonarqube.15B84CA1-B62F-4A2A-A403-89B77A063157.SonarQubePrepare@4
    displayName: 'Prepare analysis on SonarQube'
    inputs:
      SonarQube: 'devhaus-sonarqube'
      scannerMode: Other

- task: Maven@3
    displayName: 'Maven build'
    inputs:
      goals: verify
      options: '-T 1.5C -s $(Agent.TempDirectory)/settings.xml -B'
      jdkVersion: 1.11
      sqAnalysisEnabled: true
  sqMavenPluginVersionChoice: pom

With

          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>3.6.0.1398</version>

Hi,

Current Maven (and also Gradle) tasks suffer from using the deprecated (and now removed starting from SonarJava 6.0) old jacoco.ReportPaths property. This is still in Pull Request on Microsoft side, so we have no ETA to give concerning a fix.

In the meantime, you can add the new property into the additional properties field of the Prepare Analysis configuration task, it should be working.

Mickaël

1 Like