maven - Gradle下载依赖错误

我正在尝试添加以下依赖项:

compile group: 'com.cedarsoft.commons', name:'test-utils', version:'5.0.9'

Gradle 下载了几个 jar,然后我收到以下错误:

POM relocation to an other version number is not fully supported in Gradle : xml-apis#xml-apis;2.0.2   relocated to xml-apis#xml-apis;1.0.b2.
Please update your dependency to directly use the correct version 'xml-apis#xml-apis;1.0.b2'.
Resolution will only pick dependencies of the relocated element.  Artifacts and other metadata will    be ignored.

任何想法为什么以及如何解决这个问题?

最佳答案

configurations.all {
    resolutionStrategy {
        force 'xml-apis:xml-apis:1.4.01'
    }
}

或使用 1.0.b2。问题是 xml-apis 的 POM 将 2.0.2(如 khmarbaise 所写)重定向到同一组和人工制品,只有版本是 1.0.b2,这以某种方式欺骗了 Gradle(或底层 Ivy)解析机制。

感谢 Mark Petrovic Gradle Forum

https://stackoverflow.com/questions/22613596/

相关文章:

build - Gradle 的术语评估和执行之间的区别

build - 是否可以将命令行变量传递给 bitbake 构建?

android - 我已将 Android SDK 更新为 rev。昨天 22 日,工具中没有 ap

deployment - 从不同的文件夹运行 ant exec 任务

android - Gradle DSL 方法未找到 : "classpath()"

visual-studio-2010 - VS2010 : Exclude a project fr

java - ANT:如何将 "add"路径元素从一条路径转换为第二条路径?

gradle - 用gradle复制树并改变结构?

c++ - 在 Eclipse 中设置构建输出目录 - c++

android - 我可以在不运行 Android Studio 时删除这些构建文件夹吗?