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

    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>3.0.88</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atlassian.servicedesk</groupId>
    <artifactId>jira-servicedesk-pageobjects-parent-pom</artifactId>
    <version>2.4.041</version>

    <name>Service Desk PageObjects Parent Pom</name>
    <description>Atlassian Service Desk PageObjects</description>
    <packaging>pom</packaging>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/SD/servicedesk-page-objects.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/SD/servicedesk-page-objects.git</developerConnection>
        <url>https://stash.atlassian.com/projects/SD/repos/servicedesk-page-objects/</url>
      <tag>HEAD</tag>
  </scm>

    <modules>
        <module>page-objects</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>${jira.test.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>ka-func-test-framework</artifactId>
            <version>${issuenav.components.version}</version>
        </dependency>
        <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>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>atlassian-confluence-pageobjects</artifactId>
            <version>${confluence.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>atlassian-webdriver-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-test-support</artifactId>
            <version>${confluence.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrest.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>${hamcrest.version}</version>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>

                <!--
                    See http://davidb.github.io/scala-maven-plugin/index.html for full details
                 -->

                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <args>
                        <!-- to avoid 'error: File name too long' in Linux/ecryptfs file system -->
                        <arg>-Xmax-classfile-name</arg>
                        <arg>143</arg>
                        <arg>-unchecked</arg>
                        <arg>-deprecation</arg>
                        <!--<arg>-explaintypes</arg>-->
                        <arg>-feature</arg>
                        <arg>-language:_</arg>
                        <arg>-target:jvm-${maven.compiler.target}</arg>
                        <arg>-Xfatal-warnings</arg>

                        <!--use this to work out what the feck the compiler is doing.  Note :  its a lot of output-->
                        <!--<param>-verbose</param>-->
                    </args>
                    <!--
                        we don't want the scala compiler to go into GC catalepsy,
                        it's slow enough as it is. running in-process causes classpath problems.

                        Taken from Soke POM scala config
                    -->
                    <jvmArgs>
                        <param>-server</param>
                        <!--grabbing memory up front saves us 2 seconds-->
                        <param>-Xms1024M</param>
                        <param>-Xmx1024M</param>

                        <param>-XX:+PrintGC</param>
                        <param>-XX:+PrintGCDetails</param>
                        <param>-XX:+PrintGCTimeStamps</param>
                        <param>-XX:+DisableExplicitGC</param>
                        <param>-XX:+UseParallelOldGC</param>
                    </jvmArgs>

                    <javacArgs>
                        <javacArg>-source</javacArg>
                        <javacArg>${maven.compiler.source}</javacArg>
                        <javacArg>-target</javacArg>
                        <javacArg>${maven.compiler.target}</javacArg>
                        <javacArg>-Xlint:unchecked</javacArg>
                        <javacArg>-Xlint:deprecation</javacArg>

                        <!--use this to work out what the feck the compiler is doing.  Note :  its a lot of output-->
                        <!--<javacArg>-verbose</javacArg>-->
                    </javacArgs>

                    <!--

                    ZINC: Really increase compile speed.  A lot!!!

                    -->
                    <displayCmd>true</displayCmd>
                    <recompileMode>incremental</recompileMode>
                    <useZincServer>true</useZincServer>

                    <!-- This is to pass the JVM version to ZINC Incremental compilation -->
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>

                </configuration>
            </plugin>
        </plugins>
    </build>

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

        <issuenav.components.version>6.2.23</issuenav.components.version>
        <atlassian.selenium.version>2.2-rc3</atlassian.selenium.version>
        <hamcrest.version>1.3</hamcrest.version>
        <jira.projects.version>2.5</jira.projects.version>
        <scala.version.base>2.10</scala.version.base>
        <scala.version>${scala.version.base}.5</scala.version>

        <!-- CI expects to set jira.test.version -->
        <jira.test.version>6.3.8</jira.test.version>

        <!-- Confluence AMPS version -->
        <confluence.version>5.6.6</confluence.version>

        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>

        <!-- this is specified in base-pom and is used to specify the Java Version for this plugin -->
        <jdkLevel>1.6</jdkLevel>
        <!-- maven-compiler-plugin config -->
        <maven.compiler.source>${jdkLevel}</maven.compiler.source>
        <maven.compiler.target>${jdkLevel}</maven.compiler.target>
        <!-- Encoding settings -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
    </properties>
</project>
