<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <packaging>jar</packaging>

  <!--parent>
    <groupId>org.codehaus.castor</groupId>
    <artifactId>castor</artifactId>
    <version>1.3.1-SNAPSHOT</version>
  </parent-->

  <groupId>org.codehaus.castor</groupId>
  <artifactId>castor-docs</artifactId>
  <version>1.3.2</version>
  <name>Castor: Documentation</name>
  <description>Castor Documentation - Reference guide and user manuals.</description>

  <!-- 
  <properties>
    <docs.name>Cocoon Corona</docs.name>
    <docs.urlRelativizer>../</docs.urlRelativizer>
    <docs.mode>online</docs.mode>
    <docs.breadcrumb>corona</docs.breadcrumb>
  </properties>
   -->
   
  <pluginRepositories>
    <pluginRepository>
      <id>agilejava</id>
      <url>http://agilejava.com/maven</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <plugins>
      <plugin>
        <groupId>com.agilejava.docbkx</groupId>
        <artifactId>docbkx-maven-plugin</artifactId>
        <version>2.0.7</version>
        <executions>
          <execution>
            <id>single-page</id>
            <goals>
              <goal>generate-html</goal>
              <goal>generate-pdf</goal>
            </goals>
            <configuration>
              <chunkedOutput>false</chunkedOutput>
              <htmlCustomization>src/docbkx/resources/xsl/html.xsl</htmlCustomization>
              <foCustomization>src/docbkx/resources/xsl/fopdf.xsl</foCustomization>
              <postProcess>
                <copy todir="${basedir}/target/site/reference">
                  <fileset dir="${basedir}/target/docbkx">
                    <include name="**/*.pdf" />
                  </fileset>
                </copy>
                <copy todir="${basedir}/target/site/reference/html-single">
                  <fileset dir="${basedir}/target/docbkx/html">
                    <include name="**/*.html" />
                  </fileset>
                </copy>
                <copy todir="${basedir}/target/site/reference/html-single">
                  <fileset dir="${basedir}/src/docbkx/resources">
                    <include name="**/*.css" />
                    <include name="**/*.png" />
                    <include name="**/*.gif" />
                    <include name="**/*.jpg" />
                  </fileset>
                </copy>
                <move file="target/site/reference/pdf/index.pdf"
                  tofile="target/site/reference/pdf/castor-reference-guide-1.3.1.pdf" failonerror="false" />
              </postProcess>
            </configuration>
            <phase>pre-site</phase>
          </execution>
          <execution>
            <id>multi-page</id>
            <goals>
              <goal>generate-html</goal>
            </goals>
            <configuration>
              <chunkedOutput>true</chunkedOutput>
              <htmlCustomization>src/docbkx/resources/xsl/html_chunk.xsl</htmlCustomization>
              <postProcess>
                <copy todir="${basedir}/target/site/reference">
                  <fileset dir="${basedir}/target/docbkx">
                    <include name="**/*.html" />
                  </fileset>
                </copy>
                <copy todir="${basedir}/target/site/reference/html">
                  <fileset dir="${basedir}/src/docbkx/resources">
                    <include name="**/*.css" />
                    <include name="**/*.png" />
                    <include name="**/*.gif" />
                    <include name="**/*.jpg" />
                  </fileset>
                </copy>
              </postProcess>
            </configuration>
            <phase>pre-site</phase>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.docbook</groupId>
            <artifactId>docbook-xml</artifactId>
            <version>4.4</version>
            <scope>runtime</scope>
          </dependency>
        </dependencies>
        <configuration>
          <includes>index.xml</includes>
          <htmlStylesheet>css/html.css</htmlStylesheet>
          <xincludeSupported>true</xincludeSupported>
          <sourceDirectory>${basedir}/src/docbkx</sourceDirectory>
          <!-- use extensions -->
          <useExtensions>1</useExtensions>
          <highlightSource>1</highlightSource>
          <highlightDefaultLanguage></highlightDefaultLanguage>
          <!-- callouts -->
          <calloutsExtension>1</calloutsExtension>
          <entities>
            <entity>
              <name>version</name>
              <value>${version}</value>
            </entity>
          </entities>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>
