<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-parent</artifactId>
    <version>2.1.0.Alpha2</version>
  </parent>
  <name>Arquillian Cube Containerless Container</name>
  <artifactId>arquillian-cube-containerless</artifactId>

  <dependencies>
    <dependency>
      <groupId>org.arquillian.cube</groupId>
      <artifactId>arquillian-cube-spi</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.arquillian.container</groupId>
      <artifactId>arquillian-container-test-spi</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </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>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.undertow</groupId>
      <artifactId>undertow-core</artifactId>
      <version>1.1.1.Final</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap.resolver</groupId>
      <artifactId>shrinkwrap-resolver-depchain</artifactId>
      <scope>test</scope>
      <type>pom</type>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
  </build>

  <properties>
    <containerless.skip.tests>false</containerless.skip.tests>
    <skipTests>${containerless.skip.tests}</skipTests>
    <tests.exp.node>**/*Node*</tests.exp.node>
    <tests.exp.undertow>**/*Daytime*</tests.exp.undertow>
    <tests.container.node>node</tests.container.node>
    <tests.container.undertow>daytime</tests.container.undertow>
    <docker.api.url>tcp://localhost:2375</docker.api.url>
  </properties>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.cube.containerless>${tests.container.node}</arquillian.cube.containerless>
              </systemPropertyVariables>
              <includes>
                <include>${tests.exp.node}</include>
              </includes>
            </configuration>
            <executions>
              <execution>
                <id>test-undertow</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <arquillian.cube.containerless>${tests.container.undertow}</arquillian.cube.containerless>
                  </systemPropertyVariables>
                  <includes>
                    <include>${tests.exp.undertow}</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>node</id>
      <properties>
        <arquillian.cube.containerless>${tests.container.node}</arquillian.cube.containerless>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.cube.containerless>${tests.container.node}</arquillian.cube.containerless>
              </systemPropertyVariables>
              <includes>
                <include>${tests.exp.node}</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>undertow</id>
      <properties>
        <arquillian.cube.containerless>${tests.container.undertow}</arquillian.cube.containerless>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <arquillian.cube.containerless>${tests.container.undertow}</arquillian.cube.containerless>
              </systemPropertyVariables>
              <includes>
                <include>${tests.exp.undertow}</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
