<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/maven-v4_0_0.xsd">

  <parent>
    <groupId>com.atlassian.bamboo</groupId>
    <artifactId>atlassian-bamboo</artifactId>
    <version>5.16.0-m123</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>atlassian-bamboo-user-management-test</artifactId>
  <packaging>atlassian-plugin</packaging>

  <name>Atlassian Bamboo User Management Test Module</name>

  <properties>
    <testGroups>bamboo_hibernate,bamboo_custom,bamboo_crowd_acceptance</testGroups>
    <crowd.test.version>${crowd.version}</crowd.test.version>
    <crowd.test.amps.containerId>tomcat6x</crowd.test.amps.containerId>
    <license.scope>test</license.scope>
    <bamboo.allowMutativeGetInStrictXsrfMode />
  </properties>

  <profiles>
    <profile>
      <id>mssql</id>
      <properties>
        <maven.test.it.skip>true</maven.test.it.skip>
      </properties>
    </profile>
    <profile>
      <id>mysql</id>
      <properties>
        <maven.test.it.skip>true</maven.test.it.skip>
      </properties>
    </profile>
    <profile>
      <id>mysql-ec2</id>
      <properties>
        <maven.test.it.skip>true</maven.test.it.skip>
      </properties>
    </profile>
    <profile>
      <id>oracle</id>
      <properties>
        <maven.test.it.skip>true</maven.test.it.skip>
      </properties>
    </profile>
    <profile>
      <id>pgsql</id>
      <properties>
        <maven.test.it.skip>true</maven.test.it.skip>
      </properties>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-amps-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>

          <products>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo-hibernate</instanceId>
              <version>${project.version}</version>
              <dataVersion>5.3</dataVersion>
              <containerId>${amps.containerId}</containerId>
              <jvmDebugPort>5005</jvmDebugPort>
              <jvmArgs>${bambooServerJvmArgs}</jvmArgs>
              <pluginArtifacts>
                <pluginArtifact>
                  <groupId>com.atlassian.bamboo.plugins</groupId>
                  <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
                </pluginArtifact>
              </pluginArtifacts>
            </product>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo-crowd</instanceId>
              <version>${project.version}</version>
              <dataPath>${project.basedir}/src/test/amps/bamboo-plugin-test-resources-5.3-crowd.zip</dataPath>
              <containerId>${amps.containerId}</containerId>
              <!-- Used by UpgradeBambooCrowdTest#testApplicationNameCannotBeChanged() -->
              <jvmArgs>${bambooServerJvmArgs} -Dcrowd.property.application.name=bamboo -Dbamboo.allowMutativeGetInStrictXsrfMode=${bamboo.allowMutativeGetInStrictXsrfMode}</jvmArgs>
              <jvmDebugPort>5005</jvmDebugPort>
              <pluginArtifacts>
                <pluginArtifact>
                  <groupId>com.atlassian.bamboo.plugins</groupId>
                  <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
                </pluginArtifact>
              </pluginArtifacts>
            </product>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo-custom</instanceId>
              <version>${project.version}</version>
              <dataPath>${project.basedir}/src/test/amps/bamboo-plugin-test-resources-5.3-custom.zip</dataPath>
              <containerId>${amps.containerId}</containerId>
              <jvmDebugPort>5005</jvmDebugPort>
              <jvmArgs>${bambooServerJvmArgs}</jvmArgs>
              <pluginArtifacts>
                <pluginArtifact>
                  <groupId>com.atlassian.bamboo.plugins</groupId>
                  <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
                </pluginArtifact>
              </pluginArtifacts>
            </product>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo-no-setup</instanceId>
              <version>${project.version}</version>
              <dataPath>${project.basedir}/src/test/amps/bamboo-plugin-test-resources-4.0-no-setup.zip</dataPath>
              <containerId>${amps.containerId}</containerId>
              <jvmDebugPort>5005</jvmDebugPort>
              <jvmArgs>${bambooServerJvmArgs}</jvmArgs>
              <pluginArtifacts>
                <pluginArtifact>
                  <groupId>com.atlassian.bamboo.plugins</groupId>
                  <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
                </pluginArtifact>
              </pluginArtifacts>
            </product>
            <product>
              <id>crowd</id>
              <instanceId>crowd4bamboo_custom</instanceId>
              <version>${crowd.test.version}</version>
              <dataPath>${project.basedir}/src/test/amps/crowd-plugin-test-resources.zip</dataPath>
              <containerId>${crowd.test.amps.containerId}</containerId>
              <jvmDebugPort>5006</jvmDebugPort>
              <ajpPort>8010</ajpPort>
              <!-- fastdev plugin generates OSGi errors -->
              <enableFastdev>false</enableFastdev>
              <enableDevToolbox>false</enableDevToolbox>
            </product>
            <product>
              <id>crowd</id>
              <instanceId>crowd4bamboo_crowd_acceptance</instanceId>
              <version>${crowd.test.version}</version>
              <dataPath>${project.basedir}/src/test/amps/crowd-plugin-test-resources.zip</dataPath>
              <containerId>${crowd.test.amps.containerId}</containerId>
              <jvmDebugPort>5006</jvmDebugPort>
              <ajpPort>8011</ajpPort>
              <!-- fastdev plugin generates OSGi errors -->
              <enableFastdev>false</enableFastdev>
              <enableDevToolbox>false</enableDevToolbox>
            </product>
          </products>

          <testGroups>

            <testGroup>
              <id>bamboo_hibernate</id>
              <productIds>
                <productId>bamboo-hibernate</productId>
              </productIds>
              <includes>
                <include>it/**/UpgradeBambooHibernateTest.java</include>
              </includes>
            </testGroup>

            <testGroup>
              <id>bamboo_custom</id>
              <productIds>
                <productId>crowd4bamboo_custom</productId>
                <productId>bamboo-custom</productId>
              </productIds>
              <includes>
                <include>it/**/UpgradeBambooCustomTest.java</include>
              </includes>
            </testGroup>

            <testGroup>
              <id>bamboo_crowd_acceptance</id>
              <productIds>
                <productId>crowd4bamboo_crowd_acceptance</productId>
                <productId>bamboo-crowd</productId>
              </productIds>
              <includes>
                <include>it/**/UpgradeBambooCrowdTest.java</include>
                <include>it/**/BambooCrowdAcceptanceTestHarness.java</include>
              </includes>
            </testGroup>

          </testGroups>

        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-pageobjects</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.crowd</groupId>
      <artifactId>crowd-integration-client-rest</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-core</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- For the tests to be able to assert resource keys-->
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-language</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
