Package your Maven application
To package your Kotlin application with Maven, you can create a standard JAR file or a self-contained (fat) JAR file that includes all its dependencies. Packaging your application allows you to distribute it and run it on any machine with a Java Runtime Environment (JRE).
Create JAR files
To create a small JAR file containing just the code from your module, include the following under <build><plugins> in your Maven pom.xml file, where main.class is defined as a property and points to the main Kotlin or Java class:
Create self-contained JAR files
To create a self-contained JAR file containing the code from your module along with its dependencies, include the following under <build><plugins> in your Maven pom.xml file, where main.class is defined as a property and points to the main Kotlin or Java class:
This self-contained JAR file can be passed directly to a JRE to run your application: