问题
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 :
- the gradlew call
- the gradle code
- 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