Create executable jar package with dependencies

Lately I wrote myself some small GUI tools using Groovy’s SwingBuilder. To “install” them in my system I wanted to create a single JAR file containing all the required dependencies. Using the following maven plugin configuration it was very easy to achieve that:

[code language=”html”]

Running the mvn assembly:assembly command created the desired JAR file containing the MANIFEST file that runs the right Class on double clicking the JAR.