<?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">
    <parent>
        <groupId>com.atlassian.servicedesk</groupId>
        <artifactId>servicedesk-parent-pom</artifactId>
        <version>2.2-OD-03-D20141121T124030</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>servicedesk-tests-parent</artifactId>
    <name>Service Desk Test Parent POM</name>
    <packaging>pom</packaging>

    <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.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>
        </dependencies>
    </dependencyManagement>

    <properties>
        <jira.jvm.args>-Xmx512m -XX:MaxPermSize=512m</jira.jvm.args>
        <license.scope>test</license.scope>

        <postgres.driver.version>9.2-1004-jdbc4</postgres.driver.version>
        <!-- directly set as a build variable, e.g. -Dpostgres.driver.version=8.4-702.jdbc4
        <postgres.driver.version>8.4-702.jdbc4</postgres.driver.version>
         -->
        <mysql.driver.version>5.1.10</mysql.driver.version>
        <oracle.driver.version>11.2.0.2.0</oracle.driver.version>
        <mssql.driver.version>1.2.4</mssql.driver.version>

        <!-- 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>
    </properties>

    <modules>
        <module>condition-plugin</module>
        <module>js-unit-tests-parent</module>
        <module>servicedesk-testutils-plugin</module>
        <module>pageobjects</module>
        <module>integration-tests</module>
        <module>tpm</module>
    </modules>

    <profiles>

        <!-- MSSQL -->
        <profile>
            <id>MSSQL</id>
            <properties>
                <db.artifactGroup>net.sourceforge.jtds</db.artifactGroup>
                <db.artifactId>jtds</db.artifactId>
                <db.artifactVersion>${mssql.driver.version}</db.artifactVersion>
                <db.ofBizFieldType>mssql</db.ofBizFieldType>
            </properties>
        </profile>

        <!-- MySQL -->
        <profile>
            <id>MySQL</id>
            <properties>
                <db.artifactGroup>mysql</db.artifactGroup>
                <db.artifactId>mysql-connector-java</db.artifactId>
                <db.artifactVersion>${mysql.driver.version}</db.artifactVersion>
                <db.ofBizFieldType>mysql</db.ofBizFieldType>
            </properties>
        </profile>

        <!-- Oracle -->
        <profile>
            <id>Oracle</id>
            <properties>
                <db.artifactGroup>com.oracle</db.artifactGroup>
                <db.artifactId>ojdbc6</db.artifactId>
                <db.artifactVersion>${oracle.driver.version}</db.artifactVersion>
                <db.ofBizFieldType>oracle10g</db.ofBizFieldType>
            </properties>
        </profile>

        <!-- Postgres -->
        <profile>
            <id>Postgres</id>
            <properties>
                <db.artifactGroup>org.postgresql</db.artifactGroup>
                <db.artifactId>postgresql</db.artifactId>
                <db.artifactVersion>${postgres.driver.version}</db.artifactVersion>
                <db.ofBizFieldType>postgres72</db.ofBizFieldType>
            </properties>
        </profile>

    </profiles>
</project>
