IntelliJ IDEA 2019.2 Help

Create Jar from Modules Dialog

File | Project Structure | Artifacts |  the Add button  | JAR | From modules with dependencies


Specify the settings for your Java archive (JAR).

Item

Description

Module

The module that you want to package.

Main class

The fully qualified name of your main application class, the one with the main() method.

JAR files from libraries

The way the JAR files from the module libraries are processed:

  • extract to the target JAR. The JAR contents are decompressed and then packaged together with the module output in a single JAR.

  • copy to the output directory and link via manifest. The JAR files are copied to the artifact output directory as is. The references to the JARs are added to the Class-Path header field of the MANIFEST.MF file that is packaged in the same JAR as the module output.

Directory for META-INF/MANIFEST.MF

The path to the directory in which META-INF/MANIFEST.MF is generated.

Include tests

Include the module's compiled test classes.

Refer to Packaging the application in a JAR for an example of how to create and build a JAR artifact.

Last modified: 19 August 2019

See Also