<?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>9.1.0.Final</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>
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-mapper-asl</artifactId>
      </dependency>

      <dependency>
         <groupId>com.thoughtworks.xstream</groupId>
         <artifactId>xstream</artifactId>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>infinispan-server-core</artifactId>
      </dependency>

      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-client</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>io.netty</groupId>
         <artifactId>netty-tcnative-boringssl-static</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-all</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.openjdk.jmh</groupId>
         <artifactId>jmh-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.openjdk.jmh</groupId>
         <artifactId>jmh-generator-annprocess</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
               <attachClasses>true</attachClasses>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>keytool-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>default_server</id>
                  <goals>
                     <goal>generateKeyPair</goal>
                  </goals>
                  <phase>generate-test-resources</phase>
                  <configuration>
                     <alias>default</alias>
                     <keystore>${project.build.testOutputDirectory}/default_server_keystore.jks</keystore>
                     <dname>${certificate.dname}</dname>
                  </configuration>
               </execution>
               <execution>
                  <id>default_truststore</id>
                  <goals>
                     <goal>importKeystore</goal>
                  </goals>
                  <phase>generate-test-resources</phase>
                  <configuration>
                     <srckeystore>${project.build.testOutputDirectory}/default_server_keystore.jks</srckeystore>
                     <srcstorepass>secret</srcstorepass>
                     <destkeystore>${project.build.testOutputDirectory}/default_client_truststore.jks</destkeystore>
                     <deststorepass>secret</deststorepass>
                  </configuration>
               </execution>
            </executions>
            <configuration>
               <skipIfExist>true</skipIfExist>
               <storepass>secret</storepass>
               <keypass>secret</keypass>
               <keysize>2048</keysize>
               <keyalg>RSA</keyalg>
               <validity>365</validity>
               <noprompt>true</noprompt>
               <trustcacerts>true</trustcacerts>
               <verbose>true</verbose>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>