摇篮下载相关性错误 [英] Gradle download dependency error

查看:1001
本文介绍了摇篮下载相关性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加以下依赖性:

 编译组:com.cedarsoft.commons',名称:测试-utils的版本:5.0.9

摇篮下载了几个罐子,然后我得到了以下错误:

  POM搬迁到其他版本号是不是在摇篮完全支持:XML的API#XM​​L的API; 2.0.2搬迁到XML的API#XM​​L的API; 1.0.b2 。
请更新您的依赖直接使用正确的版本XML的API#XM​​L的API; 1.0.b2。
分辨率只挑迁移元素的依赖关系。工件和其他元数据将被忽略。

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


解决方案

  configurations.all {
    resolutionStrategy {
        力'XML的API:XML的API:1.4.01
    }
}

或者使用1.0.b2。问题是,有XML的API的POM重定向为2.0.2(如khmarbaise写)到同一个组,加工过的食品,唯一的版本是1.0.b2,这在某种程度上傻瓜摇篮(或潜在的常春藤)解决机制。

要归功于马克·彼得罗维奇<一个href=\"http://forums.gradle.org/gradle/topics/oddity_in_the_output_of_dependencyinsight_task?utm_content=reply_link&utm_medium=email&utm_source=reply_notification#reply_13104153\">Gradle论坛

I'm trying to add the following dependency:

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

Gradle downloads a couple of jars and then I'm getting the following error:

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.

Any ideas why and how to solve this issue?

解决方案

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

Or use 1.0.b2. The issue is that there POM of xml-apis redirects for 2.0.2 (as khmarbaise wrote) to the same group and artefact, only version being 1.0.b2, which somehow fools Gradle (or underlying Ivy) resolution mechanism.

The credit goes to Mark Petrovic Gradle Forum

这篇关于摇篮下载相关性错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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