<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-server-parent</artifactId>
      <version>14.0.11.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-server-runtime</artifactId>
   <packaging>jar</packaging>
   <name>Infinispan Server</name>
   <description>Infinispan Server</description>

   <properties>
      <module.skipMavenRemoteResource>true</module.skipMavenRemoteResource>
      <defaultTestGroup/>
      <defaultExcludedTestGroup/>
      <server.output.dir>${project.build.directory}/${infinispan.brand.prefix}-server-${infinispan.brand.version}</server.output.dir>
      <server.test.lib.dir>${project.build.directory}/testlibs</server.test.lib.dir>
   </properties>

   <dependencies>
      <!-- Build dependencies. -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-component-processor</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>protostream-processor</artifactId>
      </dependency>
      <!-- Compile dependencies. All of these will be shipped in the server -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-hotrod</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-rest</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-memcached</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-resp</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-router</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-remote-query-server</artifactId>
         <type>jar</type>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-client-hotrod</artifactId>
         <exclusions>
            <exclusion>
               <groupId>org.wildfly.security</groupId>
               <artifactId>*</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-client-rest</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-jdbc</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>
         <exclusions>
            <exclusion>
               <groupId>org.rocksdb</groupId>
               <artifactId>rocksdbjni</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cli-client</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-scripting</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-jboss-marshalling</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-anchored-keys</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cloudevents-integration</artifactId>
      </dependency>
      <dependency>
         <groupId>io.agroal</groupId>
         <artifactId>agroal-pool</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-api</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-core</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j-impl</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-jul</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.latencyutils</groupId>
         <artifactId>LatencyUtils</artifactId>
         <scope>compile</scope>
         <exclusions>
            <exclusion>
               <groupId>org.hdrhistogram</groupId>
               <artifactId>HdrHistogram</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <artifactId>HdrHistogram</artifactId>
         <groupId>org.hdrhistogram</groupId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.glassfish</groupId>
         <artifactId>javax.json</artifactId>
      </dependency>
      <dependency>
         <groupId>org.kohsuke.metainf-services</groupId>
         <artifactId>metainf-services</artifactId>
      </dependency>
      <dependency>
         <groupId>org.openjdk.jmh</groupId>
         <artifactId>jmh-core</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-java</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-linux-x86_64</artifactId>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-auth-server-http</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-auth-server-sasl</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-basic</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-bearer</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-cert</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-digest</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-spnego</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-http-util</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-realm-ldap</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-realm-token</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-ssl</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-digest</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-external</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-gssapi</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-gs2</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-localuser</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-oauth2</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-plain</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.security</groupId>
         <artifactId>wildfly-elytron-sasl-scram</artifactId>
      </dependency>

      <!-- Test dependencies -->
      <dependency>
         <groupId>org.antlr</groupId>
         <artifactId>antlr-runtime</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.shrinkwrap</groupId>
         <artifactId>shrinkwrap-depchain</artifactId>
         <type>pom</type>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <testResources>
         <testResource>
            <directory>${project.basedir}/src/test/resources</directory>
            <filtering>true</filtering>
            <includes>
               <include>**/*.xml</include>
               <include>**/*.json</include>
               <include>**/*.yaml</include>
            </includes>
         </testResource>
         <testResource>
            <directory>${project.basedir}/src/test/resources</directory>
            <filtering>false</filtering>
            <excludes>
               <exclude>**/*.xml</exclude>
               <exclude>**/*.json</exclude>
               <exclude>**/*.yaml</exclude>
            </excludes>
         </testResource>
      </testResources>
      <plugins>
         <plugin>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-defaults-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
               <execution>
                  <id>extract-defaults</id>
                  <phase>process-classes</phase>
                  <goals>
                     <goal>extract-defaults</goal>
                  </goals>
                  <configuration>
                     <jars>
                        <jar>infinispan-core</jar>
                        <jar>infinispan-server-core</jar>
                        <jar>infinispan-server-hotrod</jar>
                     </jars>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>console</id>
                  <phase>package</phase>
                  <goals>
                     <goal>unpack</goal>
                  </goals>
                  <configuration>
                     <artifactItems>
                        <artifactItem>
                           <groupId>org.infinispan</groupId>
                           <artifactId>infinispan-console</artifactId>
                           <outputDirectory>${server.output.dir}/static/console</outputDirectory>
                        </artifactItem>
                     </artifactItems>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <parallel>classes</parallel>
               <groups combine.self="override"/>
               <excludedGroups combine.self="override">${defaultExcludedJUnitGroups}</excludedGroups>
               <testNGArtifactName>none:none</testNGArtifactName>
               <disableXmlReport>false</disableXmlReport>
               <properties combine.self="override">
                  <usedefaultlisteners>false</usedefaultlisteners>
                  <listener>${junitListener}</listener>
                  <log4j.configurationFile>${log4j.configurationFile}</log4j.configurationFile>
               </properties>
               <systemPropertyVariables>
                  <server.output.dir>${server.output.dir}</server.output.dir>
               </systemPropertyVariables>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
               <execution>
                  <id>default-jar</id>
                  <configuration>
                     <excludes>
                        <exclude>org/infinispan/server/loader/**</exclude>
                     </excludes>
                  </configuration>
               </execution>
               <execution>
                  <id>loader</id>
                  <phase>package</phase>
                  <goals>
                     <goal>jar</goal>
                  </goals>
                  <configuration>
                     <classifier>loader</classifier>
                     <includes>
                        <include>org/infinispan/server/loader/*</include>
                     </includes>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.infinispan.maven-plugins</groupId>
            <artifactId>proto-schema-compatibility</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>proto-schema-compatibility-check</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>clean-server</id>
                  <phase>clean</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <target>
                        <property name="output.dir"
                                  value="${server.output.dir}"/>
                        <ant antfile="build.xml" inheritRefs="true">
                           <target name="clean"/>
                        </ant>
                     </target>
                  </configuration>
               </execution>
               <execution>
                  <id>build-server</id>
                  <phase>package</phase>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <configuration>
                     <target>
                        <property name="compile_classpath" refid="maven.compile.classpath"/>
                        <property name="plugin_classpath" refid="maven.plugin.classpath"/>
                        <property name="output.dir"
                                  value="${server.output.dir}"/>
                        <property name="server.dir"
                                  value="${project.basedir}/src/main/server"/>
                        <property name="test.lib.dir"
                                  value="${server.test.lib.dir}"/>
                        <property name="dollar" value="$"/>
                        <property name="licenses.template.dir"
                                  value="${project.basedir}/../../distribution/src/main/resources/template"/>
                        <property name="licenses.data.dir"
                                  value="${project.basedir}/../../distribution/src/main/resources/licenses"/>

                        <filterset id="brandfilter" begintoken="${dollar}{" endtoken="}">
                           <filter token="infinispan.brand.name" value="${infinispan.brand.name}"/>
                           <filter token="infinispan.brand.version" value="${infinispan.brand.version}"/>
                           <filter token="infinispan.brand.short-name" value="${infinispan.brand.short-name}"/>
                           <filter token="current.year" value="${current.year}"/>
                        </filterset>

                        <dependencyfilesets scopes="compile"/>
                        <dependencyfilesets scopes="test" projectDependenciesId="maven.test.dependencies"/>
                        <ant antfile="build.xml" inheritRefs="true">
                           <target name="build"/>
                        </ant>
                     </target>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>org.infinispan</groupId>
                  <artifactId>infinispan-tools</artifactId>
                  <version>${version.infinispan}</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <groupId>org.wildfly.maven.plugins</groupId>
            <artifactId>licenses-plugin</artifactId>
            <executions>
               <execution>
                  <id>update-licenses-xml</id>
                  <goals>
                     <goal>insert-versions</goal>
                  </goals>
                  <phase>generate-resources</phase>
                  <configuration>
                     <sortByGroupIdAndArtifactId>true</sortByGroupIdAndArtifactId>
                     <licensesOutputFile>${server.output.dir}/docs/licenses/licenses.xml</licensesOutputFile>
                     <excludedArtifacts>.*jcip.*|infinispan-tools|java-getopt</excludedArtifacts>
                     <includeSelfArtifact>true</includeSelfArtifact>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xml-maven-plugin</artifactId>
            <version>${versionx.org.codehaus.mojo.xml-maven-plugin}</version>
            <inherited>false</inherited>
            <executions>
               <execution>
                  <id>generate-licenses-html</id>
                  <goals>
                     <goal>transform</goal>
                  </goals>
                  <phase>package</phase>
                  <configuration>
                     <transformationSets>
                        <transformationSet>
                           <dir>${server.output.dir}/docs/licenses</dir>
                           <includes>
                              <include>licenses.xml</include>
                           </includes>
                           <stylesheet>${project.basedir}/../../distribution/src/main/resources/template/licenses.xsl
                           </stylesheet>
                           <outputDir>${server.output.dir}/docs/licenses</outputDir>
                           <fileMappers>
                              <fileMapper
                                    implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                                 <targetExtension>.html</targetExtension>
                              </fileMapper>
                           </fileMappers>
                           <parameters>
                              <parameter>
                                 <name>product</name>
                                 <value>${infinispan.brand.name} Server</value>
                              </parameter>
                              <parameter>
                                 <name>version</name>
                                 <value>${infinispan.brand.version}</value>
                              </parameter>
                           </parameters>
                        </transformationSet>
                     </transformationSets>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>community</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <dependencies>
            <dependency>
               <groupId>io.netty.incubator</groupId>
               <artifactId>netty-incubator-transport-native-io_uring</artifactId>
            </dependency>

            <dependency>
               <groupId>io.netty.incubator</groupId>
               <artifactId>netty-incubator-transport-native-io_uring</artifactId>
               <classifier>linux-x86_64</classifier>
            </dependency>

            <dependency>
               <groupId>io.netty.incubator</groupId>
               <artifactId>netty-incubator-transport-native-io_uring</artifactId>
               <classifier>linux-aarch_64</classifier>
            </dependency>
         </dependencies>
      </profile>
   </profiles>
</project>
