[ https://jira.codehaus.org/browse/MSHADE-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=324817#comment-324817 ]
Scott Carey commented on MSHADE-91: ----------------------------------- How does this solve the ask: {quote} It would therefore be useful if the plugin (specifically the DefaultShader class) provided the option of failing the build if any duplicates are detected. This would be particularly useful in a continuous integration environment where there's no human operator to check the console output for warnings. {quote} How do I configure the shade plugin to fail when there is a duplicate class detected while shading? (I don't see anything on http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html) If there are duplicate classes, a java application on android will fail to run. The VM on Android is very strict. > Allow using external Shader implementation > ------------------------------------------ > > Key: MSHADE-91 > URL: https://jira.codehaus.org/browse/MSHADE-91 > Project: Maven 2.x Shade Plugin > Issue Type: New Feature > Affects Versions: 1.4 > Environment: N/A > Reporter: Andrew Swan > Assignee: Olivier Lamy > Fix For: 1.6 > > Attachments: MSHADE-91.patch > > > Currently if multiple shaded artifacts contain the same fully-qualified class > name, the plugin issues a warning on the console like this: > {code}[WARNING] We have a duplicate foo.bar.Baz.class in > <path-to-jar-in-local-repo>{code} > In many cases such duplicates are a serious problem, e.g. when they are not > the same version of that class. > It would therefore be useful if the plugin (specifically the DefaultShader > class) provided the option of failing the build if any duplicates are > detected. This would be particularly useful in a continuous integration > environment where there's no human operator to check the console output for > warnings. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira