Reputation: 1
I have a fresh installation of SonarQube v5.3
and am trying to run the gradle
sonarqube plugin v1.2 against it with 'gradle sonarqube'
. Looking at the debug log, the plugin clearly reaches the sonarqube installation I reference in ~/.gradle/gradle.properties
, but is unable to get the bootstrap index:
[DEBUG] [org.sonarqube.gradle.SonarQubeTask] cache: /Users/xxxx/.sonar/ws_cache/xxxxx900/global [INFO] [org.sonarqube.gradle.SonarQubeTask] User cache: /Users/xxxx/.sonar/cache [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Extract sonar-runner-batch in temp... [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Get bootstrap index... [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Download: http://xxxxx:9000/batch_bootstrap/index
Here is the stacktrace:
Caused by: java.lang.IllegalStateException: Status returned by url [http://xxxxx:9000/batch_bootstrap/index] is not valid: [404] at org.sonar.runner.impl.ServerConnection.callUrl(ServerConnection.java:186) at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:121)
It seems that URL should be xxxxx:9000/**sonar**/batch_bootstrap/index
(which is a valid URL on my server). Is the lack of 'sonar' in that URL a bug? Any ideas?
Upvotes: 0
Views: 1343
Reputation: 196
In your project's gradle scripts, for the sonarqube task you can put
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.host.url", "http://yourURL:9000"
}
}
If your using a gradle wrapper, you can then use the command in a bash shell
./gradlew sonarqube
Or for a CMD
gradlew sonarqube
Upvotes: 0
Reputation: 5326
In ~/.gradle/gradle.properties
simply pass sonar.host.url=http://xxxxx:9000/sonar
Upvotes: 1