Maven pom.xml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 61: Line 61:


===<finalName>===
===<finalName>===
<finalName> can be used to customize the name of the artifact. The value allows for system properties (standard or custom), as in the following examples:
<pre>
<build>
    <finalName>simple-webapp</finalName>
</build>
</pre>
<pre>
<build>
    <finalName>${artifactId}</finalName>
</build>
</pre>
<pre>
<build>
    <finalName>archimedes-${project.version}</finalName>
</build>
</pre>
<pre>
<build>
    <finalName>${parent.artifactId}-${artifactId}</finalName>
</build>
</pre>


For more details on artifact name, see:
For more details on artifact name, see:

Revision as of 16:27, 18 November 2016

External

Internal

Overview

<project> is the root element.

Example

Simple pom.xml Example

Elements

<modelVersion>

Mandatory. Should be:

<modelVersion>4.0.0</modelVersion>

<groupId>

Mandatory. For more details about Group ID, see Maven Concepts - Group ID.

<artifactId>

Mandatory. For more details about Artifact ID, see Maven Concepts - Artifact ID.

<version>

Mandatory. For more details about Version, see Maven Concepts - Version.

<packaging>

Optional, the default value is "jar". For more details about packaging, see Maven Concepts - Packaging.

<classifier>

Optional. For more details about packaging, see Maven Concepts - Classifier.

<name>

Optional. See <artifactId> and Maven Concepts - Name.

<properties>

Maven Custom System Properties

<build>

<finalName>

<finalName> can be used to customize the name of the artifact. The value allows for system properties (standard or custom), as in the following examples:

<build>
    <finalName>simple-webapp</finalName>
</build>
<build>
    <finalName>${artifactId}</finalName>
</build>
<build>
    <finalName>archimedes-${project.version}</finalName>
</build>
<build>
    <finalName>${parent.artifactId}-${artifactId}</finalName>
</build>

For more details on artifact name, see:

Artifact Name