<?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-parent</artifactId>
      <version>9.2.2.Final</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>

   <properties>
      <testNGListener />
   </properties>


   <artifactId>infinispan-remote-it</artifactId>
   <name>Infinispan Remote Client Integration Tests</name>
   <description>Infinispan Remote Client All-in-One module Integration Tests</description>

   <dependencies>
      <dependency>
         <groupId>javax.cache</groupId>
         <artifactId>cache-api</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-remote</artifactId>
         <scope>test</scope>
      </dependency>
      <!-- Make sure this suite is triggered after full server build -->
      <dependency>
         <groupId>org.infinispan.server</groupId>
         <artifactId>infinispan-server-build</artifactId>
         <version>${project.version}</version>
         <type>zip</type>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.arquillian.junit</groupId>
         <artifactId>arquillian-junit-container</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.wildfly.arquillian</groupId>
         <artifactId>wildfly-arquillian-container-managed</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <testResources>
         <testResource>
            <filtering>true</filtering>
            <directory>src/test/resources</directory>
         </testResource>
      </testResources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>integration-test</goal>
                     <goal>verify</goal>
                  </goals>
                  <configuration>
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>unpack-server-1</id>
                  <phase>process-test-resources</phase>
                  <goals>
                     <goal>unpack</goal>
                  </goals>
                  <configuration>
                     <skip>${skipTests}</skip>
                     <artifactItems>
                        <artifactItem>
                           <groupId>org.infinispan.server</groupId>
                           <artifactId>infinispan-server-build</artifactId>
                           <version>${project.version}</version>
                           <type>zip</type>
                           <outputDirectory>${project.build.directory}/node1</outputDirectory>
                        </artifactItem>
                        <artifactItem>
                           <groupId>org.infinispan.server</groupId>
                           <artifactId>infinispan-server-build</artifactId>
                           <version>${project.version}</version>
                           <type>zip</type>
                           <outputDirectory>${project.build.directory}/node2</outputDirectory>
                        </artifactItem>
                     </artifactItems>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <parallel>none</parallel>
               <systemPropertyVariables>
                  <infinispan.jcache.mgmt.lookup.skip>true</infinispan.jcache.mgmt.lookup.skip>
               </systemPropertyVariables>
               <groups combine.self="override" />
               <excludedGroups combine.self="override" />
               <disableXmlReport>false</disableXmlReport>
               <properties>
                  <property>
                     <name>usedefaultlisteners</name>
                     <value>false</value>
                  </property>
                  <property>
                     <name>listener</name>
                     <value>${junitListener}</value>
                  </property>
               </properties>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>smoke</id>
         <properties>
            <skipTests>true</skipTests>
         </properties>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>default-test</id>
                        <phase>none</phase>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-failsafe-plugin</artifactId>
                  <configuration>
                     <skipITs>${skipTests}</skipITs>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
