O'Reilly logo

Maven Build Customization by Giacomo Veneri, Riccardo Giomi, Umberto Antonio Cicero, Roberto Baldi, Lorenzo Anardu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Packaging types

It's time to introduce one of the most important Maven concepts: how plugin goals are tied to lifecycle phases. This happens through packaging types. The packaging type is specified in the pom.xml descriptor through the <packaging> element, usually after its Maven coordinates. The default packaging type is jar. The plugin goals that are executed by default in each phase of the lifecycle depend on the packaging type of the project that we will build. This is because we need to execute different tasks for different packaging types. Let's see some details about the most common packaging types and their default bindings.

JAR

This is the default packaging type. It produces an archive in the JAR format. Its default bindings in the default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required