Oddity with Grails 2.2 and plugins - IDEA 12.0.1

I started some work, actually creating a Grail plugin in Grails 2.1.x (and probably IDEA 11 - but that's not relevant) and then updgraded to Graisl 2.2 (and IDEA 12, then 12.0.1 - how they do fly by...) - and it's on Xubuntu - again not relevant, really. I then created a new application in Grails 2.2 and used  install-plugin to pick up my own plugin (this is sort-of deprecated - see later)

However there is a problem in Grails 2.2 - nothing to do with IDEA - it's http://jira.grails.org/browse/GRAILS-9703 - but in order to fix it the advice is to clear the ivy-cache directory. Of course that also deleted the copy of my own plugin. Then when I went back into the application IDEA/Grails compiler wasn't happy: it couldn't find my plugin, which is fine, but then neither running install-plugin, nor running uninstall-plugin worked. It came up with plugin not found and the previously seen and always delightful mesage "IDEA hook not found"; of course exiting and reloading IDEA had no effect.

I then decided to try to put my plugin as a dependency in BuildConfig.groovy (which is where it is preferred that they go nowadays - hence the possible loss of the Grails (un)install-plugin comands). And when I did that and ran Build/create grails war it all worked and appears to have found and loaded the plugin - because it's all in the process of development there's nothing to run yet.

I've mentioned this because the problem with the ivy-cache is moderately irritating and if you have your own plugins clearing the cache would, presumably, always have the effect that I've found. Perhaps not deleting your own plugins would avoid the problem, I'm not easily in position to try now.


Please sign in to leave a comment.