Issue
I generated a war
file by executing this command in the root directory of my Spring
project : mvn package
The resulting war
file is called hib-1.0.0-BUILD-SNAPSHOT.war
I figured out that the first word hib
is the project's artifactId
.
How can I specify a custom name for the generated war
file?
Solution
You can set the variable finalName
in the build section of the pom.xml in your project:
<build>
<finalName>myname</finalName>
</build>
So the war will be renamed to myname.war
Answered By - Jens
Answer Checked By - Willingham (JavaFixing Volunteer)