directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Arnaud Marcelot (JIRA)" <>
Subject [jira] [Commented] (DIRSERVER-1878) Bad warning from 'maven-shade-plugin' when creating the 'apacheds-service' jar
Date Mon, 29 Jul 2013 15:19:48 GMT


Pierre-Arnaud Marcelot commented on DIRSERVER-1878:

After some time "debugging" the issue in the Maven build, here's what I found so far.

The KerberosDecoder and KerberosEncoder classes are defined in the 'apacheds-kerberos-codec'
project, package ''.

The problem seem to be located in the 'apacheds-protocol-kerberos' project.

This project does not contain any source for KerberosDecoder or KerberosEncoder classes and
we can't find any trace of those compiled classes in the 'target/classes' directory.
However, the generated jar includes those classes.

It may related to the fact that this project depends on 'apacheds-kerberos-codec' and also
defines a package of the name ''.
In the pom.xml, the build definition for the 'maven-bundle-plugin' indicates to export all
local packages and I believe this is why the 2 classes are present in the resulting jar.

The fact that both project share the same package name is probably misleading.

I was able to verify most of that by removing the manifest generation (done by the 'maven-bundle-plugin').
When the manifest generation isn't present in the pom.xml, the two classes are not there in
the resulting jar.

The best thing we could probably do to solve this issue is to avoid colliding package names.
> Bad warning from 'maven-shade-plugin' when creating the 'apacheds-service' jar
> ------------------------------------------------------------------------------
>                 Key: DIRSERVER-1878
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M14
>            Reporter: Pierre-Arnaud Marcelot
>             Fix For: 2.0.0-RC1
> The 'maven-shade-plugin' reports a bad warning when creating the 'apacheds-service' jar:
> [WARNING] apacheds-protocol-kerberos-2.0.0-M15-SNAPSHOT.jar, apacheds-kerberos-codec-2.0.0-M15-SNAPSHOT.jar
define 2 overlappping classes: 
> [WARNING]   -
> [WARNING]   -
> [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
For more information on JIRA, see:

View raw message