<?xml version="1.0" encoding="utf-8"?>
<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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jgroups</groupId>
  <artifactId>tutorial</artifactId>
  <packaging>jdocbook</packaging>
  <version>1.1.0-SNAPSHOT</version>

  <name>Tutorial</name>
  <description>JGroups 3.x tutorial</description>
  <url>http://www.jgroups.org</url>

  <organization>
    <name>JBoss.org</name>
    <url>http://www.jboss.org</url>
  </organization>

  <properties>
    <translation>en</translation>
    <docname>master</docname>
  </properties>

  <repositories>
    <!-- Conventions are described in http://community.jboss.org/wiki/MavenGettingStarted-Developers -->
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jboss.maven.plugins</groupId>
          <artifactId>maven-jdocbook-plugin</artifactId>
          <version>2.2.1</version>
          <extensions>true</extensions>
          <dependencies>
            <dependency>
              <groupId>org.jboss.pressgang</groupId>
              <!--Non-namespaced version for DocBook 4.5 compatibility. For XSD namespaced version, use pressgang-xslt-ns-->
              <artifactId>pressgang-xslt</artifactId>
              <version>2.0.0</version>
            </dependency>
            <dependency>
              <groupId>org.jboss.pressgang</groupId>
              <artifactId>pressgang-jdocbook-style</artifactId>
              <type>jdocbook-style</type>
              <version>2.0.0</version>
            </dependency>
          </dependencies>
          <configuration>
            <sourceDirectory>${project.basedir}</sourceDirectory>
            <sourceDocumentName>${docname}.xml</sourceDocumentName>
            <masterTranslation>en</masterTranslation>
            <imageResource>
              <directory>${project.basedir}/en</directory>
              <includes>
                <include>images/*.png</include>
              </includes>
            </imageResource>
            <formats>
              <format>
                <formatName>html</formatName>
                <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
                <finalName>index.html</finalName>
              </format>
                <format>
                <formatName>pdf</formatName>
                <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
                <finalName>${docname}.pdf</finalName>
              </format>
              <!--<format>
                <formatName>html_single</formatName>
                <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
                <finalName>index.html</finalName>
              </format>-->
            </formats>
            <options>
              <xmlTransformerType>saxon</xmlTransformerType>
              <xincludeSupported>true</xincludeSupported>
              <docbookVersion>1.72.0</docbookVersion>
              <useRelativeImageUris>true</useRelativeImageUris>
              <!-- TODO delete other options when upgrading to maven-jdocbook-plugin 2.3.5 -->
              <localeSeparator>-</localeSeparator>
              <transformerParameters>
                <property>
                  <name>javax.xml.parsers.DocumentBuilderFactory</name>
                  <value>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</value>
                </property>
                <property>
                  <name>javax.xml.parsers.SAXParserFactory</name>
                  <value>org.apache.xerces.jaxp.SAXParserFactoryImpl</value>
                </property>
              </transformerParameters>
            </options>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <!-- Entry needed to enable jdocbook packaging -->
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jdocbook-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

</project>
