Component

Component contains FileSets, FileItems, and DependencySets already define in Assembly. It allows multiple assemblies to share a set of user defined collections.

<component>
  <fileSets>
    <fileSet>
      <directory/>
      <lineEnding/>
      <outputDirectory/>
      <includes/>
      <excludes/>
      <fileMode/>
      <directoryMode/>
    </fileSet>
  </fileSets>
  <files>
    <file>
      <source/>
      <outputDirectory/>
      <destName/>
      <fileMode/>
      <lineEnding/>
      <filtered/>
    </file>
  </files>
  <dependencySets>
    <dependencySet>
      <outputFileNameMapping/>
      <unpack/>
      <scope/>
      <outputDirectory/>
      <includes/>
      <excludes/>
      <fileMode/>
      <directoryMode/>
    </dependencySet>
  </dependencySets>
</component>

component

Describes the component layout and packaging.

Element Description
fileSets Specify assembly parameters for groups of files.
files Specify assembly parameters for single files.
dependencySets Specify assembly behavior for sets of dependencies.

fileSet

No description.

Element Description
directory Absolute or relative from the module's directory. For example, "src/main/bin" would select this subdirectory of the project in which this dependency is defined.
lineEnding Controls the line-endings of files in this fileSet. Valid values:
  • "keep" - Preserve all line endings
  • "unix" - Use Unix-style line endings
  • "lf" - Use a single line-feed line endings
  • "dos" - Use DOS-style line endings
  • "crlf" - Use Carraige-return, line-feed line endings
outputDirectory Specifies the output directory relative to the root of the root directory of the assembly. For example, "log" will put the specified files in the log directory.
includes When <include> subelements are present, they define a set of files and directory to include.
excludes When <exclude> subelements are present, they define a set of files and directory to exclude.
fileMode Similar to a UNIX permission. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the default value of 0644 translates to User read-write, Group and Other read-only. (more on unix-style permissions) The default value is 0644.
directoryMode Similar to a UNIX permission. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the default value of 0644 translates to User read-write, Group and Other read-only. (more on unix-style permissions) The default value is 0755.

file

Allows individual file copy with option to change destination file name not supported by fileSet
Element Description
source Absolute or relative from the module's directory.
outputDirectory Specifies the output directory relative to the root of the root directory of the assembly. For example, "log" will put the specified files in the log directory.
destName Destination file name in outputDirectory. Default is the same name as the source's file.
fileMode Similar to a UNIX permission. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the default value of 0644 translates to User read-write, Group and Other read-only. (more on unix-style permissions) The default value is 0644.
lineEnding Controls the line-endings of files in this fileSet. Valid values are:
  • "keep" - Preserve all line endings
  • "unix" - Use Unix-style line endings
  • "lf" - Use a single line-feed line endings
  • "dos" - Use DOS-style line endings
  • "crlf" - Use Carraige-return, line-feed line endings
filtered Flag used to determine if the file is filtered. The default value is false.

dependencySet

Defines a dependency set
Element Description
outputFileNameMapping Specify the mapping pattern for all dependencies included in this assembly. Default is ${artifactId}-${version}.${extension}. The default value is ${artifactId}-${version}.${extension}.
unpack If set to true, this property will unpack all dependencies into the specified output directory. When set to false dependencies will be includes as archives (jars). Default value is false. The default value is false.
scope Specifies the dependency scope for this dependencySet. Default scope value is "runtime". The default value is runtime.
outputDirectory Specifies the output directory relative to the root of the root directory of the assembly. For example, "log" will put the specified files in the log directory.
includes When <include> subelements are present, they define a set of files and directory to include.
excludes When <exclude> subelements are present, they define a set of files and directory to exclude.
fileMode Similar to a UNIX permission. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the default value of 0644 translates to User read-write, Group and Other read-only. (more on unix-style permissions) The default value is 0644.
directoryMode Similar to a UNIX permission. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the default value of 0644 translates to User read-write, Group and Other read-only. (more on unix-style permissions) The default value is 0755.