[GRADLE-3168] sonar-runner plugin doesn't work on large projects due to invoking the Sonar Runner process with too long of a command line Created: 15/Sep/14 Updated: 18/Sep/14 Resolved: 18/Sep/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.2-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Luke Daley |
Resolution: | Fixed | Votes: | 0 |
Description |
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) Full stacktrace here 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: apply plugin: 'sonar-runner' ---------------------------------------------------------------------------------------- |
Comments |
Comment by Gradle Forums [ 15/Sep/14 ] |
Hi Brad, 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. |
Comment by Gradle Forums [ 15/Sep/14 ] |
Hi Luke, 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. Brad |
Comment by Gradle Forums [ 15/Sep/14 ] |
Can you please run with `--info` and provde the output. I need to see the full command that it's using to launch the runner. |
Comment by Gradle Forums [ 15/Sep/14 ] |
It looks like the runner command-line is an astounding ~200K long! Output with --info is here |
Comment by René Gröschke (Inactive) [ 15/Sep/14 ] |
This also happens on osx systems with error message: Caused by: java.io.IOException: Cannot run program "/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java" (in directory "/Users/Rene/repos/gradle"): error=7, Argument list too long |