<?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>13.0.0.Dev02</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-security-integrationtests</artifactId>
   <name>Integration tests - Security Tests</name>
   <description>Integration tests - Security Tests</description>

   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-all</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j-impl</artifactId>
         <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>org.wildfly.core</groupId>
         <artifactId>wildfly-core-testsuite-shared</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jboss.security</groupId>
         <artifactId>jboss-negotiation-extras</artifactId>
         <scope>test</scope>
      </dependency>

   </dependencies>

   <build>
      <testResources>
         <testResource>
            <filtering>true</filtering>
            <directory>src/test/resources</directory>
            <excludes>
               <exclude>keytab</exclude>
               <exclude>ldif</exclude>
            </excludes>
         </testResource>
         <testResource>
            <filtering>false</filtering>
            <directory>src/test/resources/ldif</directory>
         </testResource>
      </testResources>

      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
               <!-- Force use of JUnit, since TestNG+Arquillian break in wonderful ways -->
               <testNGArtifactName>none:none</testNGArtifactName>
               <forkCount>1</forkCount>
               <reuseForks>false</reuseForks>
               <properties>
                  <listener>${junitListener}</listener>
               </properties>
            </configuration>
            <executions>
               <execution>
                  <goals>
                     <goal>integration-test</goal>
                     <goal>verify</goal>
                  </goals>
                  <configuration>
                     <redirectTestOutputToFile>true</redirectTestOutputToFile>
                     <systemPropertyVariables>
                        <node0.mgmt.addr>127.0.0.1</node0.mgmt.addr>
                        <node1.mgmt.addr>127.0.0.1</node1.mgmt.addr>
                     </systemPropertyVariables>
                  </configuration>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>org.apache.maven.surefire</groupId>
                  <artifactId>surefire-junit47</artifactId>
                  <version>${version.maven.surefire}</version>
               </dependency>
            </dependencies>
         </plugin>

         <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
               <execution>
                  <id>copy-test-libs</id>
                  <phase>pre-integration-test</phase>
                  <configuration>
                     <includeScope>test</includeScope>
                     <outputDirectory>${project.build.directory}/test-libs</outputDirectory>
                     <stripVersion>true</stripVersion>
                  </configuration>
                  <goals>
                     <goal>copy-dependencies</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <plugin>
            <groupId>org.jboss.galleon</groupId>
            <artifactId>galleon-maven-plugin</artifactId>
            <configuration>
               <skip>${skipTests}</skip>
            </configuration>
            <executions>
               <execution>
                  <id>server-provisioning-node0</id>
                  <goals>
                     <goal>provision</goal>
                  </goals>
                  <phase>compile</phase>
                  <configuration>
                     <install-dir>${project.build.directory}/node0</install-dir>
                     <record-state>false</record-state>
                     <!-- true: uses local m2 cache only -->
                     <offline>false</offline>
                     <feature-packs>
                        <!-- full server -->
                        <feature-pack>
                           <groupId>${appserver.groupId}</groupId>
                           <artifactId>wildfly-galleon-pack</artifactId>
                           <version>${appserver.version}</version>
                        </feature-pack>
                     </feature-packs>
                     <configurations>
                        <config>
                           <model>standalone</model>
                           <name>standalone.xml</name>
                        </config>
                     </configurations>
                     <plugin-options>
                        <!--
                        when true, the module.xml files only contains the maven coordinates of the jars to download when the server starts
                        when false, the plugin downloads the jars at build time
                         -->
                        <jboss-maven-dist>true</jboss-maven-dist>
                     </plugin-options>
                  </configuration>
               </execution>
               <execution>
                  <id>server-provisioning-node1</id>
                  <goals>
                     <goal>provision</goal>
                  </goals>
                  <phase>compile</phase>
                  <configuration>
                     <install-dir>${project.build.directory}/node1</install-dir>
                     <record-state>false</record-state>
                     <!-- true: uses local m2 cache only -->
                     <offline>false</offline>
                     <feature-packs>
                        <!-- full server -->
                        <feature-pack>
                           <groupId>${appserver.groupId}</groupId>
                           <artifactId>wildfly-galleon-pack</artifactId>
                           <version>${appserver.version}</version>
                        </feature-pack>
                     </feature-packs>
                     <configurations>
                        <config>
                           <model>standalone</model>
                           <name>standalone.xml</name>
                        </config>
                     </configurations>
                     <plugin-options>
                        <!--
                        when true, the module.xml files only contains the maven coordinates of the jars to download when the server starts
                        when false, the plugin downloads the jars at build time
                         -->
                        <jboss-maven-dist>true</jboss-maven-dist>
                     </plugin-options>
                  </configuration>
               </execution>
               <execution>
                  <id>server-provisioning-testnode</id>
                  <goals>
                     <goal>provision</goal>
                  </goals>
                  <phase>compile</phase>
                  <configuration>
                     <install-dir>${project.build.directory}/testnode</install-dir>
                     <record-state>false</record-state>
                     <!-- true: uses local m2 cache only -->
                     <offline>false</offline>
                     <feature-packs>
                        <!-- full server -->
                        <feature-pack>
                           <groupId>${appserver.groupId}</groupId>
                           <artifactId>wildfly-galleon-pack</artifactId>
                           <version>${appserver.version}</version>
                        </feature-pack>
                     </feature-packs>
                     <configurations>
                        <config>
                           <model>standalone</model>
                           <name>standalone.xml</name>
                        </config>
                     </configurations>
                     <plugin-options>
                        <!--
                        when true, the module.xml files only contains the maven coordinates of the jars to download when the server starts
                        when false, the plugin downloads the jars at build time
                         -->
                        <jboss-maven-dist>true</jboss-maven-dist>
                     </plugin-options>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>smoke</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-failsafe-plugin</artifactId>
                  <executions>
                     <execution>
                        <phase>none</phase>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
