Fork me on GitHub

Plugin Documentation

Goals available for this plugin:

Goal Description
directory-content:copy Copies files from source to output directory.
directory-content:transformList 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>
directory-content:transformMetadata Transforms files metadata to documents using XSLT technology. Each file metadata used to transformation process has specified structure:
<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>

Examples:

<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>

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 2.0.11
JDK 1.5
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>biz.gabrys.maven.plugins</groupId>
          <artifactId>directory-content-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>biz.gabrys.maven.plugins</groupId>
        <artifactId>directory-content-maven-plugin</artifactId>
        <version>1.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"