<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>
    <groupId>org.kie</groupId>
    <artifactId>kie-server-tests</artifactId>
    <version>6.2.0.Final</version>
  </parent>

  <artifactId>kie-server-jms-tests</artifactId>

  <properties>
    <!-- We need to skip the JMS ITs by default as they are executed only on some containers. Specific profiles
         need to override this property to 'true'. -->
    <skipITs>true</skipITs>
  </properties>

  <name>KIE :: Execution Server :: JMS Tests</name>
  <description>KIE Execution Server JMS Tests. Can be configured to run on different supported containers.</description>

  <dependencies>
    <!-- kie server dependencies -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-server-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-server-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-ci</artifactId>
    </dependency>

    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <!-- Value is supplied by specific profiles -->
              <remoting.uri>${remoting.uri}</remoting.uri>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>eap64x</id>
      <properties>
        <skipITs>false</skipITs>
        <remoting.uri>remote://${container.hostname}:4447</remoting.uri>
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-jms-client-bom</artifactId>
            <!-- This is the highest version publicly available. Should work even with higher versions of EAP -->
            <version>7.2.0.Final</version>
            <type>pom</type>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.kie</groupId>
          <artifactId>kie-server</artifactId>
          <classifier>ee6</classifier>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-jms-client-bom</artifactId>
          <type>pom</type>
          <scope>test</scope>
        </dependency>
      </dependencies>

      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>wildfly82x</id>
      <properties>
        <skipITs>false</skipITs>
        <remoting.uri>http-remoting://${container.hostname}:${container.port}</remoting.uri>
      </properties>
      <dependencyManagement>
        <dependencies>
          <!-- This is far from ideal, as it is not designed as BOM. However, there is nothing like wildfly-bom,
               so this is the closest thing I could find.
               Important: this overrides lot's of the versions defined in ip-bom -->
          <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-parent</artifactId>
            <version>8.2.0.Final</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
          <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${version.com.google.guava}</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.kie</groupId>
          <artifactId>kie-server</artifactId>
          <classifier>ee7</classifier>
          <type>war</type>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-jms-client-bom</artifactId>
          <type>pom</type>
          <scope>test</scope>
        </dependency>
      </dependencies>

      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
