--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook-sample</artifactId>
+ <name>DocBook XSL sample</name>
+ <packaging>pom</packaging>
+ <version>1.0.0</version>
+ <description>Sample of DocBook maven artifacts</description>
+ <url>http://sourceforge.net/projects/docbook/</url>
+
+ <parent>
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook</artifactId>
+ <version>5.0</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook-xsl</artifactId>
+ <version>1.75.0</version>
+ <type>zip</type>
+ <classifier>ns-resources</classifier>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!--
+ First we need to extract the stylesheets somewhere
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-shared-resources</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
+ <includeGroupIds>net.sf.docbook</includeGroupIds>
+ <includeArtifactIds>docbook-xsl</includeArtifactIds>
+ <includeClassifiers>ns-resources</includeClassifiers>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ Then use the xslt engine
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>transform</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <transformationSets>
+ <transformationSet>
+ <!-- select the xml files to transform using dir and includes -->
+ <dir>src/main/docbook/</dir>
+ <includes>
+ <include>sample.xml</include>
+ </includes>
+ <!-- the stylesheet is located in the previously extracted directory under the docbook/ directory -->
+ <stylesheet>${project.build.directory}/generated-resources/docbook/html/docbook.xsl</stylesheet>
+ <!-- rename the file with a proper extension -->
+ <fileMappers>
+ <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
+ <targetExtension>.html</targetExtension>
+ </fileMapper>
+ </fileMappers>
+ <!-- specify the transformed file directory -->
+ <outputDir>${project.build.directory}/docbook</outputDir>
+ <!-- set some stylesheet parameters -->
+ <parameters>
+ <parameter>
+ <name>draft.mode</name>
+ <value>yes</value>
+ </parameter>
+ </parameters>
+ </transformationSet>
+ </transformationSets>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>net.sf.docbook</groupId>
+ <artifactId>docbook-xsl-saxon</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>