maven assembly plugin

fileSet

A fileSet allows the inclusion of groups of files into the assembly.

ElementTypeDescription
useDefaultExcludes boolean Whether standard exclusion patterns, such as those matching CVS and Subversion metadata files, should be used when calculating the files affected by this set. For backward compatibility, the default value is true. (Since 2.2-beta-1) 
Default value istrue.
outputDirectory String Sets 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/include* List<String> (Many) When <include> subelements are present, they define a set of files and directory to include. If none is present, then <includes> represents all valid values.
excludes/exclude* List<String> (Many) When <exclude> subelements are present, they define a set of files and directory to exclude. If none is present, then <excludes> represents no exclusions.
fileMode String Similar to a UNIX permission, sets the file mode of the files included. THIS IS AN OCTAL VALUE. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the value 0644 translates to User read-write, Group and Other read-only. The default value is 0644. (more on unix-style permissions)
directoryMode String Similar to a UNIX permission, sets the directory mode of the directories included. THIS IS AN OCTAL VALUE. Format: (User)(Group)(Other) where each component is a sum of Read = 4, Write = 2, and Execute = 1. For example, the value 0755 translates to User read-write, Group and Other read-only. The default value is 0755. (more on unix-style permissions)
directory String Sets the absolute or relative location from the module's directory. For example, "src/main/bin" would select this subdirectory of the project in which this dependency is defined.
lineEnding String Sets the line-endings of the files in this fileSet. Valid values:
  • "keep" - Preserve all line endings
  • "unix" - Use Unix-style line endings (i.e. " ")
  • "lf" - Use a single line-feed line endings (i.e. " ")
  • "dos" - Use DOS-/Windows-style line endings (i.e. " ")
  • "windows" - Use DOS-/Windows-style line endings (i.e. " ")
  • "crlf" - Use carriage-return, line-feed line endings (i.e. " ")
filtered boolean Whether to filter symbols in the files as they are copied, using properties from the build configuration. (Since 2.2-beta-1) 
Default value isfalse.

fang 样例

<fileSet>
<directory>${project.build.directory}/bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>

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

原文地址:https://www.cnblogs.com/ydxblog/p/5691924.html