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

   <properties>
      <testNGListener />
      <server.build.dist>${basedir}/../../server/integration/build/target/server-distribution-thin/</server.build.dist>
      <server1.dist>${project.build.directory}/node1</server1.dist>
      <server2.dist>${project.build.directory}/node2</server2.dist>
   </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>
         <type>pom</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-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>
                  <usedefaultlisteners>false</usedefaultlisteners>
                  <listener>${junitListener}</listener>
               </properties>
            </configuration>
         </plugin>
         <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>copy-server-dist</id>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <phase>process-test-resources</phase>
                  <configuration>
                     <skip>${skipTests}</skip>
                     <target>
                        <ant antfile="copy-server.xml" inheritRefs="true" target="create-distro" />
                        <!-- It happens when you do not specify namespaces in the XSLT templates for the newly added nodes
                             then the IBM jdk transformation is adding empty namespace there - not possible to influence this
                             behaviour by any environmental property - this is a bit workaround for it -->
                        <echo message="Removing empty xmlns attributes (xmlns=&apos;&apos;) which IBM JDK could produce" />
                        <replace dir="target" value="">
                           <include name="server/node*/standalone/configuration/**/*.xml" />
                           <replacetoken><![CDATA[xmlns=""]]></replacetoken>
                        </replace>
                     </target>
                  </configuration>
               </execution>
            </executions>
         </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>
