<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  ~
  -->
<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>

    <parent>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid-java-build</artifactId>
        <version>6.1.0-SNAPSHOT</version>
    </parent>

    <artifactId>qpid-java-doc</artifactId>
    <name>Apache Qpid for Java Docbook</name>
    <description>Java Qpid Docbook</description>
    <packaging>pom</packaging>

    <properties>
        <jar.skipIfEmpty>true</jar.skipIfEmpty>
        <maven.install.skip>true</maven.install.skip>

        <docbook.src>${project.basedir}/src/docbkx</docbook.src>
        <docbook.target.filtered>${basedir}/target/filtered-docbkx</docbook.target.filtered>
        <docbook.target>${basedir}/target/docbkx</docbook.target>

        <qpidDownloadUrlDesc>the Apache Qpid project web site</qpidDownloadUrlDesc>
        <qpidDownloadUrl>http://qpid.apache.org/download.html</qpidDownloadUrl>

        <qpidJavaBrokerBook>../../java-broker/book/</qpidJavaBrokerBook>
        <qpidJmsClient08Book>../../jms-client-0-8/book/</qpidJmsClient08Book>
        <qpidJmsClient010Book>../../jms-client-0-10/book/</qpidJmsClient010Book>

        <qpidCppBook>../../cpp-broker/book/</qpidCppBook>

        <oracleJdkDocUrl>http://docs.oracle.com/javase/7/docs/api/</oracleJdkDocUrl>
        <oracleJeeDocUrl>http://docs.oracle.com/javaee/6/api/</oracleJeeDocUrl>
        <oracleKeytool>http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html</oracleKeytool>
        <oracleJmsSpec>http://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spec-oth-JSpec/</oracleJmsSpec>
        <oracleJmsTutorial>http://docs.oracle.com/javaee/6/tutorial/doc/bncdq.html</oracleJmsTutorial>

        <oracleJeDownloadUrl>http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html?ssSourceSiteId=ocomen</oracleJeDownloadUrl>
        <oracleBdbRepGuideUrl>http://oracle.com/cd/E17277_02/html/ReplicationGuide/</oracleBdbRepGuideUrl>
        <oracleBdbJavaDocUrl>http://docs.oracle.com/cd/E17277_02/html/java/</oracleBdbJavaDocUrl>

        <qpidSrc>http://svn.apache.org/viewvc/qpid/java/trunk/</qpidSrc>
        <qpidSrcSuffix>.java?view=co/</qpidSrcSuffix>

        <qpidMavenRepoDesc>Maven repositories</qpidMavenRepoDesc>
        <qpidClientGroupId>org.apache.qpid</qpidClientGroupId>
        <qpidClientArtefactId>qpid-client</qpidClientArtefactId>

        <amqpSrc>http://www.amqp.org</amqpSrc>
    </properties>

    <modules>
        <module>java-broker</module>
        <module>jms-client-0-8</module>
        <module>jms-client-0-10</module>
        <module>java-perftests</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>filter-docbook-sources</id>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <outputDirectory>${docbook.target.filtered}</outputDirectory>
                        <resources>
                            <resource>
                                <directory>${docbook.src}</directory>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                        <escapeString>\</escapeString>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.agilejava.docbkx</groupId>
                    <artifactId>docbkx-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>docbook-html</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>generate-xhtml</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>net.sf.docbook</groupId>
                            <artifactId>docbook-xml</artifactId>
                            <version>${maven-docbook-xml-plugin-version}</version>
                            <classifier>resources</classifier>
                            <type>zip</type>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <sourceDirectory>${docbook.target.filtered}</sourceDirectory>
                        <targetDirectory>${docbook.target}</targetDirectory>
                        <xincludeSupported>true</xincludeSupported>
                        <chunkedOutput>true</chunkedOutput>
                        <showXslMessages>true</showXslMessages>
                        <xhtmlCustomization>../src/main/docbkx/docbook-xhtml.xsl</xhtmlCustomization>
                        <htmlStylesheet>./css/style.css</htmlStylesheet>
                        <customizationParameters>
                            <parameter>
                                <name>use.id.as.filename</name>
                                <value>1</value>
                            </parameter>
                            <parameter>
                                <name>section.autolabel</name>
                                <value>1</value>
                            </parameter>
                            <parameter>
                                <name>section.autolabel.max.depth</name>
                                <value>3</value>
                            </parameter>
                            <parameter>
                                <name>section.label.includes.component.label</name>
                                <value>1</value>
                            </parameter>
                            <parameter>
                                <name>callout.unicode</name>
                                <value>0</value>
                            </parameter>
                        </customizationParameters>
                        <preProcess>
                            <copy todir="${docbook.target}/images" failOnError="false">
                                <fileset dir="${docbook.src}/images" />
                            </copy>
                            <copy todir="${docbook.target}/css" failOnError="false">
                                <fileset dir="${project.basedir}/../src/main/docbkx/css" />
                            </copy>
                        </preProcess>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
                        <descriptors>
                            <descriptor>${project.basedir}/../src/main/assembly/html.xml</descriptor>
                        </descriptors>
                        <tarLongFileMode>gnu</tarLongFileMode>
                        <appendAssemblyId>false</appendAssemblyId>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <skipAssembly>true</skipAssembly>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
