Packaging in Maven.
Package is a phase that bundle the code in a way suitable to be distributed.
By default, this phase will take the compiled code and make an archive of it as define in the packaging element of the pom.xml. The specific goals executed per phase is dependent upon the packaging type of the project.
By default:
Additional plugin can create:
The name of the produced package will follow the artifact naming convention.
Packaging Element of the pom.xml
<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/xsd/maven-4.0.0.xsd">
...
<packaging>war</packaging>
...
</project>
but can be also: