apache / apache/maven-shade-plugin
[MSHADE-326] Hide shaded dependencies from the rest of the reactor build
- Dominant language
- Java
- Stars
- 188
- Forks
- 103
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 4
Description
**[Niels Basjes](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nielsbasjes)** opened **[MSHADE-326](https://issues.apache.org/jira/browse/MSHADE-326?redirect=false)** and commented
When building a multi module project the following effect occurs:
1) A module with functionality is build ("library") that shades (and relocates) some of the dependencies into the jar file. With https://issues.apache.org/jira/browse/MSHADE-36 in place this jar file has the correct transitive dependencies specified in the jar.
2) However when another module in the same project ("tool") uses that library the reactor will NOT look at the dependencies specified in the jar of the library. It will look at the dependencies specified in the original pom.xml of the library.
The effect is that the "tool" will have all dependencies of the "library" twice: Once from the library jar (possibly relocated) and once from the transitive dependencies passed on via the reactor.
Proposed change:
1) Extra flag to enable this feature
2) If enabled the dependencies in the reactor are modified to match the dependencies in the actual jar file.
---
**Affects:** 3.2.1
**Issue Links:**
- [MSHADE-206](https://issues.apache.org/jira/browse/MSHADE-206) Multi-module builds don't pick up dependency-reduced-pom.xml
**Remote Links:**
- [GitHub Pull Request #26
](https://github.com/apache/maven-shade-plugin/pull/26)
- [GitHub Pull Request #483
](https://github.com/apache/maven/pull/483)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing MSHADE-326 and the linked MSHADE-206 issue, then compare the reactor behavior discussed in GitHub pull requests #26 and Maven #483. Done means an opt-in change makes reactor dependencies match the shaded jar rather than exposing the original dependencies, without affecting builds when the flag is disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100