= 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

 * link:https://maven.apache.org/plugins/maven-shade-plugin/[maven-shade-plugin]: packages a JAR and its dependencies as
 an uber-jar.
 * link:https://maven.apache.org/plugins/maven-jar-plugin/[maven-jar-plugin]: if the JAR has no additional dependencies.

Make sure the JAR is executable by setting the `Main-Class` manifest entry.

.Gradle

 * link:https://imperceptiblethoughts.com/shadow/introduction/[shadow]: packages a JAR and its dependencies as
 an uber-jar.
 * link:https://docs.gradle.org/current/userguide/java_plugin.html[java]: if the JAR has no additional dependencies.

Make sure the JAR is executable by setting the `Main-Class` manifest entry.

== Packager Support

[%header, cols="<,^"]
|===
| Packager                                       | Supported
| xref:configuration:packagers/chocolatey.adoc[] | {icon_req_n}
| xref:configuration:packagers/docker.adoc[]     | {icon_req_y}
| xref:configuration:packagers/homebrew.adoc[]   | {icon_req_y}
| xref:configuration:packagers/jbang.adoc[]      | {icon_req_y}
| xref:configuration:packagers/scoop.adoc[]      | {icon_req_y}
| xref:configuration:packagers/snap.adoc[]       | {icon_req_y}
|===



