Fork me on GitHub

directory-content:transformList

Full name:

biz.gabrys.maven.plugins:directory-content-maven-plugin:2.0.1:transformList

Description:

Transforms files list to a document using XSLT technology. The XML document used to transformation process has specified structure:
<files>
   <file>
      <fullPath>full file path</fullPath>
      <fullName>name with extension</fullName>
      <name>name without extension</name>
      <!-- extension node is optionally -->
      <extension>extension</extension>
      <directory>parent directory relative to ${directory.content.sourceDirectory}</directory>
      <size>size in bytes</size>
   </file>
   <!-- more file nodes -->
</files>

Example:

<files>
   <file>
      <fullPath>static/js/script.js</fullPath>
      <fullName>script.js</fullName>
      <name>script</name>
      <extension>js</extension>
      <directory>static/js</directory>
      <size>131072</size>
   </file>
   <file>
      <fullPath>static/js/file-without-extension</fullPath>
      <fullName>file-without-extension</fullName>
      <name>file-without-extension</name>
      <directory>static/js</directory>
      <size>28672</size>
   </file>
</files>

Attributes:

  • Requires a Maven project to be executed.
  • Since version: 1.0.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
<includes> String[] 1.0 List of files to include. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
<outputFile> File 1.0 Generated output document file.
User property is: directory.content.outputFile.
<xsltFile> File 1.0 The XSLT document used to transformation.
User property is: directory.content.xsltFile.

Optional Parameters

Name Type Since Description
<encoding> String 1.0 Source and output files encoding.
Default value is: ${project.build.sourceEncoding}.
User property is: directory.content.encoding.
<excludes> String[] 1.0 List of files to exclude. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: [].
<filesetPatternFormat> String 1.0 Defines inclusion and exclusion fileset patterns format. Available options:
  • ant - Ant patterns
  • regex - regular expressions (use '/' as path separator)

Default value is: ant.
User property is: directory.content.filesetPatternFormat.
<force> boolean 1.0 Forces to always process files. By default file is only processed when modified or the destination file does not exist.
Default value is: false.
User property is: directory.content.force.
<separator> String 1.0 The separator used in full files paths.
Default value is: / on UNIX systems or \ on Microsoft Windows systems.
User property is: directory.content.separator.
<skip> boolean 1.0 Defines whether to skip the plugin execution.
Default value is: false.
User property is: directory.content.skip.
<sourceDirectory> File 1.0 The directory with source files.
Default value is: ${project.build.sourceDirectory}.
User property is: directory.content.sourceDirectory.
<verbose> boolean 1.0 Defines whether the plugin runs in verbose mode.
Notice: always true in debug mode.
Default value is: false.
User property is: directory.content.verbose.

Parameter Details

<encoding>

Source and output files encoding.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: directory.content.encoding
  • Default: ${project.build.sourceEncoding}

<excludes>

List of files to exclude. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
Default value is: [].
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: No

<filesetPatternFormat>

Defines inclusion and exclusion fileset patterns format. Available options:
  • ant - Ant patterns
  • regex - regular expressions (use '/' as path separator)
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: directory.content.filesetPatternFormat
  • Default: ant

<force>

Forces to always process files. By default file is only processed when modified or the destination file does not exist.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: directory.content.force
  • Default: false

<includes>

List of files to include. Specified as fileset patterns which are relative to the source directory. See available fileset patterns formats.
  • Type: java.lang.String[]
  • Since: 1.0
  • Required: Yes

<outputFile>

Generated output document file.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • User Property: directory.content.outputFile

<separator>

The separator used in full files paths.
Default value is: / on UNIX systems or \ on Microsoft Windows systems.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: directory.content.separator

<skip>

Defines whether to skip the plugin execution.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: directory.content.skip
  • Default: false

<sourceDirectory>

The directory with source files.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: directory.content.sourceDirectory
  • Default: ${project.build.sourceDirectory}

<verbose>

Defines whether the plugin runs in verbose mode.
Notice: always true in debug mode.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: directory.content.verbose
  • Default: false

<xsltFile>

The XSLT document used to transformation.
  • Type: java.io.File
  • Since: 1.0
  • Required: Yes
  • User Property: directory.content.xsltFile