<?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/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-parent</artifactId>
      <version>16.0.14.redhat-00001</version>
      <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>infinispan-javadoc-all</artifactId>
   <name>Infinispan JavaDoc</name>
   <packaging>jar</packaging>

   <properties>
      <javadoc.outputDirectory>${project.build.directory}</javadoc.outputDirectory>
      <skipCentralPublish>true</skipCentralPublish>
   </properties>

   <dependencies>
      <!-- Javadoc plugin does not support transitive dependencies, so we need to copy-paste everything -->

      <!-- javadoc-embedded dependencies -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-query</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-jdbc</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-jdbc-common</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-sql</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-remote</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-rocksdb</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-clustered-counter</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-clustered-lock</artifactId>
      </dependency>

       <dependency>
           <groupId>org.infinispan</groupId>
           <artifactId>infinispan-multimap</artifactId>
       </dependency>

       <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-hotrod</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-memcached</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-resp</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-rest</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-jboss-marshalling</artifactId>
      </dependency>
      <!-- /javadoc-embedded dependencies -->

      <!-- javadoc-remote dependencies -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-client-hotrod</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-tasks-api</artifactId>
      </dependency>
      <!-- /javadoc-remote dependencies -->

      <!-- transitives -->
      <dependency>
         <groupId>jakarta.persistence</groupId>
         <artifactId>jakarta.persistence-api</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate.orm</groupId>
         <artifactId>hibernate-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jgroups</groupId>
         <artifactId>jgroups-raft</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-beans</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-context</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-expression</artifactId>
      </dependency>

      <dependency>
         <groupId>org.springframework.session</groupId>
         <artifactId>spring-session-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.kohsuke.metainf-services</groupId>
         <artifactId>metainf-services</artifactId>
      </dependency>

      <dependency>
         <groupId>org.antlr</groupId>
         <artifactId>antlr-runtime</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>protostream-processor</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss</groupId>
         <artifactId>jdk-misc</artifactId>
         <version>3.Final</version>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-scripting</artifactId>
      </dependency>

      <dependency>
         <groupId>io.projectreactor.tools</groupId>
         <artifactId>blockhound</artifactId>
      </dependency>

      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-core</artifactId>
      </dependency>

      <dependency>
         <groupId>io.mashona</groupId>
         <artifactId>mashona-logwriting</artifactId>
      </dependency>

      <dependency>
         <groupId>io.netty.incubator</groupId>
         <artifactId>netty-incubator-transport-native-io_uring</artifactId>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
               <execution>
                  <id>javadoc</id>
                  <phase>package</phase>
                  <goals>
                     <goal>jar</goal>
                  </goals>
                  <configuration>
                     <doctitle>${infinispan.brand.name} ${infinispan.base.version} API</doctitle>
                     <windowtitle>${infinispan.brand.name} ${infinispan.base.version} JavaDoc</windowtitle>
                     <doclet>org.infinispan.doclets.DocletMultiplexer</doclet>
                     <docletArtifact>
                        <groupId>org.infinispan.doclets</groupId>
                        <artifactId>infinispan-doclets-java11</artifactId>
                        <version>${version.infinispan.doclets}</version>
                     </docletArtifact>
                     <doclint>all</doclint>
                     <docfilessubdirs>true</docfilessubdirs>
                     <detectLinks>false</detectLinks>
                     <header>${infinispan.brand.name} ${infinispan.brand.version}</header>
                     <bottom><![CDATA[
                        Copyright © {inceptionYear}–{currentYear} <a href="https://infinispan.org">infinispan.org</a>. All rights reserved.
                     ]]></bottom>
                     <sourcepath>${sourcepath}</sourcepath>
                     <groups>
                        <group>
                           <title>Core API</title>
                           <packages>org.infinispan*</packages>
                        </group>
                        <group>
                           <title>Persistence API</title>
                           <packages>org.infinispan.persistence*</packages>
                        </group>
                        <group>
                           <title>Query API</title>
                           <packages>org.infinispan.query*</packages>
                        </group>
                        <group>
                           <title>Clustered Counter API</title>
                           <packages>org.infinispan.counter*</packages>
                        </group>
                        <group>
                           <title>Multimap API</title>
                           <packages>org.infinispan.multimap*</packages>
                        </group>
                        <group>
                           <title>Clustered Lock API</title>
                           <packages>org.infinispan.lock*</packages>
                        </group>
                        <group>
                           <title>Remote Client API</title>
                           <packages>org.infinispan.client*</packages>
                        </group>
                        <group>
                           <title>Server Connectors API</title>
                           <packages>org.infinispan.rest*:org.infinispan.server.hotrod*:org.infinispan.server.resp*:org.infinispan.server.memcached*</packages>
                        </group>
                        <group>
                           <title>Tasks API</title>
                           <packages>org.infinispan.tasks*</packages>
                        </group>
                     </groups>
                     <includeDependencySources>true</includeDependencySources>
                     <dependencySourceIncludes>
                        <dependencySourceInclude>org.infinispan:*</dependencySourceInclude>
                     </dependencySourceIncludes>
                     <javadocDirectory>${basedir}/src/main/javadoc</javadocDirectory>
                     <excludePackageNames>org.infinispan.commons.jdkspecific*:*.impl.*:*.backend.*:io.netty*:*.logging.*:org.infinispan.commands*:*.internal.*</excludePackageNames>
                     <excludedocfilessubdir>org/infinispan/commons/jdkspecific</excludedocfilessubdir>
                     <doclint>none</doclint>
                     <useStandardDocletOptions>true</useStandardDocletOptions>
                     <additionalOptions combine.self="override">
                        <additionalOption>--allow-script-in-comments</additionalOption>
                        <additionalOption>--excludeGeneratedBy org.jboss.logging.processor.generator.model.MessageLoggerImplementor</additionalOption>
                     </additionalOptions>
                     <additionalJOptions>
                        <!-- Custom doclet needs access to javadoc module internals -->
                        <additionalJOption>-J--add-opens</additionalJOption>
                        <additionalJOption>-Jjdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED</additionalJOption>
                        <additionalJOption>-J--add-opens</additionalJOption>
                        <additionalJOption>-Jjava.base/java.util=ALL-UNNAMED</additionalJOption>
                        <!--additionalJOption>-J-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8787</additionalJOption-->
                     </additionalJOptions>
                     <!-- Declare our custom javadoc tags and provide a replacement text for them to be used just in case exclusion fails. -->
                     <tags>
                        <tag>
                           <name>api.public</name>
                           <placement>a</placement>
                           <head>&lt;div class="deprecationBlock"&gt;&lt;b&gt;Public API&lt;/b&gt;&lt;/div&gt;</head>
                        </tag>
                        <tag>
                           <name>api.private</name>
                           <placement>a</placement>
                           <head>&lt;div class="deprecationBlock"&gt;&lt;b&gt;THIS IS NOT PUBLIC API! This is a private implementation detail and must not be referenced by user code.&lt;/b&gt;&lt;/div&gt;</head>
                        </tag>
                     </tags>
                     <additionalDependencies>
                        <additionalDependency>
                           <groupId>jakarta.enterprise</groupId>
                           <artifactId>jakarta.enterprise.cdi-api</artifactId>
                           <version>${version.jakarta.enterprise.cdi}</version>
                        </additionalDependency>
                        <additionalDependency>
                           <groupId>io.agroal</groupId>
                           <artifactId>agroal-api</artifactId>
                           <version>${version.io.agroal}</version>
                        </additionalDependency>
                         <additionalDependency>
                             <groupId>io.micrometer</groupId>
                             <artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
                             <version>${version.micrometer}</version>
                         </additionalDependency>
                     </additionalDependencies>
                     <outputDirectory>${javadoc.outputDirectory}</outputDirectory>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <skip>true</skip>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>
