<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.sf.docbook</groupId>
  <artifactId>docbook-xsl-saxon</artifactId>
  <name>DocBook XSL Saxon extension</name>
  <packaging>jar</packaging>
  <version>1.0.1-pre</version>
  <description>These are Java extensions for use with the DocBook XML stylesheets and the Saxon XSLT engine.
  </description>
  <url>http://sourceforge.net/projects/docbook/</url>

  <parent>
    <groupId>net.sf.docbook</groupId>
    <artifactId>docbook</artifactId>
    <version>5.0-2</version>
  </parent>


  <properties>
    <docbook.xsl.saxon.release>docbook-xsl-saxon-1.01-snapshot-08232012</docbook.xsl.saxon.release>
  </properties>

  <dependencies>
    <dependency>
      <groupId>saxon</groupId>
      <artifactId>saxon</artifactId>
      <version>6.5.3</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <echo>Extracting docbook xsl saxon sources ${docbook.xsl.saxon.release}.zip.</echo>

                <unzip dest="${project.basedir}/target/saxon">
                  <fileset dir="lib/" includes="${docbook.xsl.saxon.release}.zip"/>
                  <patternset>
                    <include name="${docbook.xsl.saxon.release}/src/**"/>
                  </patternset>
                </unzip>

              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.basedir}/target/saxon/${docbook.xsl.saxon.release}/src/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <sourcepath>${project.basedir}/target/saxon/${docbook.xsl.saxon.release}/src/</sourcepath>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
