Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...