[MSHADE-413] Maven shade plugin enters endless loop (original) (raw)
Two issues at play here:
- ShadeMojo.createDependencyReducedPom() pulls in origDeps = project.getDependencies() and later modifies these Dependency objects.
- ShadeMojo.updateExcludesInDeps() enters it's own endless loop, endlessly adding the exact same exclusions.
This leads to a reproducible endless loop (see below).
If the Shade plugin's not using the Dependency objects "owned by Maven itself" (by setting promoteTransitiveDependencies to true), the build passes fine.
I think, modifying the Dependency objects "owned by Maven itself" is bad for two reasons (which IMO justify the increased priority of this ticket):
- the reproducible endless loop
- it breaks the correctness of the project build - at least plugins running after the shade goal that use those dependencies.