Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Maven Shade Plugin example
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
Copy link

stephen-masters commented Nov 16, 2012

Using the shade plugin it's relatively simple to have your build create a single Jar file containing all dependencies. This can simplify deployments greatly and avoids the issues that come of having a lib directory on a server containing loads of Jar files, and you have no idea what version each of them is. This way, you ensure that all the dependencies you tested against in your build are definitely the ones that have been deployed with your code.

I find it particularly handy for FitNesse where I'm able to run a quick script to download the latest version of an artifact from a repository, and I know that what I'm getting includes all the dependencies I need. If a dependency version changes, or is added, I don't need to alter my deployment script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment