This page provides a space for users to contribute examples, errata, tips and other useful information about the Maven Shade Plugin. Everybody is invited to share his/her thoughts about the plugin to help the community to improve it.
Note: Please do not use this page to report bugs or feature requests. Instead, please fill in an issue in the issue tracking system listed in the official plugin documentation.
Thanks!
– The Maven Team
Doing this and that:
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.3</version>
<configuration>
<!-- your example configuration here -->
</configuration>
</plugin>
</plugins>
</build>
</project>
|
You need to have maven name the original jar file created during the default jar phase differently than the final output jar created by the shade plugin.
In your pom.xml, do this (note the tmp suffix):
...
<!-- ******************************************************** -->
<!-- The intermediate JAR file must be named differently than -->
<!-- the shade output JAR file to prevent duplicate warnings. -->
<!-- ******************************************************** -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<finalName>${artifactId}-${version}-tmp</finalName>
</configuration>
</plugin>
...
|
You need to ...