[ https://issues.apache.org/jira/browse/MSHADE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239118#comment-15239118 ]
William Bakker commented on MSHADE-86: -------------------------------------- It seems the dependency exclusion is broken when the 'promoteTransitiveDependencies' parameter is set to true. First, all transitive dependencies are promoted. Then, maven only excludes the dependencies from artifacts you specified. However, the previous step introduced new dependencies on which the exclusions rules do not match. *Example* projectA depends on guava 16.0 projectB depends on guava 17.0 and on projectA projectC depends on guava 18.0 and on projectB, but excludes guava. projectC-shaded shades projectC using promoteTransitiveDependencies projectD depends on guava 19.0 and projectC-shaded. This gives dependency tree: {noformat} [INFO] mshade-86:projectD:jar:1.0-SNAPSHOT [INFO] +- mshade-86:projectC-shaded:jar:1.0-SNAPSHOT:compile [INFO] | +- mshade-86:projectB:jar:1.0-SNAPSHOT:compile [INFO] | | +- (mshade-86:projectA:jar:1.0-SNAPSHOT:compile - omitted for duplicate) [INFO] | | \- (com.google.guava:guava:jar:17.0:compile - omitted for conflict with 18.0) [INFO] | +- mshade-86:projectA:jar:1.0-SNAPSHOT:compile [INFO] | | \- (com.google.guava:guava:jar:16.0:compile - omitted for conflict with 17.0) [INFO] | \- (com.google.guava:guava:jar:18.0:compile - omitted for conflict with 19.0) [INFO] \- com.google.guava:guava:jar:19.0:compile {noformat} *Gist* A full reproduction scenario of this issue has been logged at https://gist.github.com/wjbakker/328a05382e466de7fef3e07fc664d44f > dependencies of excluded dependencies are included > -------------------------------------------------- > > Key: MSHADE-86 > URL: https://issues.apache.org/jira/browse/MSHADE-86 > Project: Maven Shade Plugin > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Benson Margulies > > Please let me know if you need a test case here. > Pom has two executions of shade on separate classifiers. One of them uses > excludes to leave some things out. Final jar includes contents of a slew of > other artifacts. Dependency:tree shows those artifacts as being dependencies > of the excluded artifacts, not the included ones. -- This message was sent by Atlassian JIRA (v6.3.4#6332)