I am building my JAR file using the shade plugin in order to give me an
all-in-one JAR artifact which contains all dependency JARs. When I build
using "mvn clean install" I always get thousands of message like the
following, indicating that there's a duplicate class file in a JAR in the
repository, which I assume is coming from the shade plugin when it's doing
its thing:
[WARNING] We have a duplicate
net/sf/cglib/util/StringSwitcher$StringSwitcherKey.class in
C:\dev\maven\repository\cglib\cglib-full\2.0.2\cglib-full-2.0.2.jar
Is this something I should worry about or is it just an annoyance to live
with for now? The resulting JAR artifact works well, maybe this is nothing
to worry over, but I want to ask here in case there is something I can fix
which will make these warning messages go away. I can't find anything about
this using Google, etc.
Here's the plugin section from my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>junit:junit</exclude>
</excludes>
</artifactSet>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Thanks in advance for any advice.
--James
--
View this message in context:
http://www.nabble.com/Duplicate-class-warnings-when-using-shade-plugin-tp23951216p23951216.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]