Hi,
Unfortunately I don't really have a good answer for you. You have listed just about every possible 'refresh' action conceivable.
From STS point of view, doing a 'Grails Tools >> refresh dependencies' refreshes just about everything classpath related on the STS side. If it works right
that should refresh the dependencies in 'Build Path -> Libraries -> Grails Dependencies' as well as the list of plugins and links to plugin source folders.
However, whether this works right in large part depends on Grails itself returning the right information to STS when we call on it.
Since you are working with a 'snapshot' of grails, you should expect some instability...
One thing you haven't done which may be worth doing is to build a proper grails zip distribution:
./gradlew clean zipDist
Then unzip the produced distribution zip. Then configure that as your grails install in STS (Preferences >> Groovy >> Grails)
I'd always recommend using a distiribution zip as it is that type of distribution STS expects. I don't think an install
produced by ./gradle clean install is quite equivalent (layout not quite the same, some stuff may be missing etc.).
Some specific comments to what you wrote:
For example, I just updated grails-core and the new install now supplies groovy-all-1.8.3.jar, not the groovy-all-1.8.3-SNAPSHOT.jar, but I get build path errors:
The archive: /home/wstidolph/src/grails-core/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-1.8.3-SNAPSHOT.jar which is referenced by the classpath, does not exist.
"Grails Tools >> Refresh Dependencies" should fix that, if it doesn't, it is because Grails itself is incorrectly telling STS to use the wrong jar file.
Or sometimes I'll get complaints about missing links:
/home/wstidolph/.grails/2.0.0.BUILD-SNAPSHOT/projects/qdjoint/plugins/jquery-1.6.1.1/grails-app/taglib/JQueryResourceTagLib.groovy
Same as above "Refresh Dependencies" should remedy this.
| Loading Grails 2.0.0.BUILD-SNAPSHOT
| Configuring classpath.
| Environment set to development.....
| Error Fatal error during compilation org.codehaus.groovy.control.MultipleCompilationErr orsException: startup failed:
/home/wstidolph/.grails/2.0.0.BUILD-SNAPSHOT/projects/qdjoint/plugins/resources-1.0.2/./ResourcesGrailsPlugin.groovy: 6: unable to resolve class org.grails.plugin.resource.util.HalfBakedLegacyLin kGenerator
@ line 6, column 1.
import org.grails.plugin.resource.util.HalfBakedLegacyLin kGenerator
^
(followed by a bunch more "unable to resolve" on plugin-supplied classes)
This is most definitely a grails problem since these are messages printed by Grails itself. If this is in the 'grails compile' command that STS is running in service of its refresh dependencies function, then failure of this command also means that the STS refresh dependencies function will not work. Until the grails compile command can run succesfully, STS cannot update its dependency information.
So in this case you somehow have to make grails own state cleaned up. Stuff like "grails clean" and deleting the ${user.home}/.grails folder are good things to try.
* deleting grails install in STS Groovy->Grails prefs and re-adding (the same location)
I don't think that will do very much. I'd recommend actually making sure you build a fresh distribution (./gradlew zipDist) each time you build a new grails snapshot.
* rebuilding project classpath with 'grails integrate-with -eclipse'
This probably does more harm than good. It will blow away all STS/eclipse configuration replacing them with some stuff generated by Grails itself. This isn't quite equivalent to what STS would produce. The stuff generated there is more intended for use without specific grails tool support in a plain eclipse install.
* removing and reinstalled grails extension to STS (presently:STS Version: 2.8.0.SNAPSHOT Build Id: 201110140724 grails plugin 2.8.0.201110140724-SNAPSHOT)
That shouldn't be necessary, and I'd be very surprised if fixed problems with your project's state. (Grails project state is stored inside your project folder and inside the .grails folder, neither of which will be affected by reinstalling STS tooling.)
If you have more questions about specific errors and suggested course of action... please ask.
Kris De Volder -- SpringSource