If you’re using Grails 2.3.X and you’re developing, most likely you’re running your app like this:
[sourcecode language=“jscript”] grails run-app #in one command-prompt/shell-terminal and grails stop-app #in another command-prompt/shell-terminal [/sourcecode]
With the latest version of Grails (version 2.3.5), the stop-app say:
[sourcecode language=“jscript”] grails stop-app | Server Stopped
But nothing happens and the server-process continues to run
Here’s an undocumented fix that can come in handy:
On terminal/command-prompt #1
Run the way you do today
On terminal/command-prompt #2, change-directory (cd) to the root folder where you have your Grails project
Create a file with a file-name “.kill-run-app”
For Linux (*Nix) environments
For Windows where you do not have ‘touch’ command do the following instead
echo hello > .kill-run-app
Wait for a few seconds and Grails will kill the app that’s running
Now you can resume with starting a new instance of “grails run-app”.
Cheers & Happy Coding!