Gradle 2.2 nightly sonarRunner task fails with toolVersion = "2.4"

I feel like I’m piling on with another sonarRunner issue in 2.2 nightly.

If I use the new toolVersion = “2.4” as in the gradle 2.2 nightly release notes, gradle sonarRunner task fails. If I instead set this to toolVersion = “2.3” (which I understand gradle defaults to), then sonarRunner task completes.

When toolVersion is set to 2.4, the failure is happening in the sonar runner code.

ERROR: Error during Sonar runner execution
        at java.util.Hashtable.put(
        at org.sonar.runner.Conf.initRootProjectBaseDir(
        at org.sonar.runner.Conf.loadProjectProperties(
        at org.sonar.runner.Main.executeTask(
        at org.sonar.runner.Main.execute(
        at org.sonar.runner.Main.main(

In the code gets a -Dproject.home from the sonarRunner.jar command-line and uses it as the the sonar.projectBaseDir rather than the value that is actually IN Strange

I can get it to work manually if I add -Dproject.home to the command-line that gradle is generating for the sonarRunner task and set it to the value of sonar.projectBaseDir in For example:

C:\Program Files\Java\jdk1.7.0_67\bin\java.exe -Dproject.settings=J:\git\gradledemo\access\build\tmp\sonarRunner\ -Xmx1024m -Dfile.encoding=windows-1252 -Duser.language=en -Duser.variant -cp C:\Users\bradthurber.gradle\caches\modules-2\files-2.1\org.codehaus.sonar.runner\sonar-runner-dist.42482668102eb7f288dadd774658b58e7175c063\sonar-runner-dist-2.4.jar org.sonar.runner.Main -Dproject.home=J:\git\gradledemo\access

I don’t know if the right solution for gradle is to add this parameter to the sonarRunner command line or not. I’m very much a sonar novice and it seems strange that the sonar code would ignore the sonar.projectBaseDir value.


I’ve fixed this. Will be in the next nightly build.

Thanks for the report!


This appears fixed in “2.2-20140927220014+0000”

Tested with sonar runner 2.4 against just-released sonarQube 4.4.1


Great, thanks for confirming.