Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix maven dependency scope conflicts in Gradle build [SPR-13013] #17604

spring-issuemaster opened this issue May 11, 2015 · 0 comments


None yet
2 participants
Copy link

commented May 11, 2015

Brian Clozel opened SPR-13013 and commented

The build currently fails with:

* What went wrong:
Execution failed for task ':spring-orm:install'.
> Could not publish configuration 'archives'
   > Could not write to file '/opt/bamboo-home/xml-data/build-dir/SPR-PUB-JOB1/spring-orm/build/poms/pom-default.xml'.

Caused by: org.gradle.api.UncheckedIOException: Could not write to file '/opt/bamboo-home/xml-data/build-dir/SPR-PUB-JOB1/spring-orm/build/poms/pom-default.xml'.
        at org.gradle.internal.IoActions$TextFileWriterIoAction.execute(
Caused by: org.gradle.api.InvalidUserDataException: The configuration to scope mapping is not unique. The following configurations have the same priority: [org.gradle.api.artifacts.maven.Conf2ScopeMapping@46b852c, org.gradle.api.artifacts.maven.Conf2ScopeMapping@59d2e9ae]

While trying to write the pom.xml file, gradle is mapping all dependencies to versions + scope for the spring-orm module.
I this case, it's finding several mappings for the same dependency and throws an Exception.

Ensuring unique priority in our gradle plugin should fix the situation.

Reference URL:

mapping.priority + 100, intoConfiguration, mapping.scope)

Referenced from: commits 58d8a81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.