[ https://issues.apache.org/jira/browse/MSHADE-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833119#comment-15833119 ]
Thomas Mortagne edited comment on MSHADE-240 at 1/21/17 7:38 PM: ----------------------------------------------------------------- bq. I know cases where these files are searched for on the classpath Yes my use case is exactly about that. But what you don't seems to understand is that in case of relocation these files don't match what is in the jar anymore. Again as I explained in the issue description those files are misleading any tools that search for those files to find out what is in the JAR. In other words since the JAR does not contain the classes of somegroupid:someartifactid:someversion it should not contain a descriptor indicating it's somegroupid:someartifactid:someversion because it's simply not true anymore. was (Author: tmortagne): bq. I know cases where these files are searched for on the classpath Yes my use case is exactly about that. But what you don't seems to understand is that this in case of relocation these files don't match what is in the jar anymore. Again as I explained in the issue description those files are misleading any tools that search for those files to find out what is in the JAR. > 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)