Maven: exclude dependency from shade plugin

Add scope tag in dependency tag with value as 'provided'. It will exclude that dependency. Similar to below dependency


According to http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html, your exclusion syntax is wrong:

Artifacts to include/exclude from the final artifact. Artifacts are denoted by composite identifiers of the general form groupId:artifactId:type:classifier. ... For convenience, the syntax groupId is equivalent to groupId:*:*:*, groupId:artifactId is equivalent to groupId:artifactId:*:* and groupId:artifactId:classifier is equivalent to groupId:artifactId:*:classifier.

So either use com.sun.jersey.contribs:jersey-multipart:*:jar or com.sun.jersey.contribs:jersey-multipart for your exclusion.

               <artifactSet>
                  <excludes>
                     <exclude>com.sun.jersey.contribs:jersey-multipart</exclude>
                   </excludes>
               </artifactSet>