IntelliJ IDEA 2018.1 Help

Output Layout Tab

File | Project Structure | Artifacts | <artifact> | Output Layout

The Output Layout tab lets you specify the artifact structure and contents. The tab includes the following areas:

The artifact layout pane (the left-hand one) shows the artifact structure and provides the means for changing it. You can create directories () and archives (), add copies of compiled module sources, libraries, artifacts, files, etc. () as well as sort () and reorder the items (). Note that the order of items, sometimes, may be important.

The manifest file properties area (in the lower part of the artifact layout pane; available only for JAR, WAR and EAR files) lets you specify which manifest file is associated with the archive. It also lets you view and edit the values for the "most popular" MANIFEST.MF header fields.

The Available Elements pane shows the elements that can be but are not yet added to the artifact. (The top level in this view just provides grouping for the elements.) For adding the elements to the artifact, this pane provides the options that generally work quicker (you can use double-clicks and drag-and-drop) than those in the artifact layout pane.

Reordering the items

The order of items is important when there are elements that lead to producing files with the same name in the same directory. In such situations, only the file from the element that comes first will be included in the artifact.

To see the actual order of items, release . Then use or to reorder the items.

Artifact layout pane: context menu commands

Most of the commands have self-explanatory names. Here, we explain only the commands whose purpose may be unclear.

Command

Description

Extract Artifact

Transform the selected items into a new separate artifact. As a result: 1) a new artifact is created, 2) the selected items are moved to that new artifact, and 3) a copy of the new artifact is included in the old artifact in place of the initially selected items.

Inline Artifact

In a sense, this is the reverse to extracting an artifact and is used to make a "container artifact" independent of the artifact whose copy it contains.

Let's assume, artifact A contains a copy of artifact B. As a result of inlining the copy of artifact B: 1) The copy of B in A is replaced with the contents of B and, from this moment on, can be edited independent of B. 2) The artifact B itself remains unchanged.

Surround with

In place of the selected items, create a directory or archive, and move the selected items into that directory or archive.