<?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>12.1.7.Final-redhat-00001</version>
      <relativePath>../pom.xml</relativePath>
   </parent>
   <artifactId>infinispan-javadoc-all</artifactId>
   <name>Infinispan JavaDoc</name>
   <packaging>jar</packaging>

   <properties>
      <analytics.code>
---&gt;
-&lt;!--
-&lt;script type='text/javascript'&gt;
-try {
-(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-ga('create', 'UA-8601422-4', 'auto');
-ga('send', 'pageview');
-} catch(err) {}&lt;/script&gt;
      </analytics.code>
   </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-query-dsl</artifactId>
      </dependency>

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

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

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

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

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-persistence-soft-index</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-rest</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-spring5-common</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-spring5-embedded</artifactId>
      </dependency>

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-extended-statistics</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>org.hibernate.javax.persistence</groupId>
         <artifactId>hibernate-jpa-2.1-api</artifactId>
      </dependency>

      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-core</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>2.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>
   </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>
                     <doclet>org.infinispan.doclets.DocletMultiplexer</doclet>
                     <docletArtifact>
                        <groupId>org.infinispan.doclets</groupId>
                        <artifactId>infinispan-doclets-java11</artifactId>
                        <version>${version.infinispan.doclets}</version>
                     </docletArtifact>
                     <docfilessubdirs>true</docfilessubdirs>
                     <detectLinks>false</detectLinks>
                     <footer>${analytics.code}</footer>
                     <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*:org.infinispan.objectfilter*</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>Distributed Executors (deprecated)</title>
                           <packages>org.infinispan.distexec*</packages>
                        </group>
                        <group>
                           <title>Remote Client API</title>
                           <packages>org.infinispan.client*</packages>
                        </group>
                        <group>
                           <title>Server Connectors API</title>
                           <packages>org.infinispan.rest*</packages>
                        </group>
                        <group>
                           <title>Tasks API</title>
                           <packages>org.infinispan.tasks*</packages>
                        </group>
                     </groups>
                     <includeDependencySources>true</includeDependencySources>
                     <includeTransitiveDependencySources>false</includeTransitiveDependencySources>
                     <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>
                     <release>8</release>
                     <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-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>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>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>javax.enterprise</groupId>
                           <artifactId>cdi-api</artifactId>
                           <version>${version.cdi}</version>
                        </additionalDependency>
                        <additionalDependency>
                           <groupId>javax.cache</groupId>
                           <artifactId>cache-api</artifactId>
                           <version>${version.javax.cache}</version>
                        </additionalDependency>
                        <additionalDependency>
                           <groupId>javax.servlet</groupId>
                           <artifactId>servlet-api</artifactId>
                           <version>${version.javax.servlet}</version>
                        </additionalDependency>
                        <additionalDependency>
                           <groupId>io.agroal</groupId>
                           <artifactId>agroal-api</artifactId>
                           <version>${version.io.agroal}</version>
                        </additionalDependency>
                        <additionalDependency>
                           <groupId>org.wildfly.openssl</groupId>
                           <artifactId>wildfly-openssl-java</artifactId>
                           <version>${version.org.wildfly.openssl}</version>
                        </additionalDependency>
                     </additionalDependencies>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <skip>true</skip>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>

      <profile>
         <id>nexus-staging</id>
         <activation>
            <property><name>!skipNexusStaging</name></property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-deploy-plugin</artifactId>
                  <configuration>
                     <skip>true</skip>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
         <id>distribution</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>upload</id>
                        <phase>deploy</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <skip>${skipArtifactUpload}</skip>
                           <target>
                              <echo message="Uploading JavaDocs" />
                              <exec dir="${project.build.directory}" executable="rsync">
                                 <arg value="-rvm" />
                                 <arg line="--protocol=29" />
                                 <arg line="-e &quot;ssh -i ${upload.keyFile}&quot;" />
                                 <arg value="apidocs" />
                                 <arg value="${upload.docsDir}" />
                              </exec>
                              <scp todir="${upload.docsDir}/apidocs" keyfile="${upload.keyFile}" verbose="true" compressed="true">
                                 <fileset dir="${project.build.directory}/apidocs" />
                              </scp>
                           </target>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
