I would like to have a small change made to the Eclipse launch configuration template file to make it more Eclipse friendly
The template .launch is configured so that a grails project has to be selected before the launch will work, a simple change will eliminate this headache of a problem. I quickly drove me nuts, such that I had to go fix it immediately. All of my projects have this change so I can keep my sanity.
In the file <grails_base>\src\grails\templates\ide-support\eclipse\.launch
the following line
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=${project_loc} -Dserver.port=8080 -Dgrails.env=development"/>
is changed to
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=${workspace_loc}/@grails.project.name@ -Dserver.port=8080 -Dgrails.env=development"/>
Now clicking on a launch always works no matter where your current cursor selection is.
Here's the stack trace when trying to run 1.1 beta 2 app from Eclipse using app created with grails create-app
Error executing script RunApp: GrailsScriptRunner loader is not a Groovy RootLoader instance!
java.lang.RuntimeException: GrailsScriptRunner loader is not a Groovy RootLoader instance!
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108)
at grails.util.GrailsMain.run(GrailsMain.groovy:16)
at grails.util.GrailsMain.main(GrailsMain.groovy)
grails run-app works fine.