If you have a Java application, the easiest way to distribute this project is creating an executable fat-jar (or uber-jar) that can be started using java -jar. With the help of Maven Assembly plugin, this can be easily implemented.

Below is the snippet of pom.xml file that uses Maven Assembly plugin. jar-with-dependencies is a built-in descriptor to generate a single jar file. com.mycompany.myproject.Main is the main class that added to jar file's manifest to make this jar file executable.


After run mvn package, you should see a jar file with suffix -jar-with-dependencies in the target directory. This is the executable jar file to use for distribution.