<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_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>15.0.0.Dev07</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-server-rest</artifactId>
   <name>Infinispan REST Server</name>
   <description>REST interface for Infinispan</description>

   <properties>
      <certificate.dname>CN=HotRod_1,OU=Infinispan,O=JBoss,L=Red Hat,ST=World,C=WW</certificate.dname>
      <testjvm.extraArgs>-Djdk.httpclient.allowRestrictedHeaders=host</testjvm.extraArgs>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-api</artifactId>
      </dependency>

      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>protostream-processor</artifactId>
         <version>${version.protostream}</version>
      </dependency>

      <dependency>
         <groupId>org.infinispan.protostream</groupId>
         <artifactId>protostream</artifactId>
         <version>${version.protostream}</version>
      </dependency>

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

      <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-core</artifactId>
      </dependency>

      <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-registry-prometheus</artifactId>
         <exclusions>
            <exclusion>
               <groupId>io.prometheus</groupId>
               <artifactId>simpleclient_tracer_otel</artifactId>
            </exclusion>
            <exclusion>
               <groupId>io.prometheus</groupId>
               <artifactId>simpleclient_tracer_otel_agent</artifactId>
            </exclusion>
         </exclusions>
      </dependency>

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

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

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

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

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-tasks</artifactId>
         <optional>true</optional>
      </dependency>

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

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

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

       <!-- and now for unit and integration tests -->
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-server-core</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-tasks</artifactId>
         <version>${project.version}</version>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-query</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.junit.support</groupId>
         <artifactId>testng-engine</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-api</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-engine</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.antlr</groupId>
         <artifactId>antlr-runtime</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.netty</groupId>
         <artifactId>netty-codec-http</artifactId>
      </dependency>
      <dependency>
         <groupId>io.netty</groupId>
         <artifactId>netty-codec-http2</artifactId>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-java</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-linux-x86_64</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-windows-x86_64</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.openssl</groupId>
         <artifactId>wildfly-openssl-macosx-x86_64</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.openjdk.jmh</groupId>
         <artifactId>jmh-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-cachestore-jdbc</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.openjdk.jmh</groupId>
         <artifactId>jmh-generator-annprocess</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-client-rest</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <dependenciesToScan>
                  <!-- TestNGSuiteChecksTest -->
                  <dependency>org.infinispan:infinispan-commons-test</dependency>
               </dependenciesToScan>
            </configuration>
            <executions>
               <execution>
                  <id>serial-execution</id>
                  <phase>test</phase>
                  <goals>
                     <goal>test</goal>
                  </goals>
                  <configuration>
                     <properties>
                        <configurationParameters>
                           testng.excludedGroups = ${defaultExcludedTestNGGroups}
                           testng.groups = tracing
                           testng.listeners = ${testNGListeners}
                           testng.useDefaultListeners = false
                           testng.parallel = none
                           testng.threadCount = ${infinispan.test.parallel.threads}
                        </configurationParameters>
                     </properties>
                     <parallel>none</parallel>
                     <groups>tracing</groups>
                  </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>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>nashorn-tests</id>
         <activation>
            <jdk>[16,)</jdk>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.openjdk.nashorn</groupId>
               <artifactId>nashorn-core</artifactId>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>
      <profile>
         <id>java8-test</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <skipTests>true</skipTests>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
