Creating Executable Jar File With Maven Shade Plugin

In a couple of Java projects with external jar files as dependencies, you can create an executable jar file by the following ways:

1) Include the sources of external libraries in your project and build them, as part of your project build process.
2) Unpack the jar file, pack them inside your project and create a single executable jar file.

For maven users, fortunately, there is "Maven Shade Plugin", which does the work for you, probably using the second option, as described above. Even if there wasn't a plugin, I guess, it ain't that difficult to build one. To use that plugin, all you have to do is to include the following tag in your project's pom.xml:

1 comment:

Note: Only a member of this blog may post a comment.