You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Ferlito (JIRA)" <ji...@apache.org> on 2016/02/28 11:45:33 UTC

[jira] [Commented] (MSHADE-152) Shade plugin assumes all non-pom dependencies are .zip formatted files and should be on the classpath

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

John Ferlito commented on MSHADE-152:
-------------------------------------

This is still an issue. Attaching a sample file

> Shade plugin assumes all non-pom dependencies are .zip formatted files and should be on the classpath
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MSHADE-152
>                 URL: https://issues.apache.org/jira/browse/MSHADE-152
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Stephen Connolly
>            Assignee: Karl Heinz Marbaise
>         Attachments: pom.xml
>
>
> http://maven.apache.org/plugins/maven-shade-plugin/xref/org/apache/maven/plugins/shade/mojo/ShadeMojo.html#455
> This selects from *all* artifacts, even those which are not addedToClasspath, e.g. see https://github.com/torquebox/jruby-maven-plugins/blob/master/gem-maven-plugin/src/main/resources/META-INF/plexus/components.xml#L89
> The net result is that, for example, if you have a dependency of type gem shade will barf with the ugly
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.0:shade (default) on project shade-gems: Error creating shaded jar: error in opening zip file ~/.m2/repository/rubygems/bundler/1.3.4/bundler-1.3.4.gem -> [Help 1]
> To my mind, the shade plugin should only shade artifacts that are added to the classpath and should ignore all non-classpath artifacts.
> Fixing this may result in breaking backwards compatibility if anyone is relying on the side-effects of the current broken behaviour, so perhaps the solution is to either add a flag, defaulting to false, which would enable the broken behaviour or else allow the explicit includes to pull the files back in... in any case may require a bump to 3.0 when this issue is fixed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)