Plugin sources not automatically added to classpath

Hi,

I noticed that when installing a plugin in Grails, the project sources (Java and Groovy) are not automatically added to the main classpath. For example, if you install the Grails Rich UI, and open the GoogleMapsTagLib, you'll notice that the Render class is marked as an error, though it can be found in the plugins/richui-0.2/src/groovy/.../renderer directory.

Erik

6 comments
Comment actions Permalink

What plugin version do you use? In 1.5 branch we added a feature to automatically add plugin sources and libraries upon plugin installation.

Eugene.

0
Comment actions Permalink

Ah, maybe I'm using the older version (I'm still on the 7.0.2 branch).

Thanks for the answer!

0
Comment actions Permalink

Sorry to bring this old thread up again.

I am using IDEA 8.1.3. When I change the grails complied classes ouput directory, grails.work.dir, to a custom directory instead of the default user home directory, IDEA failed to include the source of the plugin. It seems current version of IDEA only looks into the user home directory for plugins associated with a grails project. Because of this behavior, the Grails Plugin dialog in IDEA also failed to register any installed plugins if they are not complied and located in the default directory (in vista, it is c:/user/username/.grails/...).

Please comment. Thanks.

0
Comment actions Permalink

It seems current version of IDEA only looks into the user home directory
for plugins associated with a grails project. Because of this behavior,
the Grails Plugin dialog in IDEA also failed to register any installed
plugins if they are not complied and located in the default directory (in
vista, it is c:/user/username/.grails/...).


Now there are two places where Grails Plugin Dialog looks for installed
plugins:
1. //projects//plugins, where GrailsWorkDir is c:/users/username/.grails/ by default 2. ]]>/plugins, where ProjectDir is the path where the project
files were placed.

--
Maxim Medvedev
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"

0
Comment actions Permalink

Maxim,

need some more clarifications.

Assuming the project is at: \myproject\project_a\. Therefore, it contains following directory structure,
\myproject\project_a\.settings\
\myproject\project_a\grails-app\
\myproject\project_a\scripts\
...
(and the rest of directories generated by the Grails script)

And I have configured Grails to output compiled class files to \tmp\.grails\. Therefore, all compiled class and plugins files associated project_a are located at,
\tmp\.grails\projects\project_a\classes\
\tmp\.grails\projects\project_a\plugins\
\tmp\.grails\projects\project_a\resources\

Based on my understaning of your previous response, current version of IDEA Grails plugin dialog looks in the default user home directory as well as \myproject\project_a\plugins\ for installed plugins associated with the project?

If the above is true, my question is why? Shouldn't IDEA looks into the \tmp\.grails\projects\project_a\plugins\, instead of \myproject\project_a\plugins\ (Grails install-plugin script only copy plugin to \tmp\.grails\projects\project_a\plugins\).

Please comment.

0
Comment actions Permalink

Based on my understaning of your previous response, current version of
IDEA Grails plugin dialog looks in the default user home directory as well
as \myproject\project_a\plugins\ for installed plugins associated with the
project?


Yes, your understanding is right =)

If the above is true, my question is why? Shouldn't IDEA looks into the
\tmp\.grails\projects\project_a\plugins\, instead of
\myproject\project_a\plugins\ (Grails install-plugin script only copy
plugin to \tmp\.grails\projects\project_a\plugins\).


Unfortunately now IDEA always thinks that ".grails" directory is placed in
user home direcoty (c:\users\userName\ in Vista).
So I can advice you
1. not to change grails output directory
2. to put plugins in the project directory (project_a\plugins)
3. change your userHomeDirectory to "\tmp".

--
Maxim Medvedev
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.