Disable reboot in Grails 3.1 / springloaded

I am trying to disable automatic reboot / recompilation in Grails 3.1, as I would like to use JRebel instead. I find springloaded quite limited, but, more importantly, constantly fails with

File /Users/engrun/Development/projects/grailsPoc/grails-app/controllers/grailsPoc/HelloController.groovy changed, recompiling... java.lang.IllegalAccessException: Class org.springsource.loaded.ReloadableType can not access a member of class org.springframework.aop.framework.CglibAopProxy$ClassLoaderAwareUndeclaredThrowableStrategy with modifiers "public" 

I tried all sorts of settings that I found available, however none of them actually disable reboot when running the run-app command

I tried

 disable.auto.recompile=true 

at the command line, GRAILS_OPTS and in application.yml

I tried

 -noreloading 

both on the command line and in GRAILS_OPTS.

According to the docs, this should have worked https://grails.org/wiki/Auto%20Reloading

And the answer is accepted as correct here how to disable reboot in grails 3.0.0 application? doesn't work either.

Has anyone really been able to disable automatic reboot in Grails 3.1? (And successfully configured Grails 3 with JRebel?)

+7
grails jrebel spring-loaded
source share
3 answers

In 3.x applications, you can disable Spring Uploaded by adding

 grails { agent { enabled = false } } 

to build.gradle .

+7
source share

To enable the JRebel project for Grails 3, you need to configure the -javaagent argument with the corresponding jrebel.jar path in the build.gradle file:

 tasks.withType(JavaExec) { jvmArgs "-javaagent:jrebel.jar" } 
+3
source share

Burt's answer is correctly related to the question → how to disable autoload.

However, Anton's answer has to do with the second / related question of how to get Jrebel to work.

Now I have a working example that works with both

 gradle bootRun -Pjrebel -> disable springloaded, using jrebel gradle bootRun -> uses springloaded 

and

 grails grails> run-app 

My config is a combination

 export GRAILS_OPTS="-javaagent:$JREBEL_HOME/jrebel.jar -Drebel.base=/Users/<username>/.jrebel" 

and build.gradle

 rebel { alwaysGenerate = false showGenerated = true //rebelXmlDirectory = "build/classes" } if (project.hasProperty('jrebel')) { bootRun.dependsOn(generateRebel) grails { agent { enabled = false } } tasks.withType(JavaExec) { jvmArgs "-javaagent:jrebel.jar" jvmArgs "-Xverify:none" } } 

Thanks @ burt-beckwith and @ anton-arhipov for your input!

+3
source share

All Articles