<?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.jboss.arquillian.container</groupId>
    <artifactId>arquillian-tomcat-container-parent</artifactId>
    <version>1.2.1.Final</version>
    <relativePath>../tomcat-container-parent/pom.xml</relativePath>
  </parent>

  <artifactId>arquillian-tomcat-remote-parent</artifactId>
  <packaging>pom</packaging>
  <name>Arquillian Tomcat Remote Container Parent</name>

  <dependencies>

    <!-- Compile Scope -->

    <dependency>
      <groupId>org.jboss.arquillian.container</groupId>
      <artifactId>arquillian-tomcat-remote-common</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- Test Scope -->

    <dependency>
      <groupId>org.jboss.arquillian.container</groupId>
      <artifactId>arquillian-tomcat-remote-common</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <executions>
            <execution>
              <id>start-container</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>start</goal>
              </goals>
              <configuration>
                <container>
                  <systemProperties>
                    <java.rmi.server.hostname>127.0.0.1</java.rmi.server.hostname>
                    <com.sun.management.jmxremote.port>${test.jmx.port}</com.sun.management.jmxremote.port>
                    <com.sun.management.jmxremote.ssl>false</com.sun.management.jmxremote.ssl>
                    <com.sun.management.jmxremote.authenticate>false</com.sun.management.jmxremote.authenticate>
                  </systemProperties>
                </container>
                <configuration>
                  <properties>
                    <cargo.servlet.port>${test.http.port}</cargo.servlet.port>
                    <cargo.tomcat.ajp.port>${test.ajp.port}</cargo.tomcat.ajp.port>
                    <cargo.rmi.port>${test.rmi.port}</cargo.rmi.port>
                  </properties>
                  <configfiles>
                    <configfile>
                      <file>${project.build.testOutputDirectory}/tomcat-users.xml</file>
                      <toDir>conf</toDir>
                    </configfile>
                  </configfiles>
                </configuration>
              </configuration>
            </execution>
            <execution>
              <id>stop-container</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>stop</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
