[jira] [Commented] (DIRSERVER-1878) Bad warning from 'maven-shade-plugin' when creating the 'apacheds-service' jar
[ https://issues.apache.org/jira/browse/DIRSERVER-1878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13722528#comment-13722528 ] 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 'org.apache.directory.server.kerberos.protocol.codec'. 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 'org.apache.directory.server.kerberos.protocol.codec'. 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: https://issues.apache.org/jira/browse/DIRSERVER-1878 > 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] - > org.apache.directory.server.kerberos.protocol.codec.KerberosDecoder > [WARNING] - > org.apache.directory.server.kerberos.protocol.codec.KerberosEncoder > [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
[jira] [Commented] (DIRSERVER-1878) Bad warning from 'maven-shade-plugin' when creating the 'apacheds-service' jar
[ https://issues.apache.org/jira/browse/DIRSERVER-1878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13722523#comment-13722523 ] Pierre-Arnaud Marcelot commented on DIRSERVER-1878: --- Here's the complete output of the build for the 'apacheds-service' project: [INFO] [INFO] Building ApacheDS All 2.0.0-M15-SNAPSHOT [INFO] [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ apacheds-all --- [INFO] Deleting /Users/pajbam/Development/Apache/trunks/apacheds/all/target [INFO] [INFO] --- maven-remote-resources-plugin:1.2.1:process (default) @ apacheds-all --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ apacheds-all --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/pajbam/Development/Apache/trunks/apacheds/all/src/main/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ apacheds-all --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ apacheds-all --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/pajbam/Development/Apache/trunks/apacheds/all/src/test/resources [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ apacheds-all --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.15:test (default-test) @ apacheds-all --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ apacheds-all --- [INFO] Building jar: /Users/pajbam/Development/Apache/trunks/apacheds/all/target/apacheds-all-2.0.0-M15-SNAPSHOT.jar [INFO] [INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ apacheds-all --- [INFO] [INFO] --- maven-shade-plugin:2.1:shade (default) @ apacheds-all --- [INFO] Including org.apache.directory.server:apacheds-core:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-core-shared:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-admin:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-authn:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-authz:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-changelog:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-collective:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-event:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-exception:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-journal:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-normalization:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-operational:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-referral:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-schema:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-subtree:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.server:apacheds-interceptors-trigger:jar:2.0.0-M15-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.api:api-ldap-extras-trigger:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including commons-lang:commons-lang:jar:2.6 in the shaded jar. [INFO] Including org.apache.directory.api:api-ldap-codec-core:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.api:api-ldap-extras-util:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.api:api-ldap-model:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including antlr:antlr:jar:2.7.7 in the shaded jar. [INFO] Including org.apache.directory.api:api-ldap-schema-data:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including org.apache.directory.api:api-util:jar:1.0.0-M20-SNAPSHOT in the shaded jar. [INFO] Including bouncycastle:bcprov-jdk15:jar:140 in the shaded jar. [INFO] Including org.apache.dir