IntelliJ IDEA 13.1 Web Help

File | Project Structure | Artifacts - add - Jar - From modules with dependencies

Item Description
Module From the drop-down list, select the module to be used for the artifact. Note that the specified module will be packaged into an artifact together with all the other modules it depends on.
Main class Specify the class with the main method.

This class name becomes a value of the Main-Class attribute in the MANIFEST.MF file, generated by IntelliJ IDEA.

Jar files from libraries Specify the way how the jar files from libraries will be treated:
  • Extract to the target jar. If this option is selected, then IntelliJ IDEA will produce a single jar archive, to which all the modules outputs and the contents of the directories will be packaged.
  • Copy to the target directory and link via manifest. If this option is selected, IntelliJ IDEA will produce a jar archive with the modules outputs, and separate jars from the libraries. The main jar file will include MANIFEST.MF file, with the libraries jars specified in the Classpath field of the manifest.

Note that the libraries here include all the dependencies of the module in question, including the transitive dependencies (the libraries from the dependencies of the modules the current one depends on.)

Directory for META-INF/MANIFEST.MF If IntelliJ IDEA generates MANIFEST.MF file, in this field you have to specify where this file will be stored.
Include tests If this check box is selected, the compiled classes from the tests roots of a module (and its dependencies) will be packaged into an artifact.

See Also



Web Resources: