Unable to execute Sonar after sonar-java-plugin 4.0 upgrade

旧城冷巷雨未停 提交于 2019-12-11 17:45:32

问题


After upgrading SonarQube from 5.5 to 5.6.5 our Gradle build worked as expected until the SonarJava plugin was updated.

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.

The error I get is:

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

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 :

  1. the gradlew call
  2. the gradle code
  3. the log output

回答1:


Adding these properties resolved the issue.

sonar.java.binaries=**/classes
sonar.java.libraries=**/*.jar

As per the docs these properties are required since version 4.12

Sonarqube doc



来源:https://stackoverflow.com/questions/44532429/unable-to-execute-sonar-after-sonar-java-plugin-4-0-upgrade

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