SonarRunner with gradle: unable to load libraries from server
I updated Sonar
to 4.5.1 LTS version and now in my gradle task I got the following error and cannot fix it:
Fail to download libraries from server
build.gradle with sonar runner
sonarRunner {
sonarProperties {
property "sonar.host.url", "http://sonar:9000"
property "sonar.login", ""
property "sonar.password", ""
property "sonar.jdbc.url", "jdbc:mysql://sonar"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonar"
property "sonar.jdbc.password", "sonar"
property "sonar.profile", "sonar"
property "sonar.projectName", "sonar"
property "sonar.language", "java"
property "sonar.sources", "src/main/java"
property "sonar.binaries", "build";
}
}
I tried to write this property, but nothing worked:
toolVersion = '2.3' // default
+3
source to share
3 answers
As already said, the latest SonarQube versions require Gradle 2.2 on the client side.
If you are unable or unwilling to update your version of Gradle, you can easily copy the Sonar Runner Gradle plugin into your buildSrc project with minor changes that do not depend on Gradle Injection which does not work for a custom plugin.
I just did it for our project which is still using Gradle 1.12 and it works great.
0
source to share