Error running Compile on large Grails Project in Jenkins: GC Overhead Limit Error running Compile on large Grails Project in Jenkins: GC Overhead Limit jenkins jenkins

Error running Compile on large Grails Project in Jenkins: GC Overhead Limit


Well, I have a solution for those who stumble upon this problem.

JAVA_OPTS in windows seems to be a tricky beast to set and keep set, but using the EnvInject plugin in Jenkins, I was able to use the following:https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin

Under the newly added 'Build Environment' step,

Check the box labeled 'Inject environment variables to the build process'

And add this to the 'Properties Content' textbox:

JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=256m

NO QUOTES ON THAT!

As I stated before, I had previously solved this by setting a system-wide JAVA_OPTS variable to windows (which was too much of a hack for our server's needs), so there are probably more than a few ways to get the job done here.

Hopefully this proves helpful to other frustrated Windows/Jenkins/Grails users!