<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>s-ramp</artifactId>
    <groupId>org.overlord.sramp</groupId>
    <version>0.6.0.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>s-ramp-test</artifactId>
  <packaging>jar</packaging>
  <name>S-RAMP Test</name>
  <description>A general test package supporting various integration tests.</description>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.arquillian.container</groupId>
        <artifactId>arquillian-tomcat-managed-7</artifactId>
        <version>1.0.0.CR7</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-codec</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.overlord</groupId>
      <artifactId>overlord-commons-installer</artifactId>
      <type>jar</type>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-common</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-server</artifactId>
      <classifier>classes</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-server</artifactId>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-integration-switchyard</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.overlord.sramp</groupId>
      <artifactId>s-ramp-wagon</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-provider-api</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>jms</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <!-- Skipped tests if no container is included by a profile! -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>tomcat-integration-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <ant antfile="${basedir}/src/test/resources/install-container.xml" target="install-tomcat" />
                    <ant antfile="${basedir}/src/test/resources/install-sramp.xml" target="install-sramp-tomcat" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.launch>tomcat</arquillian.launch>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.jboss.arquillian.container</groupId>
          <artifactId>arquillian-tomcat-managed-7</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-idp-tomcat7</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-server-tomcat7</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-ui-war-tomcat7</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.activemq</groupId>
          <artifactId>activemq-client</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>eap61-integration-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <!-- TODO: JMS/HornetQ API conflict for MessageListener. -->
              <excludes>
                <exclude>**/JMSEventProducerTest.java</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.modeshape</groupId>
                      <artifactId>modeshape-distribution</artifactId>
                      <version>3.6.0.Final</version>
                      <classifier>jbosseap-61-dist</classifier>
                      <type>zip</type>
                    </artifactItem>
                  </artifactItems>
                  <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <ant antfile="${basedir}/src/test/resources/install-container.xml" target="install-eap61" />
                    <ant antfile="${basedir}/src/test/resources/install-sramp.xml" target="install-sramp-eap61" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.launch>eap61</arquillian.launch>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-idp-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-auth-jboss7</artifactId>
          <type>jar</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-dist-eap6</artifactId>
          <type>zip</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-server-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-ui-war-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.hornetq</groupId>
          <artifactId>hornetq-jms-client</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>eap62-integration-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <ant antfile="${basedir}/src/test/resources/install-container.xml" target="install-eap62" />
                    <ant antfile="${basedir}/src/test/resources/install-sramp.xml" target="install-sramp-eap62" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.launch>eap62</arquillian.launch>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.modeshape</groupId>
          <artifactId>modeshape-distribution</artifactId>
          <type>zip</type>
          <classifier>jbosseap-dist</classifier>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-idp-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-auth-jboss7</artifactId>
          <type>jar</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-dist-eap6</artifactId>
          <type>zip</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-server-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-ui-war-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.hornetq</groupId>
          <artifactId>hornetq-jms-client</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>eap63-integration-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <ant antfile="${basedir}/src/test/resources/install-container.xml" target="install-eap63" />
                    <ant antfile="${basedir}/src/test/resources/install-sramp.xml" target="install-sramp-eap63" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.launch>eap63</arquillian.launch>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.modeshape</groupId>
          <artifactId>modeshape-distribution</artifactId>
          <type>zip</type>
          <classifier>jbosseap-dist</classifier>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-idp-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-auth-jboss7</artifactId>
          <type>jar</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord</groupId>
          <artifactId>overlord-commons-dist-eap6</artifactId>
          <type>zip</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-server-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.overlord.sramp</groupId>
          <artifactId>s-ramp-ui-war-eap6</artifactId>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.hornetq</groupId>
          <artifactId>hornetq-jms-client</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
