<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.torquebox</groupId>
    <artifactId>torquebox-parent</artifactId>
    <version>2.0.3.redhat.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.torquebox</groupId>
  <artifactId>torquebox-docs</artifactId>
  <packaging>pom</packaging>
  <name>TorqueBox Documentation</name>
  <description>Documentation for TorqueBox</description>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/docbook/staging/docbook/${translation.dash}</outputDirectory>
              <encoding>UTF-8</encoding>
              <resources>
                <resource>
                  <directory>${basedir}/src/main/docbook</directory>
                  <filtering>true</filtering>
                  <includes>
                    <include>**/*.xml</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jdocbook-plugin</artifactId>
        <extensions>true</extensions>
        <dependencies>
          <dependency>
            <groupId>org.torquebox</groupId>
            <artifactId>torquebox-style</artifactId>
            <version>1.0.0</version>
          </dependency>
          <dependency>
            <groupId>org.jboss.docs</groupId>
            <artifactId>highlight</artifactId>
            <version>1.0.0</version>
          </dependency>
          <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jbossorg-jdocbook-style</artifactId>
            <version>1.1.1</version>
            <type>jdocbook-style</type>
          </dependency>
        </dependencies>
        <configuration>
          <fontsDirectory>${basedir}/../src/main/fonts</fontsDirectory>
          <fontConfig>${basedir}/target/docbook/staging/docbook/${translation.dash}/fonts.xml</fontConfig>
          <sourceDirectory>${basedir}/target/docbook/staging/docbook/</sourceDirectory>
          <sourceDocumentName>master.xml</sourceDocumentName>
          <imageResource>
            <directory>${basedir}/src/main/docbook/</directory>
            <includes>
              <include>images/*.svg</include>
              <include>images/*.png</include>
              <include>images/*.jpg</include>
            </includes>
          </imageResource>
          <formats>
            <format>
              <formatName>man</formatName>
              <stylesheetResource>classpath:/epub/docbook.xsl</stylesheetResource>
              <finalName>${pom.artifactId}.epub-out</finalName>
            </format>
            <format>
              <formatName>pdf</formatName>
              <stylesheetResource>file:${project.parent.basedir}/src/main/xsl/pdf-style.xsl</stylesheetResource>
              <finalName>${pom.artifactId}.pdf</finalName>
            </format>
            <format>
              <formatName>xhtml</formatName>
              <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
              <finalName>index.html</finalName>
            </format>
<!--
            <format>
              <formatName>html_single</formatName>
              <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
              <finalName>${pom.artifactId}.html</finalName>
            </format>
-->
          </formats>
          <options>
            <xincludeSupported>true</xincludeSupported>
            <docbookVersion>1.76.1</docbookVersion>
            <xincludeSupported>true</xincludeSupported>
            <useRelativeImageUris>true</useRelativeImageUris>
            <xmlTransformerType>saxon</xmlTransformerType>
            <transformerParameters>
              <property>
                <name>keep.relative.image.uris</name>
                <value>1</value>
              </property>
              <property>
                <name>ignore.image.scaling</name>
                <value>0</value>
              </property>
            </transformerParameters>
          </options>
        </configuration>
      </plugin>
    </plugins>
  </build>
  

  <modules>
    <module>en-US</module>
  </modules>
  
</project>

