Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
187 views
in Technique[技术] by (71.8m points)

java - Grails 2.3.0 Auto-reloading not working

I recently upgrade our project to grails 2.3.0. Everything works fine except I've been having problems with auto-reload not working whenever I make changes to our code. This include all projects artefacts - controllers, domain, services, gsps, css and javascript files.

My older versions of grails work correctly and reloads and recompile every time I make a change.

I know this question is popular and I have searched Jira, Nabble and here for days now but none of what I have found have been able to solve my problem (I've even tried to add quotes like Peter suggested in this thread http://jira.grails.org/browse/GRAILS-7936 and also this thread Grails Project Not Auto Reloading did not help).

Am currently running grails on a Macbook pro with the following settings:

  • grails version 2.3.0
  • Java version "1.7.0_17" Java(TM) SE Runtime Environment (build 1.7.0_17-b02) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
  • Running from terminal with Textmate as IDE

Any help would be greatly appreciated.

question from:https://stackoverflow.com/questions/18882589/grails-2-3-0-auto-reloading-not-working

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It seems that in Grails 2.3 the reloading is no longer the default

In Grails 2.3 the reloading agent is no longer on the build system path unless you pass the -reloading flag to the grails command:

grails -reloading run-app

However, you can enable forking in your buildConfig using the following configuration:

forkConfig = [maxMemory: 1024, minMemory: 64, debug: false, maxPerm: 256] 
grails.project.fork = [    
  test: forkConfig, // configure settings for the test-app JVM    
  run: forkConfig, // configure settings for the run-app JVM    
  war: forkConfig, // configure settings for the run-war JVM    
  console: forkConfig // configure settings for the Swing console JVM ]

More information : Forked Execution and the Reloading Agent


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...