Dependencies and lastest.release

谁说我不能喝 提交于 2019-12-10 10:58:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!