<?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>com.atlassian.servicedesk</groupId>
        <artifactId>servicedesk-parent-pom</artifactId>
        <version>4.5.4-REL-0025</version>
    </parent>

    <artifactId>servicedesk-tests-parent</artifactId>
    <packaging>pom</packaging>

    <name>Service Desk Test Parent POM</name>

    <properties>
        <license.scope>test</license.scope>

        <!-- base JVM args for JIRA test runners -->
        <jira.user.jvmargs>-Duser.language=en -Duser.region=AU -Duser.timezone=Australia/Sydney</jira.user.jvmargs>
        <jira.test.runner.jvmargs>-Dfile.encoding=utf-8 ${jira.user.jvmargs}</jira.test.runner.jvmargs>

        <httpclient.cache.version>${httpclient.version}</httpclient.cache.version>

        <test.host>localhost</test.host>
        <db.host>${test.host}</db.host>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--
                Declare the atlassian selenium dependencies in the test parent pom to avoid transitive dependency resolution
                issues.
            -->
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-pageobjects-api</artifactId>
                <version>${atlassian.selenium.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-projects-page-objects</artifactId>
                <version>${jira.projects.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-webdriver-core</artifactId>
                <version>${atlassian.selenium.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-pageobjects-elements</artifactId>
                <version>${atlassian.selenium.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient-cache</artifactId>
                <version>${httpclient.cache.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>${httpclient.version}</version>
            </dependency>
           <dependency>
                <groupId>com.atlassian</groupId>
                <artifactId>test-batching</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-rest-java-client-api</artifactId>
                <version>${rest.java.client.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.browsers</groupId>
                <artifactId>atlassian-browsers-auto</artifactId>
                <version>${atlassian.browsers.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-rest-java-client-core</artifactId>
                <version>${rest.java.client.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-webdriver-pageobjects</artifactId>
                <version>${confluence.webdriver.pageobjects.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit-dep</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <!-- This profile will include the test modules and thus build them when its activated.
                 It will always be enabled unless it has been explcitly disabled via: -P-with-integration-tests-module
                 That will enable us to get rid of the dreaded -pl list for master -->
            <id>with-test-modules</id>
            <modules>
                <module>condition-plugin</module>
                <module>servicedesk-testutils-plugin</module>
                <module>applinks-util-plugin</module>
                <module>web-test-fixtures</module>
                <module>page-objects</module>
                <module>integration-tests-parent</module>
            </modules>
            <activation>
                <!-- hack to really always enable the profile, unless its explicitly disabled -->
                <jdk>[1.8,)</jdk>
            </activation>
        </profile>
    </profiles>
</project>
