About
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:
- a Jar file is created
Additional plugin can create:
Articles Related
Name
The name of the produced package will follow the artifact naming convention.
Parameters
Packaging Element
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:
- jar: default
- pom. See Maven - Module
- …