setup Grails project with in-place plugins
I have the following directory structure
--my-app
|
|--main-app
|
|--plugins
|
|--plugin1
|
|--plugin2
In grails-app/conf/BuildConfig I've added the necessary configuration to ensure that the plugins are loaded from the
pluginsdirectory, so that when I run the application, it picks up the most recent changes. I'm trying to set this up as a single project in IntelliJ which has 3 modules, one for the main application and one for each of the two plugins. I tried the following:
- Generate the IntelliJ project files
cd my-app/main-app
grails integrate-with --intellij
- Open the generated .ipr file from inside Intellij (File | Open Project...). This adds the main application and plugins as Grails modules
However every time I open a class from a plugin, IntelliJ reports that the class has two occurrences. It seems each plugin class is being detected
- once in the IntelliJ module for the plugin itself
- once in the module that IntelliJ automatically creates which contains all the plugins. In my case, this module is named
main-app-grailsPlugins
In the project structure view I tried removing the content roots for
plugin1and
plugins2from main-app-grailsPlugins, but they get automatically added back again.
Is there a way to prevent this, or some other way of correctly setting up an IntelliJ project for a Grails app with in-place plugins. I'm using Grails 1.3.7 and IntelliJ 10.5.4
请先登录再写评论。