Custom Maven Assembly Descriptors: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
==<id>==
==<id>==


The assembly ID is specified as the value of the <id> element in the assembly descriptor. The presence of the <id> element in the assembly descriptor is mandatory, if it is not specified, Maven will generate a parsing error. The assembly ID will become the assembly artifact classifier, present between the version and the extension. For more details on assembly artifact naming rules, see "[[Maven_assembly_Plugin#The_Name_of_the_Assembly_Artifact|The Name of the Assembly Artifact]]" section.
The <id> element in the assembly descriptor specifies the value of the assembly ID. The presence of the <id> element in the assembly descriptor is mandatory, if it is not specified, Maven will generate a parsing error. The assembly ID will become the assembly artifact classifier, present between the version and the extension. For more details on assembly artifact naming rules, see "[[Maven_assembly_Plugin#The_Name_of_the_Assembly_Artifact|The Name of the Assembly Artifact]]" section.

Revision as of 19:33, 7 November 2016

External

Internal

Overview

Aside from pre-defined assembly descriptors, Maven allows creation of custom assembly descriptors. Custom assembly descriptors are conventionally placed under src/assembly of the module that executes the plugin.

Example

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

https://github.com/NovaOrdis/events/blob/master/release/src/assembly/release.xml

Elements

<id>

The <id> element in the assembly descriptor specifies the value of the assembly ID. The presence of the <id> element in the assembly descriptor is mandatory, if it is not specified, Maven will generate a parsing error. The assembly ID will become the assembly artifact classifier, present between the version and the extension. For more details on assembly artifact naming rules, see "The Name of the Assembly Artifact" section.