<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.ws.commons.axiom</groupId>
        <artifactId>axiom</artifactId>
        <version>2.0.0</version>
    </parent>

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

    <name>Javadoc</name>

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

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>base64-utils</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>blob</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-jakarta-activation</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-jakarta-jaxb</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-legacy-attachments</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.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.util.tracker</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>
                    </execution>
                    <execution>
                        <id>site-javadoc</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>javadoc-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                    <includeDependencySources>true</includeDependencySources>
                    <dependencySourceIncludes>
                        <dependencySourceInclude>${project.groupId}:*</dependencySourceInclude>
                    </dependencySourceIncludes>
                    <!-- There are no other modules that generate Javadoc we can link to -->
                    <detectOfflineLinks>false</detectOfflineLinks>
                    <windowtitle>Apache Axiom</windowtitle>
                    <!-- doctitle only appears in the summary and we should include the version there -->
                    <doctitle>Apache Axiom ${project.version}</doctitle>
                    <additionalOptions>
                        <additionalOption>-html5</additionalOption>
                    </additionalOptions>
                    <links>
                        <link>https://jakarta.ee/specifications/activation/2.1/apidocs/</link>
                        <link>https://jakarta.ee/specifications/xml-binding/4.0/apidocs/</link>
                    </links>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>site</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.build.directory}/apidocs</directory>
                                </resource>
                            </resources>
                        </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>
