Maven Sonar plugin with Jenkins : Metric 'overall_lines_to_cover' should not be computed by a Sensor

Viewed 290

I am using 'jacoco' as a code coverage tool for my application and trying to configure the coverage report through 'Jenkins' to 'SonarQube' but when I am running command 'mvn sonar:sonar' it is giving error.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project my-project: Metric 'overall_lines_to_cover' should not be computed by a Sensor ->

Properties in pom are

     <properties>
          <java.version>1.8</java.version>
          <sonar.sources>src/main</sonar.sources>
          <sonar.tests>src/test</sonar.tests>
          <runSuite>**/*Test*.class</runSuite>
          <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
          <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
          <sonar.jacoco.reportPath>${project.basedir}/target/coverage-
           reports/jacoco-ut.exec</sonar.jacoco.reportPath>
    </properties>

Sonar Configuration at Jenkins is :

Sonar Configuration

1 Answers
Related