assembly:single

Full name:

org.apache.maven.plugins:maven-assembly-plugin:2.2.2:single

Description:

Assemble an application bundle or distribution from an assembly descriptor. This goal is suitable either for binding to the lifecycle or calling directly from the command line (provided all required files are available before the build starts, or are produced by another goal specified before this one on the command line).

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Is NOT inherited by default in multi-project builds.

Required Parameters

Name Type Since Description
finalName String - The filename of the assembled distribution file.
Default value is: ${project.build.finalName}.
outputDirectory File - The output directory of the assembled distribution file.
Default value is: ${project.build.directory}.
workDirectory File - Directory to unpack JARs into if needed
Default value is: ${project.build.directory}/assembly/work.

Optional Parameters

Name Type Since Description
appendAssemblyId boolean - Set to false to exclude the assembly id from the assembly final name.
Default value is: true.
archive MavenArchiveConfiguration - This is a set of instructions to the archive builder, especially for building .jar files. It enables you to specify a Manifest file for the jar, in addition to other options.
archiveBaseDirectory File - This is the base directory from which archive files are created. This base directory pre-pended to any <directory> specifications in the assembly descriptor. This is an optional parameter.
archiverConfig PlexusConfiguration 2.2-beta-3 Allows additional configuration options that are specific to a particular type of archive format. This is intended to capture an XML configuration that will be used to reflectively setup the options on the archiver instance.
For instance, to direct an assembly with the "ear" format to use a particular deployment descriptor, you should specify the following for the archiverConfig value in your plugin configuration:
<appxml>${project.basedir}/somepath/app.xml</appxml>

attach boolean 2.2-beta-1 Controls whether the assembly plugin tries to attach the resulting assembly to the project.
Default value is: true.
classifier String - Deprecated. Please use the Assembly's id for classifier instead
descriptor String - Deprecated. Please use descriptors instead
descriptorId String - Deprecated. Please use descriptorRefs instead
descriptorRefs String[] - A list of references to assembly descriptors available on the plugin's classpath. The default classpath includes these built-in descriptors: bin, jar-with-dependencies, src, and project. You can add others by adding dependencies to the plugin.
descriptorSourceDirectory File - Directory to scan for descriptor files in. NOTE: This may not work correctly with assembly components.
descriptors String[] - A list of descriptor files to generate from.
dryRun boolean - If this flag is set, everything up to the call to Archiver.createArchive() will be executed.
Default value is: false.
encoding String - The character encoding scheme to be applied when filtering resources.
Default value is: ${project.build.sourceEncoding}.
filters List - (no description)
formats List - (no description)
ignoreDirFormatExtensions boolean - If this flag is set, the ".dir" suffix will be suppressed in the output directory name when using assembly/format == 'dir' and other formats that begin with 'dir'.
NOTE: Since 2.2-beta-3, the default-value for this is true, NOT false as it used to be.
Default value is: true.
ignoreMissingDescriptor boolean - Set to true in order to not fail when a descriptor is missing.
Default value is: false.
ignorePermissions boolean 2.2

Set to true in order to avoid all chmod calls.

NOTE: This will cause the assembly plugin to DISREGARD all fileMode/directoryMode settings in the assembly descriptor, and all file permissions in unpacked dependencies!


Default value is: false.
includeSite boolean - Deprecated. Please set this variable in the assembly descriptor instead
Default value is: false.
runOnlyAtExecutionRoot boolean 2.2-beta-4 This will cause the assembly to run only at the top of a given module tree. That is, run in the project contained in the same folder where the mvn execution was launched.
Default value is: false.
skipAssembly boolean - Flag allowing one or more executions of the assembly plugin to be configured as skipped for a particular build. This makes the assembly plugin more controllable from profiles.
Default value is: false.
tarLongFileMode String - Sets the TarArchiver behavior on file paths with more than 100 characters length. Valid values are: "warn" (default), "fail", "truncate", "gnu", or "omit".
Default value is: warn.
updateOnly boolean 2.2 This will cause the assembly to only update an existing archive, if it exists.
Default value is: false.
useJvmChmod boolean 2.2

will use the jvm chmod, this is available for user and all level group level will be ignored


Default value is: false.

Parameter Details

appendAssemblyId:

Set to false to exclude the assembly id from the assembly final name.
  • Type: boolean
  • Required: No
  • Expression: ${assembly.appendAssemblyId}
  • Default: true

archive:

This is a set of instructions to the archive builder, especially for building .jar files. It enables you to specify a Manifest file for the jar, in addition to other options.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

archiveBaseDirectory:

This is the base directory from which archive files are created. This base directory pre-pended to any <directory> specifications in the assembly descriptor. This is an optional parameter.
  • Type: java.io.File
  • Required: No

archiverConfig:

Allows additional configuration options that are specific to a particular type of archive format. This is intended to capture an XML configuration that will be used to reflectively setup the options on the archiver instance.
For instance, to direct an assembly with the "ear" format to use a particular deployment descriptor, you should specify the following for the archiverConfig value in your plugin configuration:
<appxml>${project.basedir}/somepath/app.xml</appxml>
  • Type: org.codehaus.plexus.configuration.PlexusConfiguration
  • Since: 2.2-beta-3
  • Required: No

attach:

Controls whether the assembly plugin tries to attach the resulting assembly to the project.
  • Type: boolean
  • Since: 2.2-beta-1
  • Required: No
  • Expression: ${assembly.attach}
  • Default: true

classifier:

Deprecated. Please use the Assembly's id for classifier instead
This is the artifact classifier to be used for the resultant assembly artifact. Normally, you would use the assembly-id instead of specifying this here.
  • Type: java.lang.String
  • Required: No
  • Expression: ${classifier}

descriptor:

Deprecated. Please use descriptors instead
Assembly XML Descriptor file. This must be the path to your customized descriptor file.
  • Type: java.lang.String
  • Required: No
  • Expression: ${descriptor}

descriptorId:

Deprecated. Please use descriptorRefs instead
Predefined Assembly Descriptor Id's. You can select bin, jar-with-dependencies, or src.
  • Type: java.lang.String
  • Required: No
  • Expression: ${descriptorId}

descriptorRefs:

A list of references to assembly descriptors available on the plugin's classpath. The default classpath includes these built-in descriptors: bin, jar-with-dependencies, src, and project. You can add others by adding dependencies to the plugin.
  • Type: java.lang.String[]
  • Required: No

descriptorSourceDirectory:

Directory to scan for descriptor files in. NOTE: This may not work correctly with assembly components.
  • Type: java.io.File
  • Required: No

descriptors:

A list of descriptor files to generate from.
  • Type: java.lang.String[]
  • Required: No

dryRun:

If this flag is set, everything up to the call to Archiver.createArchive() will be executed.
  • Type: boolean
  • Required: No
  • Expression: ${assembly.dryRun}
  • Default: false

encoding:

The character encoding scheme to be applied when filtering resources.
  • Type: java.lang.String
  • Required: No
  • Expression: ${encoding}
  • Default: ${project.build.sourceEncoding}

filters:

(no description)
  • Type: java.util.List
  • Required: No

finalName:

The filename of the assembled distribution file.
  • Type: java.lang.String
  • Required: Yes
  • Default: ${project.build.finalName}

formats:

(no description)
  • Type: java.util.List
  • Required: No

ignoreDirFormatExtensions:

If this flag is set, the ".dir" suffix will be suppressed in the output directory name when using assembly/format == 'dir' and other formats that begin with 'dir'.
NOTE: Since 2.2-beta-3, the default-value for this is true, NOT false as it used to be.
  • Type: boolean
  • Required: No
  • Default: true

ignoreMissingDescriptor:

Set to true in order to not fail when a descriptor is missing.
  • Type: boolean
  • Required: No
  • Expression: ${assembly.ignoreMissingDescriptor}
  • Default: false

ignorePermissions:

Set to true in order to avoid all chmod calls.

NOTE: This will cause the assembly plugin to DISREGARD all fileMode/directoryMode settings in the assembly descriptor, and all file permissions in unpacked dependencies!

  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${assembly.ignorePermissions}
  • Default: false

includeSite:

Deprecated. Please set this variable in the assembly descriptor instead
Set to true to include the site generated by site:site goal.
  • Type: boolean
  • Required: No
  • Expression: ${includeSite}
  • Default: false

outputDirectory:

The output directory of the assembled distribution file.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}

runOnlyAtExecutionRoot:

This will cause the assembly to run only at the top of a given module tree. That is, run in the project contained in the same folder where the mvn execution was launched.
  • Type: boolean
  • Since: 2.2-beta-4
  • Required: No
  • Expression: ${assembly.runOnlyAtExecutionRoot}
  • Default: false

skipAssembly:

Flag allowing one or more executions of the assembly plugin to be configured as skipped for a particular build. This makes the assembly plugin more controllable from profiles.
  • Type: boolean
  • Required: No
  • Expression: ${assembly.skipAssembly}
  • Default: false

tarLongFileMode:

Sets the TarArchiver behavior on file paths with more than 100 characters length. Valid values are: "warn" (default), "fail", "truncate", "gnu", or "omit".
  • Type: java.lang.String
  • Required: No
  • Expression: ${assembly.tarLongFileMode}
  • Default: warn

updateOnly:

This will cause the assembly to only update an existing archive, if it exists.
  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${assembly.updatOnly}
  • Default: false

useJvmChmod:

will use the jvm chmod, this is available for user and all level group level will be ignored

  • Type: boolean
  • Since: 2.2
  • Required: No
  • Expression: ${assembly.useJvmChmod}
  • Default: false

workDirectory:

Directory to unpack JARs into if needed
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/assembly/work