Using Grails with JetGroovyPlugin

Hi,
I have just downloaded the new Milestone 2 of IntelliJ/IDEA 7.0 and I am wondering how to use the new features for Groovy/Grails with it. I have installed the JetGroovy plugin and it shows Groovy code correctly.
After creating a new project as a Grails Application the directory and files are created successfully.
But how do I start the application, use the generators etc.?
I did not found any hints about that. The Flash-Intro about Groovy-Support at http://www.jetbrains.com/idea/training/demos/IntelligentGroovy.html was very helpful but nothing in it about Grails integration.
BTW: I just came from the very rudimentary Eclipse side of Groovy/Grails support and I am quite impressed about the huge feature set already implemented in JetGroovy. Nice work!
Cheers,
Markus

0
5 comments

Finally I have found the generators: they are accessible via right-click in the project tree:
New - Groovy:
- Groovy Class
- Groovy Script
- Grails Application
- Grails Domain Class
- Grails Controller
- Grails Service
- Grails Job
- Grails Script
- Grails TagLib

Now how do I run the grails application inside IntelliJ...

0

Create a Grails Application run profile, and run it.

--Dave Griffith

0

Thanks a lot!
I am new to IntelliJ and did not know that I had to create a new profile via Run - Edit Configurations.

But now the output is

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java -Xmx256M -Dgrails.home=/opt/local/grails -Dtools.jar=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/tools.jar -Dgroovy.starter.conf=/opt/local/grails/conf/groovy-starter.conf -Dfile.encoding=MacRoman -classpath /opt/local/grails/lib/groovy-starter.jar org.codehaus.groovy.tools.GroovyStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf /opt/local/grails/conf/groovy-starter.conf --classpath /opt/local/grails/lib/groovy-starter.jar:. run-app
Environment variable GRAILS_HOME not set. Please set it to the location of your Grails installation and try again.

Process finished with exit code 0

I using Mac OS X 10.4.10 and have defined GRAILS_HOME in /etc/profile and it points to /opt/local/grails. When I open a shell it is defined correctly. Where do I have to define it also?

Cheers,
Markus

0

Hi,
now I found the issue http://www.jetbrains.net/jira/browse/GRVY-132 and built the JetGroovy plugin with the mentioned path by myself and it works.

Cheers,
Markus

0

How come I see only these in the Groovy sub-menu of the New context menu:

- Groovy Class
- Groovy Script
- Grails Application

I tried various folders / packages within my project view, including several locations within an existing Grails application, but the result is always the same.

0

Please sign in to leave a comment.