Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.3.6
-
Fix Version/s: None
-
Component/s: Configuration, Plugins
-
Labels:None
-
Environment:Windows, maven-publisher, Artifactory
Description
Overview
I think I may have stumbled across a bug in Grails plugin dependency management with grails.project.dependency.resolution in BuildConfig.groovy.
We have a Grails app (our-app) and a plugin (our-plugin). We have this in our-app BuildConfig.groovy:
plugins {
runtime "org.grails.plugins:our-plugin:0.1"
}
We run 'grails run-app' or 'grails war' and it picks up the plugin dependency like we expect. The problem comes when we move to a new version of the plugin:
plugins {
runtime "org.grails.plugins:our-plugin:0.2-SNAPSHOT"
}
Now when we do 'grails run-app' or 'grails war', it still picks up the 0.1 version of our-plugin. We look in .grails/1.3.6/projects/our-app/plugins and still see our-plugin-0.1. We can work around this by removing this directory prior to running 'grails run-app' or 'grails war', but it seems like something Grails should be handling.
Steps to recreate with attached Grails app and plugin:
our-plugin
set Artifactory server in BuildConfig.groovy, change <artifactory server CHANGE ME> to your server
set version to 0.1 in OurPluginGrailsPlugin.groovy:
// the plugin version def version = "0.1"
grails package-plugin
grails maven-deploy --repository=artifactoryRelease
our-app
set Artifactory server in BuildConfig.groovy, change <artifactory server CHANGE ME> to your server
set plugin dependency in BuildConfig.groovy:
plugins {
runtime "org.grails.plugins:our-plugin:0.1"
}
grails run-app
With a browser, view
http://localhost:8080/our-app/
See:
Installed Plugins
ourPlugin - 0.1
our-plugin
set version to 0.2-SNAPSHOT in OurPluginGrailsPlugin.groovy:
// the plugin version def version = "0.2-SNAPSHOT"
grails package-plugin
grails maven-deploy --repository=artifactorySnapshot
our-app
set plugin dependency in BuildConfig.groovy:
plugins {
runtime "org.grails.plugins:our-plugin:0.2-SNAPSHOT"
}
grails run-app
With a browser, view
http://localhost:8080/our-app/
See:
Installed Plugins
ourPlugin - 0.1 (!!! Should be 0.2-SNAPSHOT !!!)
NOTE:
.grails/1.3.6/projects/our-app/plugins/our-plugin-0.1 does not get changed to our-plugin-0.2-SNAPSHOT. A workaround for the problem is to delete .grails/1.3.6/projects/our-app/plugins/our-plugin-0.1 before 'grails run-app'.
This problem did not occur when moving from 0.2-SNAPSHOT to 0.2, or from 0.2 directly to 0.3, so there must be something going on with the way Grails is recognizing a plugin dependency version change when there is a non-numeric tag.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits