[ https://jira.codehaus.org/browse/MSHADE-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=323234#comment-323234 ]
Bob Tiernay commented on MSHADE-128: ------------------------------------ Bump (in the most polite manner possible :) > Too many warnings "We have duplicates" > -------------------------------------- > > Key: MSHADE-128 > URL: https://jira.codehaus.org/browse/MSHADE-128 > Project: Maven 2.x Shade Plugin > Issue Type: Improvement > Affects Versions: 1.7.1 > Reporter: Raffaele > Assignee: Benson Margulies > Attachments: pom.xml, warning-we-have-duplicates.patch > > > When creating an uberjar, sometimes the same class is present in two or more > dependencies' JARs. For each class, maven-shade-plugin issues a WARNING We > have a duplicate in. > This is annoying and can muddle newcomers up (like myself), because it's not > clear how to fix. > I don't know if a programmatic solution to these warnings could exist: maybe > it will always require human interaction. However, it's better to point users > in the right direction and not spit out thousands of useless warnings. > Attached is a pom which triggers thousands of warnings and a patch with a > prettier (and hopefully more useful) output like > [WARNING] bcprov-jdk14-138.jar, bcprov-jdk14-1.38.jar define 1292 > overlappping classes: > [WARNING] - org.bouncycastle.asn1.ocsp.ResponderID > [WARNING] - org.bouncycastle.crypto.params.DSAPublicKeyParameters > [WARNING] - org.bouncycastle.crypto.engines.DESEngine > [WARNING] - org.bouncycastle.jce.provider.JCEElGamalPrivateKey > [WARNING] - org.bouncycastle.jce.provider.JCEStreamCipher$Skipjack_CFB8 > [WARNING] - org.bouncycastle.jce.provider.JCESecretKeyFactory > [WARNING] - org.bouncycastle.i18n.filter.UntrustedInput > [WARNING] - org.bouncycastle.asn1.x9.X962NamedCurves$5 > [WARNING] - org.bouncycastle.jce.X509KeyUsage > [WARNING] maven-shade-plugin has detected that some .class files > [WARNING] are present in two or more JARs. When this happens, only > [WARNING] one single version of the class is copied in the uberjar. > [WARNING] Usually this is not harmful and you can skeep these > [WARNING] warnings, otherwise try to manually exclude artifacts > [WARNING] based on mvn dependency:tree -Ddetail=true and the above > [WARNING] output > [WARNING] See http://docs.codehaus.org/display/MAVENUSER/Shade+Plugin -- 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