Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
995 views
in Technique[技术] by (71.8m points)

maven - Gradle download dependency error

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...