Single JAR
Distributions of this type are comprised of a single, executable JAR, with all their dependencies available inside
the JAR. These JARs are also known as fatjar
or uber-jar
.
Single JAR distributions require a suitable Java runtime to be already installed on the consumer side.
Creating a Distribution
We recommend using the following plugins to create suitable Single JAR distributions:
Maven
-
maven-shade-plugin: packages a JAR and its dependencies as an uber-jar.
-
maven-jar-plugin: if the JAR has no additional dependencies.
Make sure the JAR is executable by setting the Main-Class
manifest entry.
Gradle
Make sure the JAR is executable by setting the Main-Class
manifest entry.