Property #39;sonar.jacoco.reportPath#39; is deprecated. Please use #39;sonar.jacoco.reportPaths#39; instead(不推荐使用属性“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"
}
}
}
编辑 1:
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/分析+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,它可能会自动添加该字段,除了 groovy 字段.
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"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不推荐使用属性“sonar.jacoco.reportPath".请改用“sonar.jacoco.reportPaths"
基础教程推荐
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- JPA惰性列表上的流 2022-01-01
- 将 Windows 证书导入 Java 2022-01-01
