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

  <artifactId>kie-server-tests</artifactId>
  <packaging>pom</packaging>

  <name>KIE :: Execution Server :: Tests</name>
  <description>KIE Execution Server Tests Parent</description>

  <!-- Properties shared between the different test modules -->
  <properties>
    <!-- This property needs to be overridden when running tests against different version of the WAR (e.g. running
             SNAPSHOT tests against Beta3 WAR) so the tests actually know what exact version of server is being tested -->
    <kie.server.version>${project.version}</kie.server.version>
    <!-- Following properties are used only for testing -->
    <container.hostname>localhost</container.hostname>
    <!-- <container.port/> can't define the default port value, because the build-helper-maven-plugin:reserve-network-port
         is not able to override the value of the property. The port number would then always be the same
         (the default one, unless changed from outside) -->
    <kie.server.context>kie-server-services</kie.server.context>
    <kie.server.controller.context>kie-server-controller-services</kie.server.controller.context>
    <kie.server.base.http.url>http://${container.hostname}:${container.port}/${kie.server.context}/services/rest/server</kie.server.base.http.url>
    <kie.server.controller.base.http.url>http://${container.hostname}:${container.port}/${kie.server.controller.context}/controller</kie.server.controller.base.http.url>
    <kie.server.testing.server.local.repo.dir>${project.build.directory}/kie-server-testing-server-local-repo</kie.server.testing.server.local.repo.dir>
    <kie.server.testing.remote.repo.dir>${project.build.directory}/kie-server-testing-remote-repo</kie.server.testing.remote.repo.dir>
    <!-- This property can be overriden when some other remote repo location should be used -->
    <kie.server.testing.remote.repo.url>file://${kie.server.testing.remote.repo.dir}</kie.server.testing.remote.repo.url>
    <!-- Custom settings.xml used when building the testing kjars. By default there is no additional configuration needed,
         but for testing e.g. stated builds it is necessary to pass additional repository with the staged artifacts. -->
    <kie.server.testing.kjars.build.settings.xml/>

    <tomcat7x.download.url>https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.55/bin/apache-tomcat-7.0.55.zip</tomcat7x.download.url>
    <tomcat8x.download.url>https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.12/bin/apache-tomcat-8.0.12.zip</tomcat8x.download.url>
    <wildfly81x.download.url>http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.zip</wildfly81x.download.url>
    <wildfly82x.download.url>http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip</wildfly82x.download.url>
    <!-- The EAP 6.4.x binary can't be anonymously downloaded due to license issues. It can be downloaded manually
         and for free (e.g. from http://jbossas.jboss.org/downloads.html) and the zip location needs to be specified
         here or via system property when running the build (don't forget to use the `file://` prefix when
         referencing the zip from local filesystem). -->
    <eap64x.download.url>valid-url-for-eap-6.4.x-needs-to-be-specified-here-or-via-cmd-line</eap64x.download.url>
  </properties>

  <modules>
    <module>kie-server-integ-tests-common</module>
    <module>kie-server-integ-tests-drools</module>
    <module>kie-server-integ-tests-jbpm</module>
    <module>kie-server-integ-tests-controller</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <configuration>
            <container>
              <systemProperties>
                <kie.maven.settings.custom>${project.build.testOutputDirectory}/kie-server-testing-server-custom-settings.xml</kie.maven.settings.custom>
                <!-- Fixes issue when Tomcat hangs during deployment due to insufficient amount of entropy.
                     The property specifies less secure source of entropy, which is fine for testing.
                     See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source for more info -->
                <java.security.egd>file:/dev/./urandom</java.security.egd>
              </systemProperties>
            </container>
            <deployables>
              <deployable>
                <groupId>${project.groupId}</groupId>
                <artifactId>kie-server</artifactId>
                <!-- default, may be overriden in container specific profiles -->
                <classifier>ee6</classifier>
                <type>war</type>
                <properties>
                  <context>${kie.server.context}</context>
                </properties>
                <pingURL>${kie.server.base.http.url}</pingURL>
                <pingTimeout>30000</pingTimeout>
              </deployable>
            </deployables>
            <configuration>
              <properties>
                <cargo.servlet.port>${container.port}</cargo.servlet.port>
                <!-- kie-server role for REST tests; guest for JMS tests -->
                <cargo.servlet.users>yoda:usetheforce123@:kie-server,guest|Administrator:usetheforce123@:kie-server,guest,Administrators|john:usetheforce123@:kie-server,guest,engineering</cargo.servlet.users>
              </properties>
            </configuration>
          </configuration>
          <executions>
            <execution>
              <id>start-container</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>start</goal>
              </goals>
            </execution>
            <execution>
              <id>stop-container</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>stop</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>reserve-network-port</id>
            <goals>
              <goal>reserve-network-port</goal>
            </goals>
            <phase>pre-integration-test</phase>
            <configuration>
              <portNames>
                <portName>container.port</portName>
              </portNames>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>create-custom-maven-repo-dir</id>
            <phase>pre-integration-test</phase>
            <configuration>
              <tasks>
                <mkdir dir="${kie.server.testing.server.local.repo.dir}"/>
                <mkdir dir="${kie.server.testing.remote.repo.dir}"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>wildfly81x</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <configuration>
                <container>
                  <containerId>wildfly8x</containerId>
                  <type>installed</type>
                  <zipUrlInstaller>
                    <url>${wildfly81x.download.url}</url>
                  </zipUrlInstaller>
                  <systemProperties>
                    <!-- disable JMS support for executor touse same tests for all containers for jbpm excutor -->
                    <org.kie.executor.jms>false</org.kie.executor.jms>
                  </systemProperties>
                </container>
                <configuration>
                  <properties>
                    <cargo.jboss.configuration>standalone-full</cargo.jboss.configuration>
                    <cargo.jvmargs>-XX:MaxPermSize=1024m</cargo.jvmargs>
                  </properties>
                </configuration>
                <deployables>
                  <deployable>
                    <classifier>ee7</classifier>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>wildfly82x</id>
      <properties>
        <kie.server.remoting.url>http-remoting://${container.hostname}:${container.port}</kie.server.remoting.url>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <configuration>
                <container>
                  <containerId>wildfly8x</containerId>
                  <type>installed</type>
                  <zipUrlInstaller>
                    <url>${wildfly82x.download.url}</url>
                  </zipUrlInstaller>
                  <systemProperties>
                    <!-- disable JMS support for executor touse same tests for all containers for jbpm excutor -->
                    <org.kie.executor.jms>false</org.kie.executor.jms>
                  </systemProperties>
                </container>
                <configuration>
                  <properties>
                    <cargo.jboss.configuration>standalone-full</cargo.jboss.configuration>
                    <cargo.jvmargs>-XX:MaxPermSize=1024m</cargo.jvmargs>
                  </properties>
                </configuration>
                <deployables>
                  <deployable>
                    <classifier>ee7</classifier>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <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 lots of the versions coming from kie-p-w-d -->
          <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>
          <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>${version.org.jboss.resteasy}</version>
          </dependency>
          <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>jaxrs-api</artifactId>
            <version>${version.org.jboss.resteasy}</version>
          </dependency>
          <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxb-provider</artifactId>
            <version>${version.org.jboss.resteasy}</version>
          </dependency>
          <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>${version.org.jboss.resteasy}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${version.org.apache.httpcomponents.httpclient}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${version.org.apache.httpcomponents.httpcore}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
            <version>${version.org.apache.maven}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-util</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-impl</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-connector-basic</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-spi</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-transport-file</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-transport-http</artifactId>
            <version>${version.org.eclipse.aether}</version>
          </dependency>
          <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>${version.com.sun.xml.bind}</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-jms-client-bom</artifactId>
          <type>pom</type>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>tomcat7x</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <configuration>
                <container>
                  <containerId>tomcat7x</containerId>
                  <type>installed</type>
                  <zipUrlInstaller>
                    <url>${tomcat7x.download.url}</url>
                  </zipUrlInstaller>
                  <systemProperties>
                    <tomcat.home>${project.build.directory}/cargo/configurations/tomcat7x</tomcat.home>
                    <conf.directory>${project.build.testOutputDirectory}</conf.directory>
                    <tmp.directory>${project.build.directory}</tmp.directory>
                    <bitronix.tm.configuration>${project.build.testOutputDirectory}/btm-config.properties</bitronix.tm.configuration>
                    <jbpm.tsr.jndi.lookup>java:comp/env/TransactionSynchronizationRegistry</jbpm.tsr.jndi.lookup>
                    <org.kie.server.persistence.tm>org.hibernate.service.jta.platform.internal.BitronixJtaPlatform</org.kie.server.persistence.tm>
                    <org.kie.server.persistence.ds>java:comp/env/jdbc/jbpm</org.kie.server.persistence.ds>
                    <org.jboss.logging.provider>jdk</org.jboss.logging.provider>
                  </systemProperties>
                  <dependencies>
                    <dependency>
                      <groupId>org.codehaus.btm</groupId>
                      <artifactId>btm</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.codehaus.btm</groupId>
                      <artifactId>btm-tomcat55-lifecycle</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>com.h2database</groupId>
                      <artifactId>h2</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.jboss.spec.javax.transaction</groupId>
                      <artifactId>jboss-transaction-api_1.1_spec</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-api</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-jdk14</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.jboss.spec.javax.security.jacc</groupId>
                      <artifactId>jboss-jacc-api_1.4_spec</artifactId>
                    </dependency>
                  </dependencies>
                </container>
                <configuration>
                  <properties>
                    <cargo.jvmargs>-XX:MaxPermSize=1024m</cargo.jvmargs>
                  </properties>
                </configuration>
                <deployables>
                  <deployable>
                    <classifier>webc</classifier>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
            <plugin>
              <artifactId>maven-failsafe-plugin</artifactId>
              <configuration>
                <excludedGroups>org.kie.server.integrationtests.category.JMSOnly</excludedGroups>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <dependencies>
        <!-- deps needed by Tomcat 7x and Tomcat 8x -->
        <dependency>
          <groupId>org.codehaus.btm</groupId>
          <artifactId>btm</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.btm</groupId>
          <artifactId>btm-tomcat55-lifecycle</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>com.h2database</groupId>
          <artifactId>h2</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.spec.javax.transaction</groupId>
          <artifactId>jboss-transaction-api_1.1_spec</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-jdk14</artifactId>
        </dependency>
        <dependency>
          <groupId>org.jboss.spec.javax.security.jacc</groupId>
          <artifactId>jboss-jacc-api_1.4_spec</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>tomcat8x</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <configuration>
                <container>
                  <containerId>tomcat8x</containerId>
                  <type>installed</type>
                  <zipUrlInstaller>
                    <url>${tomcat8x.download.url}</url>
                  </zipUrlInstaller>
                  <systemProperties>
                    <tomcat.home>${project.build.directory}/cargo/configurations/tomcat7x</tomcat.home>
                    <conf.directory>${project.build.testOutputDirectory}</conf.directory>
                    <tmp.directory>${project.build.directory}</tmp.directory>
                    <bitronix.tm.configuration>${project.build.testOutputDirectory}/btm-config.properties</bitronix.tm.configuration>
                    <jbpm.tsr.jndi.lookup>java:comp/env/TransactionSynchronizationRegistry</jbpm.tsr.jndi.lookup>
                    <org.kie.server.persistence.tm>org.hibernate.service.jta.platform.internal.BitronixJtaPlatform</org.kie.server.persistence.tm>
                    <org.kie.server.persistence.ds>java:comp/env/jdbc/jbpm</org.kie.server.persistence.ds>
                    <org.jboss.logging.provider>jdk</org.jboss.logging.provider>
                  </systemProperties>
                  <dependencies>
                    <dependency>
                      <groupId>org.codehaus.btm</groupId>
                      <artifactId>btm</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.codehaus.btm</groupId>
                      <artifactId>btm-tomcat55-lifecycle</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>com.h2database</groupId>
                      <artifactId>h2</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.jboss.spec.javax.transaction</groupId>
                      <artifactId>jboss-transaction-api_1.1_spec</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-api</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-jdk14</artifactId>
                    </dependency>
                    <dependency>
                      <groupId>org.jboss.spec.javax.security.jacc</groupId>
                      <artifactId>jboss-jacc-api_1.4_spec</artifactId>
                    </dependency>
                  </dependencies>
                </container>
                <configuration>
                  <properties>
                    <cargo.jvmargs>-XX:MaxPermSize=1024m</cargo.jvmargs>
                  </properties>
                </configuration>
                <deployables>
                  <deployable>
                    <classifier>webc</classifier>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <dependencies>
        <!-- deps needed by Tomcat 7x and Tomcat 8x -->
        <dependency>
          <groupId>org.codehaus.btm</groupId>
          <artifactId>btm</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.btm</groupId>
          <artifactId>btm-tomcat55-lifecycle</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>com.h2database</groupId>
          <artifactId>h2</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.spec.javax.transaction</groupId>
          <artifactId>jboss-transaction-api_1.1_spec</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-jdk14</artifactId>
        </dependency>
        <dependency>
          <groupId>org.jboss.spec.javax.security.jacc</groupId>
          <artifactId>jboss-jacc-api_1.4_spec</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>eap64x</id>
      <properties>
        <kie.server.remoting.url>remote://${container.hostname}:4447</kie.server.remoting.url>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <configuration>
                <container>
                  <!-- jboss74x works for now, but should be updated to jboss75x once Cargo supports EAP 6.4 -->
                  <containerId>jboss74x</containerId>
                  <type>installed</type>
                  <zipUrlInstaller>
                    <url>${eap64x.download.url}</url>
                  </zipUrlInstaller>
                  <systemProperties>
                    <!-- disable JMS support for executor touse same tests for all containers for jbpm excutor -->
                    <org.kie.executor.jms>false</org.kie.executor.jms>
                  </systemProperties>
                </container>
                <configuration>
                  <properties>
                    <cargo.jboss.configuration>standalone-full</cargo.jboss.configuration>
                    <cargo.jvmargs>-XX:MaxPermSize=1024m</cargo.jvmargs>
                  </properties>
                </configuration>
                <deployables>
                  <deployable>
                    <classifier>ee6</classifier>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <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.jboss.as</groupId>
          <artifactId>jboss-as-jms-client-bom</artifactId>
          <type>pom</type>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jbossas71x</id>
      <properties>
        <kie.server.remoting.url>remote://${container.hostname}:4447</kie.server.remoting.url>
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-jms-client-bom</artifactId>
            <version>7.1.1.Final</version>
            <type>pom</type>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.jboss.as</groupId>
          <artifactId>jboss-as-jms-client-bom</artifactId>
          <type>pom</type>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <!-- This profile basically disables any cargo related execution. It can be used when the tests should run on
         a container that has already been started and it is not managed by cargo. It can also be used when doing
         a "no-test" build, as the container should not be used in that case. -->
    <profile>
      <id>custom-container</id>
      <activation>
        <!-- The tests are not executed unless specific container profile is used. Disable cargo by default. -->
        <activeByDefault>true</activeByDefault>
        <property>
          <name>custom-container</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <executions>
              <execution>
                <id>start-container</id>
                <phase>none</phase>
                <goals/>
                <!-- do nothing, container is not managed by cargo -->
              </execution>
              <execution>
                <id>stop-container</id>
                <phase>none</phase>
                <goals/>
                <!-- do nothing, container is not managed by cargo -->
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- Integration tests are skipped by default. They are activated when specific container profile is used. -->
      <id>skipITs-by-default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-failsafe-plugin</artifactId>
              <configuration>
                <skipITs>true</skipITs>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
