<?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.ws.commons.axiom</groupId>
        <artifactId>axiom</artifactId>
        <version>1.2.21</version>
    </parent>

    <artifactId>apidocs</artifactId>
    <packaging>pom</packaging>

    <name>Javadoc</name>

    <properties>
        <skipDeploy>true</skipDeploy>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-jaxb</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- These are artifacts that are optional/provided dependencies of the above artifacts.
             We need them to process the sources. -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>stax2-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- This prepares the Javadoc for inclusion into the binary distribution. We could
                             as well execute this in the distribution POM, but doing it here ensures that
                             we generate the Javadoc with the exact same configuration. -->
                        <id>distribution-javadoc</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>javadoc-no-fork</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>${project.build.directory}/apidocs</reportOutputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>site-javadoc</id>
                        <phase>site</phase>
                        <goals>
                            <goal>javadoc-no-fork</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>${project.reporting.outputDirectory}</reportOutputDirectory>
                            <destDir>.</destDir>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <includeDependencySources>true</includeDependencySources>
                    <dependencySourceIncludes>
                        <dependencySourceInclude>${project.groupId}:*</dependencySourceInclude>
                    </dependencySourceIncludes>
                    <!-- There are no other modules that generate Javadoc we can link to -->
                    <detectOfflineLinks>false</detectOfflineLinks>
                    <links>
                        <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                        <link>http://download.oracle.com/javaee/1.4/api/</link>
                        <link>http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/1.5/api/</link>
                        <link>http://jaxen.codehaus.org/apidocs/</link>
                    </links>
                    <windowtitle>Apache Axiom</windowtitle>
                    <!-- doctitle only appears in the summary and we should include the version there -->
                    <doctitle>Apache Axiom ${project.version}</doctitle>
                </configuration>
            </plugin>
            <plugin>
                <groupId>${project.groupId}</groupId>
                <artifactId>javadoc-postprocessor-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <phase>site</phase>
                        <goals>
                            <goal>post-process</goal>
                        </goals>
                        <configuration>
                            <javadocDirectory>${project.reporting.outputDirectory}</javadocDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/apidocs.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-site</id>
                        <phase>site</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
