声纳java-plugin 4.0升级后无法执行Sonar [英] Unable to execute Sonar after sonar-java-plugin 4.0 upgrade
问题描述
将SonarQube从5.5升级到5.6.5后,我们的Gradle构建按预期工作,直到更新了SonarJava插件.
After upgrading SonarQube from 5.5 to 5.6.5 our Gradle build worked as expected until the SonarJava plugin was updated.
我们从3.13.1更新到了4.x(我尝试使用4.0、4.8和4.9).我不得不将插件降级"到3.13.1才能通过构建.我们升级SonarQube服务器的主要原因是开发人员可以使用SonarLint,而SonarJava v4.0是最低要求.
We updated from 3.13.1 to 4.x (I tried 4.0, 4.8, and 4.9). I had to 'down grade' the plugin back to 3.13.1 for the build to pass. The main reason we upgraded the SonarQube server was so the developers could use SonarLint and SonarJava v4.0 is a minimum requirement.
我得到的错误是:
ERROR: Caused by: sonar.binaries and sonar.libraries are not supported since version 4.0 of sonar-java-plugin, please use sonar.java.binaries and sonar.java.libraries instead
我们在代码中未使用sonar.binaries
或sonar.libraries
,因此我认为它可能存在于所应用的org.gradle.sonar-runner插件中.
We don't use sonar.binaries
or sonar.libraries
in our code so I assume it might exist in the org.gradle.sonar-runner plugin that is applied.
如有需要,我可以提供以下内容:
I can include the following if necessary upon request :
- gradlew电话
- gradle代码
- 日志输出
推荐答案
添加这些属性可以解决此问题.
Adding these properties resolved the issue.
sonar.java.binaries=**/classes
sonar.java.libraries=**/*.jar
根据文档,这些属性自版本4.12起是必需的
As per the docs these properties are required since version 4.12
这篇关于声纳java-plugin 4.0升级后无法执行Sonar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!