<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.jboss.portletbridge</groupId>
      <version>2.1.0.FINAL</version>
      <artifactId>jbossportletbridge-parent</artifactId>
      <relativePath>../parent/pom.xml</relativePath>
   </parent>

   <modelVersion>4.0.0</modelVersion>
   <artifactId>jbossportletbridge-docs</artifactId>
   <groupId>org.jboss.portletbridge</groupId>
   <packaging>pom</packaging>
   <name>JBoss Portlet Bridge Documentation</name>
   <version>2.1.0.FINAL</version>
   <url>http://www.jboss.org/portletbridge/</url>

   <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>
         <version>2.3.3</version>
        <extensions>true</extensions>
        <dependencies>
          <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jbossorg-docbook-xslt</artifactId>
            <version>1.1.1</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>
            </includes>
          </imageResource>
          <formats>
            <format>
              <formatName>pdf</formatName>
              <stylesheetResource>file:${project.parent.basedir}/src/main/xsl/pdf-style.xsl</stylesheetResource>
               <!--
                             <stylesheetResource>classpath:/xslt/org/jboss/pdf.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>index.html</finalName>
            </format>
          </formats>
          <options>
            <xincludeSupported>true</xincludeSupported>
            <docbookVersion>1.72.0</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>
