You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2017/01/20 16:38:26 UTC
[jira] [Closed] (MSHADE-240) support relocation pom.properties and
pom.xml descriptors in shaded jars
[ https://issues.apache.org/jira/browse/MSHADE-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MSHADE-240.
---------------------------------
Resolution: Fixed
Assignee: Robert Scholte
Fix Version/s: 3.0.0
I haven't activated it by default, but at least it is now a lot easier to achieve using the following relocator:
{code:xml}
<relocation>
<pattern>META-INF/maven</pattern>
<shadedPattern>META-INF/shade/maven</shadedPattern>
<excludes>
<exclude>META-INF/maven/${project.groupId}/${project.artifactId}/pom.*</exclude>
</excludes>
</relocation>
{code}
> support relocation pom.properties and pom.xml descriptors in shaded jars
> ------------------------------------------------------------------------
>
> Key: MSHADE-240
> URL: https://issues.apache.org/jira/browse/MSHADE-240
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 2.4.3
> Reporter: Thomas Mortagne
> Assignee: Robert Scholte
> Fix For: 3.0.0
>
>
> When using shade plugin to embbed (and relocate to be safe) some dependency the final jar ends up with the dependency {{/META-INF/maven/<groupid>/<artifactid>/*}} files.
> The problem is that in the final jars those files essentially become a lie for any tools looking at those descriptors to find out what the jar contains and you end up with false positive.
> Ideally they should be stripped when relocating a dependency since it means the jar does not contain what is indicated in those files anymore, only something that happen to have the same feature but with completely different packages (so unusable). An alternative is to move them in some other place like {{/META-INF/shade/maven/<groupid>/<artifactid>/*}} for example, so that you still keep information about what has been shaded.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)