Hi,
I am using the shade plugin when doing an mvn assembly:assembly to create an 
uber jar which includes my project and all supporting jars.

The resulting JAR is quite large and when I do a "jar -tvf | grep 
someclassname.class" I always get 2 entries returned for EVERY CLASS. The sizes 
are the same but the dates in the JAR file are different for each unique file 
name.

  1559 Thu Aug 19 11:33:56 EDT 2010 
org/springframework/context/config/ContextNamespaceHandler.class
  1559 Tue Nov 09 16:21:48 EST 2010 
org/springframework/context/config/ContextNamespaceHandler.class

When I extract the JAR I only end up with ONE physical class file on disk.

Regardless this (I think) is causing some sort of class loader issue once this 
is deployed. I get ClassNotFoundExceptions. for this particular class above, 
but 
ONLY in ONE of our JBoss environments.

a) Is my maven shade configuration wrong? Or any other suggestions?

b) Why is my resulting JAR ending up with 2 entries for every class?

Any help appreciated!!!

Config below:

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
            <version>1.4</version>
            <executions>
                  <execution>
                    <phase>package</phase>
                    <goals>
                          <goal>shade</goal>
                    </goals>
                    <configuration>
                          <transformers>
                            <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                  <resource>META-INF/spring.handlers</resource>
                            </transformer>
                            <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                  <resource>META-INF/spring.schemas</resource>
                            </transformer>
                          </transformers>
                          
                          <!-- fixes a security exception with Jar signing, due 
to this signed stuff in the NCSO.jar -->
                          <filters>
                              <filter>
                                
<artifact>NCSO-lotus-domino-8.5:NCSO-lotus-domino-8.5</artifact>
                                <excludes>
                                    <exclude>META-INF/INTERNAT.SF</exclude>
                                    <exclude>META-INF/INTERNAT.RSA</exclude>
                                </excludes>
                            </filter>
                          </filters>
                          
                    </configuration>
                  </execution>
            </executions>
          </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to