You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Moritz W (Jira)" <ji...@apache.org> on 2021/05/21 11:51:00 UTC

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

Moritz W created MSHADE-392:
-------------------------------

             Summary: Exclude dependencies marked as optional except the ones of the shaded project/module itself
                 Key: MSHADE-392
                 URL: https://issues.apache.org/jira/browse/MSHADE-392
             Project: Maven Shade Plugin
          Issue Type: Improvement
            Reporter: Moritz W


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:
{code:java}
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <optional>true</optional>
</dependency>{code}
 

Project B:
{code:java}
<dependency>
    <groupId>my.group,id</groupId>
    <artifactId>Project A</artifactId>
    <optional>true</optional>
</dependency>{code}
 

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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)