<?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.server</groupId>
        <artifactId>infinispan-server-versions</artifactId>
        <version>7.0.0.Alpha3</version>
        <relativePath>../versions/pom.xml</relativePath>
    </parent>

    <artifactId>test-suite</artifactId>
    <packaging>jar</packaging>
    <name>Infinispan Server - Test Suite</name>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-container-managed</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logmanager</groupId>
                    <artifactId>jboss-logmanager</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logmanager</groupId>
                    <artifactId>log4j-jboss-logmanager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.infinispan.arquillian.container</groupId>
            <artifactId>infinispan-arquillian-impl</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logmanager</groupId>
                    <artifactId>jboss-logmanager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-client-hotrod</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logmanager</groupId>
                    <artifactId>jboss-logmanager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.logmanager</groupId>
                    <artifactId>jboss-logmanager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.infinispan.protostream</groupId>
            <artifactId>sample-domain-implementation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-query-dsl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-remote-query-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.iq80.leveldb</groupId>
            <artifactId>leveldb</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-controller</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-controller-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.infinispan.server</groupId>
            <artifactId>infinispan-server-infinispan</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ant-contrib</groupId>
            <artifactId>ant-contrib</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>ant</groupId>
                    <artifactId>ant</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.picketbox</groupId>
            <artifactId>jbosssx-bare</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>apache-karaf</artifactId>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-container-karaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-junit4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-inject</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
    </dependencies>

    <properties>
        <h2.server.ip>127.0.0.1</h2.server.ip>
        <h2.server.address>tcp://${h2.server.ip}:9092</h2.server.address>
        <database>h2</database>
        <driver.dir>${project.build.directory}/test-libs</driver.dir>
        <driver.jar>h2.jar</driver.jar>
        <driver.class>org.h2.jdbcx.JdbcDataSource</driver.class>

        <connection.url>jdbc:h2:${h2.server.address}/mem:test;DB_CLOSE_DELAY=-1</connection.url>
        <connection.url.other>jdbc:h2:${h2.server.address}/mem:test_other;DB_CLOSE_DELAY=-1</connection.url.other>

        <password>sa</password>
        <username>sa</username>

        <password.other>sa</password.other>
        <username.other>sa</username.other>

        <ispnserver.project.dir>${basedir}/..</ispnserver.project.dir>
        <server.build.dist>${ispnserver.project.dir}/build/target/infinispan-server-${project.version}</server.build.dist>

        <server1.dist>${basedir}/target/server/node1</server1.dist>
        <server2.dist>${basedir}/target/server/node2</server2.dist>
        <server3.dist>${basedir}/target/server/node3</server3.dist>
        <server.old.dist>${basedir}/target/server/node_old</server.old.dist>

        <server.jvm>${env.JAVA_HOME}</server.jvm>
        <resources.dir>${basedir}/src/test/resources</resources.dir>

        <jvm.memory.args>-Xmx512m -XX:MaxPermSize=128m</jvm.memory.args>
        <jvm.x64.args />
        <default.transport.stack>udp</default.transport.stack>
        <transport.stack>-Djboss.default.jgroups.stack=${default.transport.stack}</transport.stack>

        <jvm.ip.stack>-Djava.net.preferIPv4Stack=true</jvm.ip.stack>
        <node0.ip>127.0.0.1</node0.ip>
        <node1.ip>127.0.0.1</node1.ip>
        <node2.ip>127.0.0.1</node2.ip>
        <mcast.ip>234.99.54.14</mcast.ip> 
        <jvm.ip.stack>-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -Djboss.default.multicast.address=${mcast.ip}</jvm.ip.stack>
        <server.jvm.args>${jvm.ip.stack} ${jvm.memory.args} ${transport.stack} ${jvm.x64.args}</server.jvm.args>
        <log4j.configuration>log4j.xml</log4j.configuration>
        <suite.manual.phase>test</suite.manual.phase>
        <suite.rollups.manual.phase>none</suite.rollups.manual.phase>
        <suite.client.local.phase>test</suite.client.local.phase>
        <suite.client.dist.phase>test</suite.client.dist.phase>
        <suite.client.repl.phase>test</suite.client.repl.phase>

        <suite.manual.include>**/*.java</suite.manual.include>
        <suite.manual.exclude.groups>
            org.infinispan.server.test.category.ClientLocal,org.infinispan.server.test.category.ClientClustered,org.infinispan.server.test.category.RollingUpgrades,org.infinispan.server.test.category.UnstableTest,org.infinispan.server.test.category.Osgi
        </suite.manual.exclude.groups>
        <suite.client.local.config>testsuite/standalone-default-local.xml</suite.client.local.config>
        <suite.client.dist.config>testsuite/clustered-default-dist.xml</suite.client.dist.config>
        <suite.client.repl.config>testsuite/clustered-default-repl.xml</suite.client.repl.config>
        <groups.client.local>org.infinispan.server.test.category.ClientLocal</groups.client.local>
        <groups.client.clustered>org.infinispan.server.test.category.ClientClustered</groups.client.clustered>
        <groups.unstable>org.infinispan.server.test.category.UnstableTest,org.infinispan.server.test.category.UnstableClientLocalTest,org.infinispan.server.test.category.UnstableClientClusteredTest</groups.unstable>
    </properties>

    <build>
        <testResources>
            <testResource>
                <directory>${project.basedir}/src/test/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>*.jks</exclude>
                    <exclude>*.keystore</exclude>
                </excludes>
            </testResource>
            <testResource>
                <directory>${project.basedir}/src/test/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>*.jks</include>
                    <include>*.keystore</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.servicemix.tooling</groupId>
                <artifactId>depends-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-depends-file</id>
                        <goals>
                            <goal>generate-depends-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-test-libs</id>
                        <phase>process-test-resources</phase>
                        <configuration>
                            <outputDirectory>${project.build.directory}/test-libs</outputDirectory>
                            <stripVersion>true</stripVersion>

                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.h2database</groupId>
                                    <artifactId>h2</artifactId>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-distros-and-configs</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <target>
                                <ant antfile="build-testsuite.xml" inheritRefs="true" target="create-all-distros">
                                    
                                    <property name="test_classpath" refid="maven.test.classpath" />

                                    <property name="database" value="${database}" />
                                    <property name="driver.dir" value="${driver.dir}" />
                                    <property name="driver.jar" value="${driver.jar}" />
                                    <property name="driver.class" value="${driver.class}" />

                                    <property name="connection.url" value="${connection.url}" />
                                    <property name="connection.url.other" value="${connection.url.other}" />

                                    <property name="password" value="${password}" />
                                    <property name="username" value="${username}" />

                                    <property name="password.other" value="${password.other}" />
                                    <property name="username.other" value="${username.other}" />
                                </ant>
                                
                                <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>xmlns=""</replacetoken>
                                </replace>
                            </target>
                        </configuration>
                    </execution>
                    
                    <execution>
                        <id>check-h2-db-property</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <condition property="run.h2.server">
                                    <equals arg1="${database}" arg2="h2" />
                                </condition>
                            </target>
                            <exportAntProperties>true</exportAntProperties>
                        </configuration>
                    </execution>

                    <execution>
                        <id>start-h2-tcp-server</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target if="run.h2.server">
                                <java classname="org.h2.tools.Server" fork="true" spawn="true">
                                    <arg value="-tcp" />
                                    <arg value="-tcpPort" />
                                    <arg value="9092" />
                                    <arg value="-tcpAllowOthers" />
                                    <classpath>
                                        <pathelement location="${driver.dir}/${driver.jar}" />
                                    </classpath>
                                    <jvmarg value="-Dh2.bindAddress=${h2.server.ip}" />
                                </java>
                            </target>
                        </configuration>
                    </execution>
                    
                    <execution>
                        <id>stop-h2-tcp-server</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target if="run.h2.server">
                                <java classname="org.h2.tools.Server">
                                    <arg value="-tcpShutdown" />
                                    <arg value="${h2.server.address}" />
                                    <arg value="-tcpShutdownForce" />
                                    <classpath>
                                        <pathelement location="${driver.dir}/${driver.jar}" />
                                    </classpath>
                                </java>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkMode>once</forkMode>
                    <excludedGroups>${groups.unstable}</excludedGroups>
                    <systemPropertyVariables>
                        <server1.dist>${server1.dist}</server1.dist>
                        <server2.dist>${server2.dist}</server2.dist>
                        <server3.dist>${server3.dist}</server3.dist>
                        <server.old.dist>${server.old.dist}</server.old.dist>
                        <server.jvm>${server.jvm}</server.jvm>
                        <server.jvm.args>${server.jvm.args}</server.jvm.args>
                        <log4j.configuration>${log4j.configuration}</log4j.configuration>
                        <java.util.logging.config.file>${resources.dir}/jul.properties</java.util.logging.config.file>
                        <suite.client.local.config>${suite.client.local.config}</suite.client.local.config>
                        <suite.client.dist.config>${suite.client.dist.config}</suite.client.dist.config>
                        <suite.client.repl.config>${suite.client.repl.config}</suite.client.repl.config>
                        <resources.dir>${project.build.directory}/test-classes</resources.dir>
                        <version.karaf>${version.karaf}</version.karaf>

                        
                        <database>${database}</database>
                        <driver.dir>${driver.dir}</driver.dir>
                        <driver.jar>${driver.jar}</driver.jar>
                        <driver.class>${driver.class}</driver.class>

                        <connection.url>${connection.url}</connection.url>
                        <connection.url.other>${connection.url.other}</connection.url.other>

                        <username>${username}</username>
                        <password>${password}</password>

                        <username.other>${username.other}</username.other>
                        <password.other>${password.other}</password.other>

                        
                        <node0.ip>${node0.ip}</node0.ip>
                        <node1.ip>${node1.ip}</node1.ip>
                        <node2.ip>${node2.ip}</node2.ip>
                    </systemPropertyVariables>
                    
                    <additionalClasspathElements>
                        <element>${driver.dir}/${driver.jar}</element>
                    </additionalClasspathElements>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>org.infinispan.server.test.util.TestsuiteListener</value>
                        </property>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>suite-manual</id>
                        <phase>${suite.manual.phase}</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>${suite.manual.include}</include>
                            </includes>
                            <excludedGroups>${suite.manual.exclude.groups}</excludedGroups>
                            <groups>${suite.manual.include.groups}</groups>
                            <systemPropertyVariables>
                                <arquillian.launch>suite-manual</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>suite-rollups-manual</id>
                        <phase>${suite.rollups.manual.phase}</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <groups>org.infinispan.server.test.category.RollingUpgrades</groups>
                            <excludedGroups>${groups.unstable}</excludedGroups>
                            <systemPropertyVariables>
                                <arquillian.launch>suite-rollups-manual</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>suite-client-local</id>
                        <phase>${suite.client.local.phase}</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <reportNameSuffix>localmode-${default.transport.stack}</reportNameSuffix>
                            <groups>${groups.client.local}</groups>
                            <excludedGroups>${groups.unstable}</excludedGroups>
                            <systemPropertyVariables>
                                <clustering.mode>local</clustering.mode>
                                <arquillian.launch>suite-client-local</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>suite-client-dist</id>
                        <phase>${suite.client.dist.phase}</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <reportNameSuffix>distmode-${default.transport.stack}</reportNameSuffix>
                            <groups>${groups.client.clustered}</groups>
                            <excludedGroups>${groups.unstable}</excludedGroups>
                            <systemPropertyVariables>
                                <clustering.mode>dist</clustering.mode>
                                <arquillian.launch>suite-client-dist</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>suite-client-repl</id>
                        <phase>${suite.client.repl.phase}</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <reportNameSuffix>replmode-${default.transport.stack}</reportNameSuffix>
                            <groups>${groups.client.clustered}</groups>
                            <excludedGroups>${groups.unstable}</excludedGroups>
                            <systemPropertyVariables>
                                <clustering.mode>repl</clustering.mode>
                                <arquillian.launch>suite-client-repl</arquillian.launch>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>suite.client</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.client.local</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.client.dist</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.client.repl</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.examples</id>
            <properties>
                <suite.manual.phase>test</suite.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
                <suite.manual.include>org/infinispan/server/test/configs/ExampleConfigsTest.java</suite.manual.include>
            </properties>
        </profile>
        <profile>
            <id>suite.others</id>
            <properties>
                <suite.manual.phase>test</suite.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.leveldb-client</id>
            <properties>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
                <suite.client.local.config>testsuite/standalone-leveldb-local.xml</suite.client.local.config>
                <suite.client.dist.config>testsuite/clustered-leveldb-dist.xml</suite.client.dist.config>
                <suite.client.repl.config>testsuite/clustered-leveldb-repl.xml</suite.client.repl.config>
            </properties>
        </profile>
        <profile>
            <id>suite.cachestore</id>
            <properties>
                <suite.manual.phase>test</suite.manual.phase>
                <suite.manual.include.groups>org.infinispan.server.test.category.CacheStore</suite.manual.include.groups>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>suite.rolling.upgrades</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.rollups.manual.phase>test</suite.rollups.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
            </properties>
        </profile>
        <profile>
            <id>client.rest</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
                <groups.client.local>org.infinispan.server.test.category.RESTLocal</groups.client.local>
                <groups.client.clustered>org.infinispan.server.test.category.RESTClustered</groups.client.clustered>
            </properties>
        </profile>
        <profile>
            <id>client.hotrod</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
                <groups.client.local>org.infinispan.server.test.category.HotRodLocal</groups.client.local>
                <groups.client.clustered>org.infinispan.server.test.category.HotRodClustered</groups.client.clustered>
            </properties>
        </profile>
        <profile>
            <id>client.memcached</id>
            <properties>
                <suite.manual.phase>none</suite.manual.phase>
                <suite.client.local.phase>test</suite.client.local.phase>
                <suite.client.dist.phase>test</suite.client.dist.phase>
                <suite.client.repl.phase>test</suite.client.repl.phase>
                <groups.client.local>org.infinispan.server.test.category.MemcachedLocal</groups.client.local>
                <groups.client.clustered>org.infinispan.server.test.category.MemcachedClustered</groups.client.clustered>
            </properties>
        </profile>
        <profile>
            <id>client.hotrod.osgi</id>
            <properties>
                <suite.manual.phase>test</suite.manual.phase>
                <suite.client.local.phase>none</suite.client.local.phase>
                <suite.client.dist.phase>none</suite.client.dist.phase>
                <suite.client.repl.phase>none</suite.client.repl.phase>
                <suite.manual.exclude.groups />
                <suite.manual.include.groups>org.infinispan.server.test.category.Osgi</suite.manual.include.groups>
                <suite.manual.include>org/infinispan/server/test/client/hotrod/osgi/RemoteCacheOsgiTest.java</suite.manual.include>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>infinispan-server-startup</id>
                                <phase>generate-test-resources</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <exec dir="${server1.dist}/bin" executable="chmod" osfamily="unix" spawn="true">
                                            <arg value="+x" />
                                            <arg value="../bin" />
                                            <arg value="standalone.sh" />
                                        </exec>
                                        <exec executable="${server1.dist}/bin/standalone.sh" osfamily="unix" spawn="true">
                                            <arg line="-c testsuite/standalone-with-indexing.xml" />
                                            <env key="JAVA_OPTS" value="${server.jvm.args} -Djboss.socket.binding.port-offset=0 -Djboss.node.name=jdg" />
                                        </exec>
                                        <exec executable="${server1.dist}/bin/standalone.bat" osfamily="windows" spawn="true">
                                            <arg line="-c testsuite/standalone-with-indexing.xml" />
                                            <env key="JAVA_OPTS" value="${server.jvm.args} -Djboss.socket.binding.port-offset=0 -Djboss.node.name=jdg" />
                                        </exec>
                                        <echo>Waiting for Infinispan server to start</echo>
                                        <waitfor checkevery="1" checkeveryunit="second" maxwait="15" maxwaitunit="second">
                                            <and>
                                                <socket port="9999" server="127.0.0.1" />
                                                <socket port="11222" server="127.0.0.1" />
                                            </and>
                                        </waitfor>
                                        <echo message="Infinispan server started" />
                                    </target>
                                </configuration>
                            </execution>
                            <execution>
                                <id>infinispan-server-shutdown</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <exec executable="${server.jvm}/bin/jps" osfamily="unix" output="jps.pid" />
                                        <loadfile failonerror="false" property="pid" srcfile="jps.pid">
                                            <filterchain>
                                                <linecontains>
                                                    <contains value="jboss-modules.jar" />
                                                </linecontains>
                                                <tokenfilter>
                                                    <deletecharacters chars="jboss-modules.jar" />
                                                    <ignoreblank />
                                                </tokenfilter>
                                                <striplinebreaks />
                                            </filterchain>
                                        </loadfile>
                                        <exec executable="netstat" osfamily="windows" output="jps.pid">
                                            <arg line="-aon" />
                                        </exec>
                                        <loadfile failonerror="false" property="pid" srcfile="jps.pid">
                                            <filterchain>
                                                <linecontains>
                                                    <contains value="LISTENING" />
                                                    <contains value=":11222" />
                                                </linecontains>
                                                <tokenfilter>
                                                    <replaceregex flags="gi" pattern=".*LISTENING([ \t]+)([0-9]+)" replace="\2" />
                                                    <ignoreblank />
                                                </tokenfilter>
                                                <striplinebreaks />
                                            </filterchain>
                                        </loadfile>
                                        <echo message="Killing Infinispan server with PID - ${pid}" />
                                        <exec executable="kill" osfamily="unix">
                                            <arg line="-9 ${pid}" />
                                        </exec>
                                        <exec executable="taskkill" osfamily="windows">
                                            <arg line="/F /T /PID ${pid}" />
                                        </exec>
                                        <delete file="jps.pid" />
                                    </target>
                                </configuration>
                            </execution>
                            
                            <execution>
                                <id>register-protofile-with-server</id>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <target>
                                        <property name="test_classpath" refid="maven.test.classpath" />
                                        <java classname="org.infinispan.server.test.util.ProtofileRegistrar" failonerror="true" fork="false">
                                            <arg value="/sample_bank_account/bank.protobin" />
                                            <arg value="localhost" />
                                            <arg value="9999" />
                                            <classpath>
                                                <pathelement path="${project.build.directory}/test-classes" />
                                                <pathelement path="${test_classpath}" />
                                            </classpath>
                                        </java>
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>ipv6</id>
            <activation>
                <property><name>ts.ipv6</name></property>
            </activation>
            <properties>
                
                <h2.server.ip>[::1]</h2.server.ip>
                

                <node0.ip>[::1]</node0.ip>
                <node1.ip>[::1]</node1.ip>
                <node2.ip>[::1]</node2.ip>
                <mcast.ip>[ff01::1]</mcast.ip>      
                <jvm.ip.stack>-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true -Djboss.default.multicast.address=${mcast.ip}</jvm.ip.stack>
            </properties>
        </profile>

        <profile>
            <id>testsuite-jdk6</id>
            <properties>
                <server.jvm>${env.JAVA_HOME_16}</server.jvm>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <jvm>${env.JAVA_HOME_16}/bin/java</jvm>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>test-unstable</id>
            <properties>
                <groups.unstable />
                <suite.manual.exclude.groups />
                <suite.manual.include.groups>org.infinispan.server.test.category.UnstableTest</suite.manual.include.groups>
                <groups.client.local>org.infinispan.server.test.category.UnstableClientLocalTest</groups.client.local>
                <groups.client.clustered>org.infinispan.server.test.category.UnstableClientClusteredTest</groups.client.clustered>
            </properties>
            
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <failIfNoTests>false</failIfNoTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>