依赖和最新发布 [英] Dependencies and lastest.release

查看:113
本文介绍了依赖和最新发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在使用grails 2.2并试图升级到2.4,但我们遇到了一个问题。
在BuildConfig.groovy中,我们有一些使用latest.release的依赖和插件。
例如:'com.example:myplugin:latest.release'。



在grails 2.2中,这可以按预期工作。在grails 2.4中,我收到一个错误:Error Resolve error obtain dependencies:Could not find artifact ...



我们正在使用最新版本的Artifactory。错误表明grails正在查找正确的位置,但找不到它。



如果我们指定了特定的版本,那么grails会发现它确定。例如:'com.example:myplugin:12.03.01'



从2.2版本开始latest.release有什么变化吗?我们现在应该指定版本号吗?



谢谢。

解决方案

latest.release 语法是Ivy特有的,只能用于Ivy解析器。 Grails 2.4使用了Aether依赖解析器,它是Maven构建工具中的依赖解析引擎。在Maven中,表达最新版本的语法略有不同。请参阅 http://docs.codehaus.org/ display / MAVEN / Dependency + Mediation + and + Conflict + Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges

因此,要获得最新版本的表达式的最低版本,没有上限界。例子:

  compile:feeds:[1.6,)


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.

解决方案

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,)"

这篇关于依赖和最新发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆