tags:

views:

1516

answers:

8

Hi,

I've been on a frustrating quest to find an IDE which provides reasonable support for Grails 1.1 development. My minimum requirements are:

  • Supports running tests within the IDE
  • Supports debugging within the IDE while running either the tests or the app itself
  • Provides code-completion, including dynamic finders added to domain classes

Here's a rundown of my experience so far

Eclipse 3.4.2 (Ganymede) Using the latest plugins available from the update site, Eclipse's support for Groovy/Grails is truly pathetic. It provides little more than code completion and spurious errors

NetBeans 6.7 Beta As soon as I imported the project, NetBeans began scanning it. The Navigator view was waiting for the scanning to finish before showing it's contents. About 20 minutes later, both the Navigator view and I were still waiting. Also, support for code completion on dynamic finders is poor, and for some reason it copied all the plugins into $PROJECT_ROOT/web-app/plugins.

IntelliJ 8.1.2 Although the general consensus is that IntelliJ is the best IDE for Groovy/Grails, it does not work well with Grails 1.1.X. The root cause of the problem appears to be the change in the location of the plugins folder. IntelliJ is unable to build the app because it can't find classes I'm importing from plugins, even though those plugins are listed in application.properties

So my question (finally) is whether anyone has found an IDE (not TextMate or Vim) that works with Grails 1.1.X when the plugin folder is in it's default location, i.e. under $HOME/.grails/1.1.X/plugins?

If so, I'd be really grateful for information about:

  • Which IDE to use (including version number)
  • Which plugins (if any) need to be installed
  • How to import an existing project into the IDE
  • How to run the app, the tests, and debug from within the IDE (if it's not obvious)

Thanks, Don

+2  A: 

I'm unclear on which version of IntelliJ IDEA the author of that blog post tested, tha didn't work with Grails 1.1.1.

Idea 8.1.2 works very well for me on OSX with Grails 1.1 and 1.1.1. Grails is installed under /Developer/grails-1.1.1 (with a symlink at /Developer/grails ), and the plugins are in the ~/.grails/1.1.1/plugins directory.

I didn't have to install any extra Idea plugins. What I did have to do was tell it where the plugins were, and install the missing ones once I had upgraded to 1.1.1. IDEA's grails integration can even recognize the plugins from the Grails repository and install them from the IDE.

Ricardo J. Méndez
I can't even evaluate IDEA as a grails IDE now. I just installed 8.1.2 and I can't even run grails applications. I says my JAVA_HOME is incorrectly set to 'x:\java\jdk' however that folder does contain my valid jdk where I use in eclipse and netbeans.
Xymor
@Xymor - A quick fix is to edit startGrails.bat and insert the following at line 46 after the :have_JAVA_HOME labelset JAVA_HOME=%JAVA_HOME:/=\%
Don
A: 

I've been using Netbeans 6.7 for some time and it's very slow, the code completion rarely works. Basically I'm using it as an editor and to format my code.

A: 

I used the EAP version of IDEA 8.1 and it was really nice - very easy to setup and develop in compared to the other IDEs. Sorry I don't remember exactly how to import an existing project but it was fairly straight forward.

If cost is not an issue, then IDEA would probably be the best choice.

mikemil
+4  A: 

NetBeans 6.7 now with Grail 1.1 support

J-16 SDiZ
+1  A: 

NetBeans 6.7 RC3 works much better with Grails 1.1.1 than the versions before. Debugging only works in attached mode, i.e. you start your application from the command line (grails-debug run-app) and then attach the Netbeans Debugger (port 5005). My experience is that the watches do not show the correct values of the running process. Automatic code formatting is horrible.

IntelliJ 8.1.3 worked good for me with Grails 1.1. Debugging was working correctly (most of the time, from time to time, the status of the debugger does not match the actual process' status) and code formatting is quite good. After I switched to Grails 1.1.1 IntelliJ refuses to start my app ("error running MyApp: Grails are not configured") although grails is installed and GRAILS_HOME is set correctly. The trick is to change the facet in the module settings of your project. There you have to configure the location of your grails 1.1.1 installation. Then IntelliJ crashed while starting your app and you have to do the configuration again . With a little bit of luck it works then and everything is fine.

I've spend a lot of time with these issues in the last days and I am quite angry about that. Therefore I'd like to recommend to go away from grails and to use ruby on rails with NetBeans 6.7 instead. Then you can start to focus on your business, not on configuration and installation issues. If you really need to stick with grails, use IntelliJ and pay for it. It's worth it. Do not even think about using Eclipse, if you do not want to go crazy.

Christian Noack
+1  A: 

I've been playing around with the version 9 milestone 1 release of IntelliJ and so far have not had any problems working with grails apps.

One thing i did notice was that the project explorer doesn't always refresh properly when files are added via an automated process. sometimes i have to close and re-open the project to see the new files, but that could just be a beta issue in general and not related to the grails support.

Jason Miesionczek
+1  A: 

They've added a lot of Groovy and Grails support to the latest version of the Spring Source Tool Suite. It doesn't ship with these plugins by default, but there are options to install them as extensions from the dashboard page.

Some of the nice features include the ability to run grails commands in the IDE and support for editing GSPs. The Groovy language support has gotten much better too with the latest release of the plugin. You can read more about that here.

Jason Gritman
A: 

I use STS (SpringSource Toolkit), I like it better than Intellij or Netbeans. I am using 2.3.3.M2