Custom Maven Assembly Descriptors: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
This is an example of a custom assembly descriptor, used to build a [[Building_a_Maven_Complex_Release_Artifact#Custom_Assembly_File|complex release artifact for a multi-module project]]: | This is an example of a custom assembly descriptor, used to build a [[Building_a_Maven_Complex_Release_Artifact#Custom_Assembly_File|complex release artifact for a multi-module project]]: | ||
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;"> | |||
:https://github.com/NovaOrdis/events/blob/master/release/src/assembly/release.xml<br> | |||
</blockquote> | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | <blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> |
Revision as of 18:59, 7 November 2016
External
- Custom assembly descriptor reference http://maven.apache.org/components/plugins/maven-assembly-plugin/assembly.html
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:
Elements
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.