Hi,
I'm really stuck: we're using gradle in the Sun Grid Engine environment.
Recently, some change in the grid configuration changed (I'm not sure what,
I'm not close to the admins) and now java has trouble just "starting":
"java -version" fails with "cannot allocate enough heap memory"...
I discovered that launching the jvm with "-client" seems to do the trick
*but*, we have a set of custom gradle tasks in our build system and when
they need to be recompiled, I'm getting this error again.
JAVA_OPTS is set to "-client -Xmx128m -Xms32m", but that doesn't help.
I tried putting this in my build.env:
tasks.withType(Compile).all {
options.compilerArgs << '-Xms32m' << '-Xmx128m' << '-client'
}
but that seems to be interpreted *after* gradle tries to compile the custom
tasks.
The stacktrace I get looks like this: (running with Gradle 1m5 on sun jdk
64bit ):
13:52:49.512 [DEBUG]
[org.gradle.api.internal.project.ant.AntLoggingAdapter]
Execute:Java13CommandLauncher: Executing '/gpfs/scratc
'-classpath'
'/gpfs/scratch01/data/zbcdef/scratch/jrobicha/bbnnbbnn/opt/gradle-1.0-milestone-5/lib/logback-classic-0.9.29.jar:/gpfs/scratch01/da...
'-Dfile.encoding=UTF-8'
'org.codehaus.groovy.tools.FileSystemCompiler'
'--classpath'
'/gpfs/scratch01/data/zbcdef/scratch/jrobicha/zzz/opt/gradle-1.0-milestone-5/lib/logback-classic-0.9.29.jar:/gpfs/scratch01/data/zb...
'-j'
'-Fg'
'-Jsource=1.5'
'-Jtarget=1.5'
'-d'
''/.local/work/history/build.jrobicha.2011-10-30_12_00_b/DS2_wc/build/buildSrc/build/classes/main'
'/.local/work/history/build.jrobicha.2011-10-30_12_00_b/DS2_wc/build/buildSrc/src/main/groovy/com/zzz/yy/build/CustomTask1.groovy'
'/.local/work/history/build.jrobicha.2011-10-30_12_00_b/DS2_wc/build/buildSrc/src/main/groovy/com/zzz/yy/build/CustomTask2.groovy'
'/.local/work/history/build.jrobicha.2011-10-30_12_00_b/DS2_wc/build/buildSrc/src/main/groovy/com/zzz/yy/build/CustomTask3.groovy'
as you can see, there isn't -client or other jvm options passed there.
Is there a way I can tell gradle to use these jvm option for compiling the
groovy custom tasks?
Or even better: any clue why java would die so quickly (even just "java
-version")?
This is really impacting our ability to work properly!
Thanks for your help!
Jp