我正在尝试添加以下依赖项:
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/