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

Gradle does not report classpath conflicts when loading plugins #19457

Open
britter opened this issue Dec 30, 2021 · 0 comments
Open

Gradle does not report classpath conflicts when loading plugins #19457

britter opened this issue Dec 30, 2021 · 0 comments

Comments

@britter
Copy link
Member

britter commented Dec 30, 2021

When several plugins request different incompatible versions of the same library, Gradle does not report this as an error. Instead the build fails with runtime a runtime error.

Expected Behavior

If several plugins depend on incompatible versions of the same library, Gradle should report this as an error.

Current Behavior

Gradle silently selects one version of the library which causes errors at build time.

Context

This was reported as britter/maven-plugin-development#65 but it turned out to be plugin classpath issue. The reporter applied maven-plugin-development plugin together with several other plugins that depend on the com.thoughtworks.qdox:qdox module. maven-plugin-development plugin depends on com.thoughtworks.qdox:qdox:2.0-M5 and defines this as a constraint: https://github.com/britter/maven-plugin-development/blob/f710c414301386ef52b477a738119b148a866e87/subprojects/plugin/build.gradle.kts#L58-L62. Several other plugins depend on com.thoughtworks.qdox:qdox:1.12.1. See https://scans.gradle.com/s/6zdhoqgumbhcs/build-dependencies?dependencies=qdox&expandAll&focusedDependency=WzEsMCwxNTgsWzEsMCxbMV1dXQ&focusedDependencyView=versions

The only way to fix this is removing conflicting plugins from the using build.

The only way to fix this in maven-plugin-development is to relocate all plugin dependencies.

Steps to Reproduce

See britter/maven-plugin-development#65 (comment)

Your Environment

Build scan URL: https://scans.gradle.com/s/6zdhoqgumbhcs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants