For Maven >= 3
<packaging>jar</packaging>
<build>
<finalName>WhatEverYouLikey</finalName>
</build>
(Credits to Matthew’s and his comment)
For older Maven versions
You set the finalName
property in the plugin configuration section:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<finalName>myJar</finalName>
</configuration>
</plugin>
As indicated in the official documentation.