<?xml version="1.0" encoding="UTF-8"?>
<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.activiti.cloud</groupId>
    <artifactId>activiti-cloud-runtime-bundle-dependencies</artifactId>
    <version>7.1.0-M7</version>
    <relativePath>../activiti-cloud-runtime-bundle-dependencies</relativePath>
  </parent>
  <artifactId>activiti-cloud-starter-runtime-bundle-it</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.activiti.cloud</groupId>
      <artifactId>activiti-cloud-starter-runtime-bundle</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>integration-test</id>
      <activation>
        <property>
          <name>!skipITs</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <configuration>
              <startParallel>true</startParallel>
              <images>
                <image>
                  <name>activiti/activiti-keycloak</name>
                  <alias>activiti-keycloak</alias>
                  <run>
                    <ports>
                      <port>8180:8180</port>
                    </ports>
                    <wait>
                      <log>Keycloak .* started in</log>
                      <time>50000</time>
                      <shutdown>5000</shutdown>
                      <kill>1000</kill>
                    </wait>
                  </run>
                </image>
                <image>
                  <name>rabbitmq:management</name>
                  <alias>activiti-rabbitmq</alias>
                  <run>
                    <ports>
                      <port>5672:5672</port>
                      <port>15672:15672</port>
                    </ports>
                    <wait>
                      <log>Server startup complete</log>
                      <time>40000</time>
                      <shutdown>3000</shutdown>
                      <kill>1000</kill>
                    </wait>
                  </run>
                </image>
              </images>
              <skip>${skipTests}</skip>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>start</goal>
                  <goal>stop</goal>
                  <goal>remove</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
