文件集

文件集的定义。该模型定义了如何使用目录、包含和排除来捕获文件集。

<fileSet>
  <directory/>
  <lineEnding/>
  <followSymlinks/>
  <outputDirectory/>
  <useDefaultExcludes/>
  <includes/>
  <excludes/>
  <fileMode/>
  <directoryMode/>
  <mapper>
    <type/>
    <from/>
    <to/>
    <classname/>
  </mapper>
</fileSet>

文件集

定义匹配和使用给定基目录中文件的规则。

元素 类型 描述
目录 细绳 模块目录中的绝对或相对。例如,“src/main/bin”将选择定义此依赖项的项目的此子目录。
行尾 细绳 控制此文件集中文件的行尾。
有效值:
  • "keep" - 保留所有行尾
  • "unix" - 使用 Unix 风格的行尾
  • "lf" - 使用单个换行符结束
  • "dos" - 使用 DOS 风格的行尾
  • "crlf" - 使用 Carraige-return, line-feed 行尾
跟随符号链接 布尔值 指定是否应遍历符号链接或按原样处理。
默认值为false
输出目录 细绳 指定相对于程序集根目录的根的输出目录。例如,“log”会将指定的文件放在日志目录中。
使用默认排除 布尔值 是否包含常见临时和​​ SCM 控制文件的排除模式(默认为 true)。
默认值为true
包括/包括* 列表<字符串> (很多) 当 <include> 子元素存在时,它们定义了一组要包含的文件和目录。
排除/排除* 列表<字符串> (很多) 当 <exclude> 子元素存在时,它们定义了一组要排除的文件和目录。
文件模式 细绳 类似于 UNIX 权限。格式:(User)(Group)(Other) 其中每个分量是 Read = 4、Write = 2 和 Execute = 1 的总和。例如,默认值 0644 转换为 User read-write、Group 和 Other read -只要。 (更多关于 unix 风格的权限)
默认值为: 0644
目录模式 细绳 类似于 UNIX 权限。格式:(User)(Group)(Other) 其中每个分量是 Read = 4、Write = 2 和 Execute = 1 的总和。例如,默认值 0755 转换为 User read-write、Group 和 Other read -只要。 (更多关于 unix 风格的权限)
默认值是: 0755
映射器 映射器 指定使用的映射器。

映射器

没有说明。

元素 类型 描述
类型 细绳 指定内置映射器实现。
有效值:
  • “flatten” - 目标文件名与源文件名相同,所有前导目录信息都被剥离。to 和 from 都将被忽略。
  • "glob" - to 和 from 都定义最多可以包含一个 * 的模式。对于与 from 模式匹配的每个源文件,目标文件名将从 to 模式构造,方法是将 to 模式中的 * 替换为与 from 模式中的 * 匹配的文本。与 from 模式不匹配的源文件名将被忽略。
  • "regexp" - to 和 from 都定义正则表达式。如果源文件名与 from 模式匹配,则目标文件名将从 to 模式构造,使用

    FileSet

    A definition of a file-set. This model defines how file-sets can be captured, using directory, includes, and excludes.

    <fileSet>
      <directory/>
      <lineEnding/>
      <followSymlinks/>
      <outputDirectory/>
      <useDefaultExcludes/>
      <includes/>
      <excludes/>
      <fileMode/>
      <directoryMode/>
      <mapper>
        <type/>
        <from/>
        <to/>
        <classname/>
      </mapper>
    </fileSet>
    

    fileSet

    Defines the rules for matching and working with files in a given base directory.

    Element Type Description
    directory String 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 String 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
    followSymlinks boolean Specifies whether symbolic links should be traversed, or handled as-is.
    Default value is: false.
    outputDirectory String 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.
    useDefaultExcludes boolean Whether to include exclusion patterns for common temporary and SCM control files (true by default).
    Default value is: true.
    includes/include* List<String> (Many) When <include> subelements are present, they define a set of files and directory to include.
    excludes/exclude* List<String> (Many) When <exclude> subelements are present, they define a set of files and directory to exclude.
    fileMode String 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)
    Default value is: 0644.
    directoryMode String 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 0755 translates to User read-write, Group and Other read-only. (more on unix-style permissions)
    Default value is: 0755.
    mapper Mapper Specifies the mapper used.

    mapper

    No description.

    Element Type Description
    type String Specifies a built-in mapper implementation.
    Valid values:
    • "flatten" - The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.
    • "glob" - Both to and from define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
    • "regexp" - Both to and from define regular expressions. If the source file name matches the from pattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. Source files not matching the from pattern will be ignored.
    • "merge" - The target file name will always be the same, as defined by to. from will be ignored.
    • "package" - Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder.
    • "unpackage" - This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.

    Default value is: identity.
    from String Specifies a type-specific pattern for matching source paths which should be mapped.
    to String Specifies a type-specific pattern for producing paths based on source paths.
    classname String Allows specification of a custom mapper implementation. The class must be of type org.apache.maven.shared.model.fileset.mappers.FileNameMapper, from the artifact org.apache.maven.shared:file-management.

    到 作为完整匹配 (

    FileSet

    A definition of a file-set. This model defines how file-sets can be captured, using directory, includes, and excludes.

    <fileSet>
      <directory/>
      <lineEnding/>
      <followSymlinks/>
      <outputDirectory/>
      <useDefaultExcludes/>
      <includes/>
      <excludes/>
      <fileMode/>
      <directoryMode/>
      <mapper>
        <type/>
        <from/>
        <to/>
        <classname/>
      </mapper>
    </fileSet>
    

    fileSet

    Defines the rules for matching and working with files in a given base directory.

    Element Type Description
    directory String 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 String 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
    followSymlinks boolean Specifies whether symbolic links should be traversed, or handled as-is.
    Default value is: false.
    outputDirectory String 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.
    useDefaultExcludes boolean Whether to include exclusion patterns for common temporary and SCM control files (true by default).
    Default value is: true.
    includes/include* List<String> (Many) When <include> subelements are present, they define a set of files and directory to include.
    excludes/exclude* List<String> (Many) When <exclude> subelements are present, they define a set of files and directory to exclude.
    fileMode String 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)
    Default value is: 0644.
    directoryMode String 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 0755 translates to User read-write, Group and Other read-only. (more on unix-style permissions)
    Default value is: 0755.
    mapper Mapper Specifies the mapper used.

    mapper

    No description.

    Element Type Description
    type String Specifies a built-in mapper implementation.
    Valid values:
    • "flatten" - The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.
    • "glob" - Both to and from define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
    • "regexp" - Both to and from define regular expressions. If the source file name matches the from pattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. Source files not matching the from pattern will be ignored.
    • "merge" - The target file name will always be the same, as defined by to. from will be ignored.
    • "package" - Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder.
    • "unpackage" - This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.

    Default value is: identity.
    from String Specifies a type-specific pattern for matching source paths which should be mapped.
    to String Specifies a type-specific pattern for producing paths based on source paths.
    classname String Allows specification of a custom mapper implementation. The class must be of type org.apache.maven.shared.model.fileset.mappers.FileNameMapper, from the artifact org.apache.maven.shared:file-management.

    ) 或括号中子表达式的匹配的反向引用。与 from 模式不匹配的源文件将被忽略。
  • "merge" - 目标文件名将始终与 to 定义的相同。from 将被忽略。
  • “包” - 与 glob 映射器共享相同的语法,包映射器将在匹配的源模式中找到的目录分隔符替换为目标模式占位符中的点。
  • "unpackage" - 这个映射器是包映射器的逆。它用目录分隔符替换包名中的点。这对于将 XML 格式化程序结果与其 JUnit 测试用例进行匹配非常有用。映射器与 glob 映射器共享示例语法。

默认值为身份
细绳 为匹配应该映射的源路径指定类型特定的模式。
细绳 指定用于基于源路径生成路径的特定于类型的模式。
班级名称 细绳 允许指定自定义映射器实现。该类的类型必须为 org.apache.maven.shared.model.fileset.mappers.FileNameMapper,来自工件 org.apache.maven.shared:file-management。