How to change file name generated by mvn package

You can simply change default file name generated by "mvn package" inside pom.xml file using tag finalName.

How to change file name generated by mvn package?

Default name is <Actifact ID>-<version>.extension (WAR / JAR). To change this simply open pom.xml and add inside <build> tag:

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

Type file name without extension, Maven will add extension on its own. You can also use properties like ${project.artifactId}.