Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails auto reload functionality in run-app on a custom environment

When running a custom environment with grails via grails -Dgrails.env=custom run-app it appears that the auto reload / hot deploy is turned off, does anyone know how to arbitrarily enable this for any given environment, not just dev, which appears to be the only env where it is actually on by default?

like image 979
Eric Bennett Avatar asked Aug 25 '09 02:08

Eric Bennett


2 Answers

I resolved this by adding the following to my env(custom in this case) Config.groovy:

    custom {

    disable.auto.recompile=false
    grails.gsp.enable.reload=true
}

You can also add the -reloading flag to your run config:

grails -reloading -Dgrails.env=custom  run-app

Make sure it is the first arg!

Right-click your project -> Run as -> Run configurations

Run Config changes

Blog post about auto refresh in a Grails custom env

like image 132
anataliocs Avatar answered Nov 02 '22 04:11

anataliocs


The flag you want is "disable.auto.recompile", ex:

grails -Dgrails.env=custom -Ddisable.auto.recompile=false run-app
like image 24
Ted Naleid Avatar answered Nov 02 '22 04:11

Ted Naleid