apache / apache/maven-shade-plugin

[MSHADE-392] Exclude dependencies marked as optional except the ones of the shaded project/module itself

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

Description

**[Moritz W](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=enwi)** opened **[MSHADE-392](https://issues.apache.org/jira/browse/MSHADE-392?redirect=false)** and commented

Dependencies that are marked as optional should not be included in the shaded jar of a project/module except for the ones specifcially specified in the project (these, even if optional, should be included)

Example:

Project A:

```java

org.apache.poi
poi-ooxml
true

```

Project B:

```java

my.group,id
Project A
true

```

 

Now when shading Project B the dependency of Project A (poi) should not be included, but the depedency "Project A" should.

---
No further details from [MSHADE-392](https://issues.apache.org/jira/browse/MSHADE-392?redirect=false)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Project A and Project B dependency setup described in the issue and inspect how shading resolves optional dependencies. Done means Project A's optional dependency is excluded when shading Project B, while Project A itself remains included because it is directly specified there.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.