[
https://issues.apache.org/jira/browse/MSHADE-305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MSHADE-305.
---------------------------------
Resolution: Not A Problem
Assignee: Robert Scholte
When the pom-files are inherited, Maven is still in action, there's no plugin
in sight yet. This is not just maven-shade-plugin, but effects any plugin.
The configuration merging is purely based on the xml-tags, Maven is not aware
that the artifact-tag could be considered as the primary key for a filter, that
information is not available. You need to instruct the xml how fragments must
be merged.
You found the right solution: {{combine.children="append"}}
> Filters are merged by index, not by artifactId
> ----------------------------------------------
>
> Key: MSHADE-305
> URL: https://issues.apache.org/jira/browse/MSHADE-305
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 3.0.0
> Environment: Maven 3.2.5, Windows&Unix
> Reporter: Chesnay Schepler
> Assignee: Robert Scholte
> Priority: Major
> Attachments: reproducer.zip
>
>
> When filters are defined in both a parent and child module they are merged by
> index, and not by artifactId.
> For example, consider these 2 filters:
> Parent:
> {code}
> <filter>
> <artifact>IDontEvenExist</artifact>
> <excludes>
> <exclude>**</exclude>
> </excludes>
> </filter>
> {code}
> Child:
> {code}
> <filter>
> <artifact>org.apache.flink:IncludedModule</artifact>
> <includes>
> <include>**</include>
> </includes>
> </filter>
> {code}
> Despite the filters being defined for distinct artifacts they are still
> merged into the following filter, which excludes everything from
> {{IncludedModule}}.
> {code}
> <filter>
> <artifact>org.apache.flink:IncludedModule</artifact>
> <includes>
> <include>**</include>
> </includes>
> <excludes>
> <exclude>**</exclude>
> </excludes>
> </filter>
> {code}
> I have attached a reproducer.
> A trivial workaround is to add {{combine.children="append"}} to {{<filters>}}.
> I would expect that either filters are merged by artifactId or at the very
> least a warning is printed if filters are merged this way.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)