views:

148

answers:

3

I haven't really done much on this side of project development so please forgive the ignorance.

We use SpringSource Tool Suite (STS) and commit ("promote") our codes to a version controller (Accurev). Thing is, we didn't promote our .classpath and .project after the first time to the repository (due to hardcoded paths inserted by the IDE during the installation of plugins) so when we pull in the project to a new machine or workspace, we can't seem to resolve our plugins.

Take for example the Acegi plugin (now Spring Core Security). Even if we do "Grails Tools > Refresh Dependencies", nothing happens and if you check out the .classpath and .project, it doesn't have the necessary paths to the plugins so much so that the source codes would be riddled with errors stating that the so and so class could not be resolved... but the project will still run if you execute "grails run-app".

Worst case yet is we had 2 versions of the plugin installed (as we saw it defined in application.properties)...

Any tips on how to resolve this? I know I've read up on Maven and/or putting up a separate repository for the plugins and pointing the paths there but I just don't know where to start.

Any help would be seriously appreciated!



UPDATE 2010/8/18:

Went to this site and followed the suggestion -> Click here

I've actually read this blog before but I didn't follow it then because I seem to always break my STS when updates are installed ;p Anyway, all I did was install the newer Grails support, hit Refresh Dependencies and... things got fixed. Well, the paths in the .project file are hardcoded to absolute paths but it got the job done...

Well, if anyone has other (and better) solutions to share, I'm all ears! =) Thanks again!

A: 

Try this plugin for creating .classpath and .project files: http://www.grails.org/plugin/eclipse-scripts

FlareCoder
thanks! will look into this! =)
callie16
hmm... seems like i'm running some problems with connections to repositories here... can't seem to get it to work at the moment :(
callie16
A: 

grails has very ugly dependency management... it will be changed on 1.3.5 or closer to 2.0.0 release.

In your case, i'll suggest you to use STS provided Grails installation or manually add plugins folders as source folders (new STS partially solves this problem but not at all).

FlareCoder suggested right solution to.

Olexandr
haha ya, kinda figured it would be something like that... thanks!
callie16
A: 

this might be relevant depending on your grails versions:

Plugin Changes

Since 1.1, Grails no longer stores plugins inside your PROJECT_HOME/plugins directory by default. This may result in compilation errors in your application unless you either re-install all your plugins or set the following property in grails-app/conf/BuildConfig.groovy:

grails.project.plugins.dir="./plugins"

Ray Tayek
yup true... actually, i only started using grails when 1.2.0 came out... thing is, when we pull in the project from the repository and run the app, the plugins do get re-installed... except that the paths don't get updated anywhere so STS complains that it can't resolve so-and-so package etc. (but you can run the app nonetheless! lol) especially for acegi and hibernate... will try your suggestion though, thanks!
callie16