You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (Jira)" <ji...@apache.org> on 2020/01/04 20:35:00 UTC

[jira] [Closed] (MSHADE-311) Bad exclusions in dependency-reduced-pom.xml

     [ https://issues.apache.org/jira/browse/MSHADE-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Heinz Marbaise closed MSHADE-311.
--------------------------------------
    Resolution: Done

> Bad exclusions in dependency-reduced-pom.xml
> --------------------------------------------
>
>                 Key: MSHADE-311
>                 URL: https://issues.apache.org/jira/browse/MSHADE-311
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>         Environment: maven-shade-plugin 3.2.1
> Maven 3.6.0
> JDK 11
>            Reporter: Dmitri Gabbasov
>            Assignee: Karl Heinz Marbaise
>            Priority: Major
>             Fix For: 3.2.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Given the following dependency graph:
> {noformat}
> test:foo:jar:1.0.0-SNAPSHOT
> +- test:foz:jar:1.0.0-SNAPSHOT:compile
> \- test:bar:jar:1.0.0-SNAPSHOT:provided
>    \- test:baz:jar:1.0.0-SNAPSHOT:provided
> {noformat}
> where {{baz}} is a _compile_ scope dependency of {{bar}} (and therefore a _provided_ scope dependency of {{foo}}). And given the following maven-shade-plugin configuration in {{foo}}:
> {noformat}
> <configuration>
>   <artifactSet>
>     <includes>
>       <include>test:foz</include>
>     </includes>
>   </artifactSet>
> </configuration>
> {noformat}
> A weird {{dependency-reduced-pom.xml}} file is produced for {{foo}}, where the {{bar}} dependency declaration gets an exclusion for {{baz}}:
> {noformat}
> <dependencies>
>   <dependency>
>     <groupId>test</groupId>
>     <artifactId>bar</artifactId>
>     <version>1.0.0-SNAPSHOT</version>
>     <scope>provided</scope>
>     <exclusions>
>       <exclusion>
>         <artifactId>baz</artifactId>
>         <groupId>test</groupId>
>       </exclusion>
>     </exclusions>
>   </dependency>
> </dependencies>
> {noformat}
> Such an exclusion is unexpected and seems wrong to me.



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