Naming the artifact

In your POM add the tag finalName which gives the name to the artifact generated

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <groupId>myGroup</groupId>
    <artifactId>demo</artifactId>
    <packaging>war</packaging>
    <version>1.0</version>
    <name>My applicaiton</name>

   <build>
      <finalName>${project.artifactId}</finalName>
      ...
      ...
   </build>

</project>

The POM above names the artifact demo.war.

If <finalName> is not defined Maven will default to ${artifactId}-${version} (demo-1.0.war in the example).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: