Custom Maven Assembly Descriptors

From NovaOrdis Knowledge Base
Revision as of 18:49, 7 November 2016 by Ovidiu (talk | contribs) (Created page with " Maven offers a set of predefined assembly descriptors, described below. Custom assembly descriptors can also be created, and this is the reference documentation for a custom...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Maven offers a set of predefined assembly descriptors, described below. Custom assembly descriptors can also be created, and this is the reference documentation for a custom assembly descriptor:

http://maven.apache.org/components/plugins/maven-assembly-plugin/assembly.html

This is an example of a custom assembly descriptor, used to build a complex release artifact for a multi-module project:

Custom Maven Assembly Descriptor Example

Custom assembly descriptors are conventionally placed under src/assembly of the module that executes the plugin.

Assembly ID

The assembly ID is specified as the value of the <id> element in the assembly descriptor. The assembly ID will become the assembly artifact classifier, present between the version and the extension. The artifact will be named <project-name>-<assemblyId>.<ext>. If I just want it to be <project-name>.<ext> (or <final-name>.<ext>), do not use an <id>...</id> declaration in the assembly descriptor.