<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
 Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.

 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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>
    <parent>
        <groupId>org.opendaylight.mdsal</groupId>
        <artifactId>bundle-parent</artifactId>
        <version>15.0.7</version>
        <relativePath>../bundle-parent/pom.xml</relativePath>
    </parent>

    <artifactId>mdsal-docs</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <description>MD-SAL documentation</description>

    <properties>
        <!-- FIXME: fix these up and set maven.javadoc.failOnWarnings=true -->
        <doclint>all,-missing</doclint>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-common-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-broker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-schema-osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-inmemory-datastore</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-dom-adapter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-dom-adapter</artifactId>
            <type>test-jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-test-utils</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal.model</groupId>
            <artifactId>general-entity</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-eos-common-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-eos-dom-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-eos-dom-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-eos-binding-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-eos-binding-adapter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-singleton-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-singleton-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-trace-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-trace-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-trace-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-yanglib-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-yanglib-rfc8525</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-replicate-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-replicate-netty</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.mdsal.model</groupId>
            <artifactId>opendaylight-l2-types</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal.model</groupId>
            <artifactId>ietf-topology</artifactId>
        </dependency>

        <!-- Also add dependencies we are using -->
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-qual</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.gaul</groupId>
            <artifactId>modernizer-maven-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.immutables</groupId>
            <artifactId>value</artifactId>
            <classifier>annotations</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component.annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.metatype.annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.util.tracker</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>1.5.7.1</version>
                <executions>
                    <execution>
                        <id>output-html</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <backend>html</backend>
                            <attributes>
                                <toc/>
                                <linkcss>false</linkcss>
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
                    <configuration>
                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
                    <attributes>
                        <revnumber>${project.version}</revnumber>
                        <revdate>${maven.build.timestamp}</revdate>
                        <organization>${project.organization.name}</organization>
                    </attributes>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-sources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <includes>org/opendaylight/**</includes>
                            <includeGroupIds>org.opendaylight.mdsal</includeGroupIds>
                            <outputDirectory>${project.build.directory}/src</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <!-- post-compile, but before prepare-package -->
                        <phase>process-classes</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/src</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <!-- prepare-package so we build the source package before javadoc -->
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <executions>
                    <execution>
                        <id>remove-undocumented-sources</id>
                        <!-- Before javadoc runs -->
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets>
                                <fileset>
                                    <directory>${project.build.directory}/src</directory>
                                    <includes>
                                        <include>**/$YangModelBindingProvider.java</include>
                                        <include>**/$YangModuleInfoImpl.java</include>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- FIXME: remove this section once we can activate javadoc-links profile -->
                <configuration combine.children="append">
                    <links>
                        <link>https://docs.junit.org/5.14.2/api/</link>
                        <link>https://hamcrest.org/JavaHamcrest/javadoc/3.0/</link>
                        <link>https://www.slf4j.org/apidocs/</link>
                        <link>https://guava.dev/releases/33.5.0-jre/api/docs/</link>

                        <link>https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/14.3.6/</link>
                        <link>https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/14.0.24/</link>
                    </links>
                    <groups>
                        <group>
                            <title>Common interfaces</title>
                            <packages>org.opendaylight.mdsal.common*</packages>
                        </group>
                        <group>
                            <title>Low-level (DOM) MD-SAL</title>
                            <packages>org.opendaylight.mdsal.dom*</packages>
                        </group>
                        <group>
                            <title>Type-safe (Binding) MD-SAL</title>
                            <packages>org.opendaylight.mdsal.binding*:org.opendaylight.yangtools.yang.binding*</packages>
                        </group>
                        <group>
                            <title>Entity Ownership Service</title>
                            <packages>org.opendaylight.mdsal.eos*:org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.core.general.entity*</packages>
                        </group>
                        <group>
                            <title>Cluster Singleton Service</title>
                            <packages>org.opendaylight.mdsal.singleton*</packages>
                        </group>
                        <group>
                            <title>MD-SAL Tracing Utilities</title>
                            <packages>org.opendaylight.mdsal.trace*:org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsaltrace*</packages>
                        </group>
                        <group>
                            <title>Java Bindings for YANG modules</title>
                            <packages>org.opendaylight.yang.gen.v1*</packages>
                        </group>
                    </groups>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
