The assembly descriptor

The assembly descriptor is an XML-based configuration, which defines how to build an assembly and how its content should be structured.

If we go back to our example, the attached goal of the assembly plugin creates a binary distribution according to the assembly descriptor, both in the test and package phases of the default Maven lifecycle. The assembly descriptors for each phase can be specified under the descriptors element. As in this particular example, there can be multiple descriptor elements defined under the descriptors parent element. For the package phase, it has the following three assembly descriptors:

<descriptors> <descriptor>src/assembly/bin.xml</descriptor> <descriptor>src/assembly/src.xml</descriptor> <descriptor>src/assembly/docs.xml</descriptor> ...

Get Mastering Apache Maven 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.