maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Phillips (JIRA)" <>
Subject [jira] (MSHADE-128) Too many warnings "We have duplicates"
Date Mon, 15 Oct 2012 20:16:36 GMT


David Phillips commented on MSHADE-128:

This isn't a duplicate of MSHADE-126, which is bug that generates false warnings. Rather,
this issue is about improving the messages for legitimate warnings.

Please re-open and apply the patch. This is a huge improvement! 
> Too many warnings "We have duplicates"
> --------------------------------------
>                 Key: MSHADE-128
>                 URL:
>             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

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message