<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.arquillian.cube</groupId>
    <artifactId>arquillian-cube-docker-parent</artifactId>
    <version>2.1.0.Alpha2</version>
  </parent>
  <name>Arquillian Cube Docker Functional Test</name>
  <artifactId>arquillian-cube-docker-ftest</artifactId>

  <properties>
    <arquillian.cube.autostart />
    <version.tomcat>1.2.1.Final</version.tomcat>
    <version.wildfly>5.0.1.Final</version.wildfly>
    <version.arquillian_tck>1.0.0.Alpha1</version.arquillian_tck>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.arquillian.cube</groupId>
      <artifactId>arquillian-cube-docker</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.arquillian.cube</groupId>
      <artifactId>arquillian-cube-requirement</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>jakarta.platform</groupId>
      <artifactId>jakarta.jakartaee-web-api</artifactId>
      <version>9.0.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <arquillian.launch>${arquillian.launch}</arquillian.launch>
            <arquillian.cube.autostart>${arquillian.cube.autostart}</arquillian.cube.autostart>
          </systemPropertyVariables>
          <excludes>
            <exclude>**/persistence/**</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
  </build>

  <profiles>
    <profile>
      <id>tomcat-dockerfile</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <arquillian.launch>tomcat_dockerfile</arquillian.launch>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.jboss.arquillian.container</groupId>
          <artifactId>arquillian-tomcat-remote-10</artifactId>
          <version>${version.tomcat}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>tck</id>
      <dependencies>
        <dependency>
          <groupId>org.arquillian.tck.container</groupId>
          <artifactId>arquillian-tck-container</artifactId>
          <version>${version.arquillian_tck}</version>
          <classifier>tests</classifier>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>org/arquillian/cube/*/**</exclude>
              </excludes>
              <dependenciesToScan>
                <dependency>org.arquillian.tck.container:arquillian-tck-container</dependency>
              </dependenciesToScan>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>wildfly-33</id>
      <properties>
        <arquillian.launch>wildfly</arquillian.launch>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-remote</artifactId>
          <version>${version.wildfly}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>wildfly-33-group</id>
      <properties>
        <arquillian.launch>wildfly-group</arquillian.launch>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-remote</artifactId>
          <version>${version.wildfly}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>wildfly-33-database</id>
      <properties>
        <arquillian.launch>wildfly_database</arquillian.launch>
        <arquillian.cube.autostart>database</arquillian.cube.autostart>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-remote</artifactId>
          <version>${version.wildfly}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration combine.self="override">
              <systemPropertyVariables>
                <arquillian.launch>${arquillian.launch}</arquillian.launch>
                <arquillian.cube.autostart>${arquillian.cube.autostart}</arquillian.cube.autostart>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
