grails/grails-core — pull request #202 by jdpgrailsdev (2012-05-16 16:09:04+00:00)
Title: Inline Plugins and SNAPSHOT/Updated Plugin Dependencies

This pull request contains a fix for a bug that causes your inline plugin to be deleted if Grails determines the associated .zip of the plugin is newer (thus causing the code to remove the "previous" version of the dependency from disk and "install" the new zip). This is not the desired behavior when running with an inline plugin (you want the inline plugin to take precedence over any updates to the actual packaged version of that plugin). Admittedly, this is an edge case created by a scenario where you build and publish the plugin, but have developers run with the plugin inline so that they can make local changes and test them before committing to the plugin project itself. This fix does still leave one hole: it does NOT remove the installed packaged plugin's src directories from the classpath, which can result in an error when enabling the inline plugin after running at least once with the packaged plugin. The work around for this scenario is to let grails run-app fail, and then re-run (as now the packaged plugin is removed and will not have its src folders from the expanded plugin added to the classpath). If I could be pointed to where this is done in the scripts/bootstrap code, I would be happy to fix that case as well (i.e. don't add the installed packaged plugin's src folders to the classpath IF the plugin is also configured to be inline).