Property 'sonar.jacoco.reportPath' is deprecated. Please use 'sonar.jacoco.reportPaths' instead

萝らか妹 提交于 2020-05-12 11:36:13

问题


Property 'sonar.jacoco.reportPath' is deprecated. Please use 'sonar.jacoco.reportPaths' instead.

I keep getting this message when running SonarQube through Gradle and the phrase "reportPath" does not even appear even once in the entire multi-module project. I even put the sonarqube property under allprojects to override any defaults that may be there. Any tips on how I can get rid of this error?

I am using:

allprojects {
    sonarqube {
        properties {
            property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec"
        }
    }
}

EDIT 1:

Gradle wrapper 3.1

Am using this in the root of build.gradle

plugins {
    id "jacoco"
    id "org.sonarqube" version "2.5"
}

And tried your suggestion with

allprojects {
    sonarqube {
        properties {
            property "sonar.jacoco.reportPath", ""
            property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec"
        }
    }
}

No dice, what do you think?


回答1:


The question is, which version of the sonarQube gradle plugin you are using: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle

The sonarqube gradle plugin sets some values per default, eg. if you use JaCoCo, which is probably the case, it automatically adds that field, besides the groovy one too.

So generally speaking, you need to wait for an update of the sonarqube gradle plugin, which gets rid of this, and is using the other config value.

Maybe you can also try to override the setting, by setting it to empty like sonar.jacoco.reportPath=



来源:https://stackoverflow.com/questions/44892248/property-sonar-jacoco-reportpath-is-deprecated-please-use-sonar-jacoco-repor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!