I know you are in the process of fixing sonarRunner with Gradle 2.2 so this may be too early to report. I’m seeing the following when I do “gradlew sonarRunner” using gradle nightly 2.2-20140910134745+0000
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:65)
... 1 more
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_67\bin\java.exe" (in directory "J:\git\gradledemo\access"): CreateProcess error=206, The filename or extension is too long
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
... 4 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
I suspect it may not like like the space in “C:\Program Files”? I could always install java somewhere else, but I thought this would be worth fighting through since it is the default location Oracle specifies on setup.
This is my first attempt at using Sonar in quite some time so it is quite possible there is a configuration issue on my part as well. The relevant part of my build.gradle:
These types of early reports are very useful. Thank you.
Is suspect that the actual command line invocation to start the process is too long for Windows.
Could you try moving your Gradle project to the root of C: drive, and also running with ‘-g c:/.gradle’ temporarily. The goal here is to shorten the paths to see if this fixes the problem. If it does we know that’s the problem.
I moved my project to “C:\a” and ran with -g c:/.gradle.
C:\a>gradlew sonarRunner -g c:/.gradle
It is still failing as before.
I should have mentioned that I also tried setting JAVA_HOME to the DOS ‘dir /x’ short path
JAVA\_HOME=C:\Progra~1\Java\JDK17~1.0_6
but it still appears to be using the “long” java directory instead - as I still see “C:\Program Files\Java\jdk1.7.0_67\bin\java.exe” in the stacktrace.