Tuesday, August 16, 2011

How to remove jar from grails

How do you prevent a jar from being packaged in a war under grails prod war?

like so...


grails.war.resources = { stagingDir, args ->
delete file: "${stagingDir}/WEB-INF/lib/YOUR-FILE-HERE.jar"
}

Sunday, August 14, 2011

passing JVM arguments to Grails commands (eg run-app)

I ran into a funny situation where I needed to pass some jvm arguments to a grails app. JMX arguments was what I was trying to pass it. I tried a bunch of things but it ended up that I just needed to put them in the GRAILS_OPTS

export GRAILS_OPTS="-Dcom.sun.management.jmxremote"
grails run-app