[GRADLE-3195] SonarRunner in gradle 2.2 doesn't take sonar.host.url parameter Created: 13/Nov/14 Updated: 14/Dec/14 Resolved: 09/Dec/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.3-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | René Gröschke (Inactive) |
Resolution: | Not A Bug | Votes: | 0 |
Known Issue Of: |
Description |
SonarRunner in gradle 2.2 doesn't seem to take sonar.host.url parameter - it always points to "[1]http://localhost:9000" regardless of either Gradle code or -D flags. I've tried to set the sonar host via the Gradle config, the properties file, and as a flag on the command line as per the Gradle documentation. Regardless of how we try to set it, we always get the same error message: SonarQube Runner 2.3 Our Sonar server is on version 3.7.1 of SonarCube. This worked with Gradle 2.1. It looks like none of the properties from the Gradle config are being utilized. I've tried setting the sonarRunner to various older versions without success. Here's our config section: Any ideas? This is preventing us from upgrading to 2.2. |
Comments |
Comment by Gradle Forums [ 13/Nov/14 ] |
Hi Doug, If you run the build with `-i`, the Sonar Runner task will log all of its properties before executing. What value do you see for the host in that property list? |
Comment by Gradle Forums [ 13/Nov/14 ] |
Hi Doug, see my comment on this thread: [1]http://forums.gradle.org/gradle/topic... You probably run into the same problem, that the sonar runner is forking, so you need to make sure you pass system properties and system environment down to the child process. we do something like this: sonarRunner { } ---------------------------------------------------------------------------------------- |
Comment by Gradle Forums [ 13/Nov/14 ] |
Here's the output wit :test (Thread[Daemon worker,5,main]) completed. Took 15.573 secs. FAILURE: Build failed with an exception. You can see the host server is listed properly. |
Comment by Gradle Forums [ 13/Nov/14 ] |
Tried that, didn't work... |
Comment by Gradle Forums [ 13/Nov/14 ] |
I can also see that in the build/tmp/sonarRunner/sonar-project.properties the settings are right, too (many lines deleted for clarity): #Thu Nov 13 14:02:45 PST 2014 |
Comment by Gradle Forums [ 13/Nov/14 ] |
Noticing that the line sonar.environment.information.version=2.2 shows 2.2, I set the version number to 2.2 as well, same result as the default of 2.3 |
Comment by René Gröschke (Inactive) [ 09/Dec/14 ] |
we now throw a warning to inform user of misleading sonar-runner behaviour |