apache / apache/maven-shade-plugin

[MSHADE-206] Multi-module builds don't pick up dependency-reduced-pom.xml

Open
#278 9 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
188
Forks
103
Avg merge
16h 39m
Merged PRs (30d)
4

Description

**[Robert Joseph Evans](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=revans2)** opened **[MSHADE-206](https://issues.apache.org/jira/browse/MSHADE-206?redirect=false)** and commented

I'm not sure if there is a good solution for this or not. As part of the Apache Storm project we are trying to shade a lot of dependencies for the core platform (storm-core), but we also have other modules in the same build that depend on storm-core, but use the shade plugin to create an uber jar for deployment. The problem is that if we build all of the modules at once and let maven handle resolving dependencies the uber jar projects don't see storm-core's dependency-reduced-pom.xml. They see the original pom.xml and end up not packaging dependencies that they need.

Our "fix" for this https://github.com/apache/storm/pull/736 is to split the build up into two phases. One that just builds storm-core and another that builds the rest. This is going to be a real pain for developers. Are we doing something wrong? Is this working as expected?

I am happy to submit a fix for this, but I am far from an expert on maven so if someone in this project sees a direction that I can go in to fix this I would appreciate any guidance you might have.

---

**Issue Links:**
- [FLINK-3158](https://issues.apache.org/jira/browse/FLINK-3158) Shading does not remove google guava from flink-dist fat jar

- [MSHADE-326](https://issues.apache.org/jira/browse/MSHADE-326) Hide shaded dependencies from the rest of the reactor build

- [MNG-5899](https://issues.apache.org/jira/browse/MNG-5899) Reactor is no longer using the dependency reduced pom created by maven-shade-plugin
(_**"depends upon"**_)

10 votes, 13 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the multi-module Maven reactor build described for storm-core and its dependent uber-jar modules, comparing dependency resolution with and without dependency-reduced-pom.xml. Read the linked MSHADE-326 and MNG-5899 context before deciding whether the behavior belongs in the shade plugin or Maven. Done means the reactor consistently exposes the intended reduced dependencies without requiring separate build phases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.