grails duplicate plugin issue

I have a grails 1.3.5 project which I was working on with Intellij 9.  I just downloaded Intellij 10 and re-imported the grails project.  I'm using 3 plugins in the grails project (hibernate, jquery, tomcat).  For some reason, all 3 of these are showing up twice.  When I view the project in project mode, I can see that each plugin is being referenced in the {project_home}/plugins directory as well as a {user_home}/.grails/1.3.5/projects/{project_name}/plugins directory.  This is causing problems when I try to run anything within intellij:

Invalid duplicate class definition of class JQueryResourceTagLib: The sources /home/user/dev/grails/project/plugins/jquery-1.4.3.2/grails-app/taglib/JQueryResourceTagLib.groovy and /home/user/.grails/1.3.5/projects/project/plugins/jquery-1.4.3.2/grails-app/taglib/JQueryResourceTaglib.groovy are containing both a class of the name JQueryResourceTagLib.

From the command line, I'm not having any problems, and this problem was not seen in the Intellij 9 release.   I've tried deleting a duplicate reference by highlighting it in the project view, but it remains.  How do I solve this problem with intellij 10?

2 comments
Comment actions Permalink

Just to further refine what the problem is.  I can open up the Project Structure from IDEA and select Modules under Project Settings.  If I then choose the grailsPlugins I see 6 Content Roots listed:

/home/darren/.grails/1.3.5/projects/reportProject/plugins/hibernate-1.3.5
/home/darren/.grails/1.3.5/projects/reportProject/plugins/jquery-1.4.3.2
/home/darare/.grails/1.3.5/projects/reportProject/plugins/tomcat-1.3.5
/home/darren/predev/grails/reportProject/plugins/hibernate-1.3.5
/home/darren/predev/grails/reportProject/plugins/jquery-1.4.3.2
/home/darren/predev/grails/reportProject/plugins/tomcat-1.3.5

Each of these entries has an X to the right of the name that says "Remove Content Entry" when you hover above it.  Using Idea 10.0, I've tried deleting the first three in the list (those coming from the /home/darren/.grails directories).  After confirming the removal and pressing apply then ok, I can go back into the settings area and all three entries come right back.

With the latest 9.x relase of Idea, I am able to go into the settings area and delete the duplicate entries permantently which solves this issue. The only workaround I can find for 10 is to select the root of the undesired plugin and click on the excluded folder icon, which does allow compilation.

0
Comment actions Permalink

Why do you have two copy of each plugin? Can you remove '%PROJECT_ROOT%/plugins' folder?
I have created issue: http://youtrack.jetbrains.net/issue/IDEA-63583, I will fix it in IDEA 10.0.2

As workaround you can set JVM parameter 'grails.disable.structure.update=true' to disable any automatically project modifications.
To set this JVM parameter add following line to %IDEA_HOME%/bin/idea.vmoptions
-Dgrails.disable.structure.update=true

0

Please sign in to leave a comment.