Plugin Documentation

Goals available for this plugin:

GoalDescription
xslt-generator:finalizeFinalizes the XSLT generator maven plugin at the end of the build.

Sets the timestamp of the xslt generation. This mojo should be run after other executions of the xslt generator. It takes the prepared timestamp file and sets the timestamp based on it.

By default runs in process-resources phase, if needed, customize the phase as required. Generally should be run as the last execution of the generator in the build (eg. if generate-test-resources phase is the last one you use the generator in, finalize it in this phase).

xslt-generator:initializeInitializes the XSLT generator maven plugin at the start of the build.

Prepares the timestamp of the xslt generation. This mojo should be run before other executions of the xslt generator. It touches a prepared timestamp file. The file is then used as the timestamp of xslt generation after all the executions of the xslt generator are finished.

xslt-generator:many-to-dynamicPerform XSL transformation of multiple source files into destination files created dynamically by the template.

For each source file, the template is supposed to create destination files dynamically using the xsl:result-document command.

The default output of the template is directed to a file which is deleted after processing.

xslt-generator:many-to-manyPerform XSL transformation of multiple source files with destination files created 1:1.

Each source file is transformed into a single destination file, preserving the directory structure. The destination directory tree is created based on the source directory tree.

Files with up-to-date timestamp are skipped.

xslt-generator:many-to-onePerform XSL transformation of multiple source files into a single destination file.

The names of the multiple source files are passed into the template as a pipe-separated list in a parameter named 'source-file-names'. In the template, define a global template parameter as follows: <xsl:param name="source-file-names" />. Then the content of the files can be loaded as follows: <xsl:variable name="source-files" select="document(tokenize($source-file-names,'\|'))" />.

From the XSL engine point of view, it is then in fact a single, 1:1 transformation: a single source file is transformed into a single destination file.

The content of the single source file can then be enriched in the template by the multiple source files.

System Requirements

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

Maven2.0
JDK1.1
MemoryNo minimum requirement.
Disk SpaceNo 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>net.sf.xsltmp</groupId>
          <artifactId>xslt-generator-maven-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>net.sf.xsltmp</groupId>
        <artifactId>xslt-generator-maven-plugin</artifactId>
        <version>1.8</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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