问题
We are currently using grails 2.2 and are trying to upgrade to 2.4, but we have an issue. In BuildConfig.groovy, we have a few dependencies and plugins that use latest.release. For example: 'com.example:myplugin:latest.release'.
In grails 2.2, this would work as expected. In grails 2.4, I receive an error: Error Resolve error obtaining dependencies: Could not find artifact ...
We are using the latest version of Artifactory. The error indicates that grails is looking in the correct location, but cannot find it.
If we specify a specific version then grails finds it ok. For example: 'com.example:myplugin:12.03.01'
Has something changed with latest.release since version 2.2? Should we now specify the version numbers?
Thanks.
回答1:
The latest.release syntax is Ivy specific and only worked with the Ivy resolver. Grails 2.4 uses Aether a dependency resolver which is the dependency resolution engine found in the Maven build tool. In Maven the syntax for expression the latest version is slightly different. See http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges
So to get the latest version you expression a minimum version with no upper bound. Example:
compile ":feeds:[1.6,)"
来源:https://stackoverflow.com/questions/24045849/dependencies-and-lastest-release