You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thomas Mortagne (JIRA)" <ji...@apache.org> on 2016/11/17 16:10:59 UTC

[jira] [Commented] (MSHADE-240) pom.properties and pom.xml descriptors should be removed from relocated shaded jars

    [ https://issues.apache.org/jira/browse/MSHADE-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15674093#comment-15674093 ] 

Thomas Mortagne commented on MSHADE-240:
----------------------------------------

Note: I can try to implement it if I'm not the only one thinking it would be nice and with some pointers of where it would be the cleanest to do that (I was thinking about somewhere in DefaultShader#shadeJars) :)

I would suggest skip those files if there is any relocation (i.e. the jar is missing stuff and can't be considered the same anymore) but keep them if nothing is modified (jar merged as it is).

> pom.properties and pom.xml descriptors should be removed from relocated 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
>
> 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)