不推荐使用属性"sonar.jacoco.reportPath".请改用'sonar.jacoco.reportPaths' [英] Property 'sonar.jacoco.reportPath' is deprecated. Please use 'sonar.jacoco.reportPaths' instead

查看:911
本文介绍了不推荐使用属性"sonar.jacoco.reportPath".请改用'sonar.jacoco.reportPaths'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不推荐使用属性"sonar.jacoco.reportPath".请用 改为使用"sonar.jacoco.reportPaths".

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

当通过Gradle运行SonarQube时,我一直收到此消息,短语"reportPath"甚至在整个多模块项目中甚至都没有出现过.我什至将sonarqube属性放在allprojects下,以覆盖那里可能存在的任何默认设置.关于如何消除此错误的任何提示?

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?

我正在使用:

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

Gradle包装器3.1

Gradle wrapper 3.1

我在build.gradle的根目录中使用它

Am using this in the root of build.gradle

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

并用

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

没有骰子,你怎么看?

推荐答案

问题是,您正在使用哪个版本的sonarQube gradle插件: https://docs.sonarqube.org/display/SCAN /Analysis + with + SonarQube + Scanner + for + Gradle

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

sonarqube gradle插件默认设置一些值,例如.如果您使用的是JaCoCo(可能是这种情况),那么它会自动添加该字段,而且还会添加常规的字段.

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.

因此,一般而言,您需要等待sonarqube gradle插件的更新,该更新已被摆脱,并正在使用其他配置值.

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.

也许您还可以尝试通过将其设置为空(如sonar.jacoco.reportPath=

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

这篇关于不推荐使用属性"sonar.jacoco.reportPath".请改用'sonar.jacoco.reportPaths'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆