I'm wondering what's the best way to setup a Grails 1.1 project in IntelliJ 8.1.2 that has plugin dependencies installed in the new default location (under $HOME/.grails not in a /plugins directory within the main project)? My current project was setup as follows
- File -> Project Structure
- Modules -> Add Content Root -> $HOME/.grails/1.1.1/projects/$PROJECT/plugins
- Set the source dirs for the project and the plugins
- Dependecies -> Add the "Grails User Library" library if it doesn't already exist
- Attach Jar Directories -> Add the project lib directory and all plugins libs directories
Although this works, it seems like a lot more work than it should be. The project's application.properties file already defines the plugins that I depend on, so I feel like I shouldn't have to manually add all the plugin source dirs and libraries. Also it seems wrong to be adding the plugin source folders to the project, because I don't particularly want to debug into or compile the plugin source code, I just want them to treat them as dependencies, just like the jars in the main project's lib folder. However, this was the only way I could find to get everything compiling within the IDE. Is there a better/easier way?
Despite these complaints, IntelliJ is still the best IDE for Groovy/Grails development.