<?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-docs</artifactId>
    <version>2.3.0.redhat.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.torquebox</groupId>
  <artifactId>torquebox-docs-getting-started</artifactId>
  <packaging>pom</packaging>
  <name>TorqueBox Getting Started Guide</name>
  <description>Getting Started Guide for TorqueBox</description>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jboss.maven.plugins</groupId>
          <artifactId>maven-jdocbook-plugin</artifactId>
          <!--<version>2.1.2</version>-->
          <version>2.3.3</version>
          <extensions>true</extensions>
        </plugin>
      </plugins>
    </pluginManagement>
    <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>xhtml</formatName>
              <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
              <finalName>index.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>

  <profiles>
    <profile>
      <id>full</id>
      <activation>
        <property>
          <name>!fast</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jboss.maven.plugins</groupId>
            <artifactId>maven-jdocbook-plugin</artifactId>
            <configuration>
              <formats combine.children="append">
                <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.parent.basedir}/src/main/xsl/pdf-style.xsl</stylesheetResource>
                  <finalName>${pom.artifactId}.pdf</finalName>
                </format>
    <!--
                <format>
                  <formatName>html_single</formatName>
                  <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
                  <finalName>${pom.artifactId}.html</finalName>
                </format>
    -->
              </formats>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

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