<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.jira</groupId>
        <artifactId>jira-functional-tests</artifactId>
        <version>7.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>jira-webdriver-tests</artifactId>
    <name>Atlassian JIRA - Testing - WebDriver Tests</name>
    <description>WebDriver tests for JIRA</description>

    <properties>
        <!-- Licence build will ignore this module -->
        <license.scope>test</license.scope>

        <!-- just to make IDE happy ;) -->
        <http.jira.port />
        <http.jira.hostname />
        <http.jira.protocol />
        <context.jira.path />
        <jim.version>7.0.20-D20150910T104809</jim.version>
    </properties>

    <profiles>
        <profile>
            <id>jar-with-dependencies</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptors>
                                <descriptor>jar-with-dependencies-less-xmls-descriptor.xml</descriptor>
                            </descriptors>
                        </configuration>
                        <executions>
                            <execution>
                                <id>build-jar-with-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jmake-webdriver-tests</id>
            <activation>
                <property>
                    <name>ondemand.acceptance.tests</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.16</version>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.surefire</groupId>
                                <artifactId>surefire-junit47</artifactId>
                                <version>2.13</version>
                            </dependency>
                        </dependencies>
                        <configuration>
                            <threadCount>1</threadCount>
                            <excludes>
                                <exclude>**/visualregression/**</exclude>
                                <exclude>**/*$*</exclude>
                            </excludes>
                            <testClassesDirectory>${project.build.directory}/classes/</testClassesDirectory>
                            <skip>false</skip>
                            <excludedGroups>com.atlassian.jira.functest.framework.suite.SkipInDevMode</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>webdriver-backup-files-validation</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-backup-files-validator-plugin</artifactId>
                        <version>1.0.0</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>validate</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <xmlLocation>xml/webdriver_test_xml_resources</xmlLocation>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>webdriver-backup-files-validation-local</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-backup-files-validator-plugin</artifactId>
                        <version>1.0.0</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>validate</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <localMode>true</localMode>
                            <xmlLocation>xml/webdriver_test_xml_resources</xmlLocation>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>clover.func.tests</id>
            <activation>
                <property>
                    <name>clover.func.tests</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.clover</groupId>
                    <artifactId>clover</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>zdu-mixed</id>
            <properties>
                <jira.stable.version>7.3.0</jira.stable.version>
            </properties>
            <build>
                <resources>
                    <resource>
                        <directory>${project.build.directory}/generated-resources/xml</directory>
                        <targetPath>xml</targetPath>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <configuration>
                            <overwrite>true</overwrite>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.1-atlassian-2</version>
                        <executions>
                            <execution>
                                <id>generate-test-xml-sources</id>
                                <phase>none</phase>
                            </execution>
                            <execution>
                                <id>generate-test-xml-sources-zdu</id>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>com.atlassian.jira</groupId>
                                            <artifactId>jira-webdriver-tests</artifactId>
                                            <version>${jira.stable.version}</version>
                                            <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
                                            <overWrite>true</overWrite>
                                            <includes>xml/**</includes>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>${maven.test.unit.skip}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*.properties</exclude>
                </excludes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/xml</directory>
                <targetPath>xml</targetPath>
            </resource>
        </resources>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.test.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-func-tests</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <version>${atlassian.selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-ui-test-utils</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>atlassian-universal-plugin-manager-pageobjects</artifactId>
            <version>${upm.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>atlassian-webdriver-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>atlassian-pageobjects-elements</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-api</artifactId>
            <version>${atlassian.selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements</artifactId>
            <version>${atlassian.selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-selenium</artifactId>
            <version>${atlassian.selenium.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>jetty-repacked</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>servlet-api-2.5</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.integrationtesting</groupId>
            <artifactId>atlassian-integrationtesting-lib</artifactId>
            <version>1.0.beta7</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.inject</groupId>
                    <artifactId>guice</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.jstestrunner</groupId>
            <artifactId>atlassian-jstest-runner-pageobjects</artifactId>
            <version>${atlassian.jstest.runner.plugin.version}</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-java-client-api</artifactId>
            <version>4.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-java-client-core</artifactId>
            <version>4.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${apache.httpclient.test.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <version>${apache.httpclient.test.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${apache.httpcore.test.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>${apache.httpclient.test.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.velocity</groupId>
            <artifactId>atlassian-velocity</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-test-categories</artifactId>
            <version>0.5</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.uri</groupId>
            <artifactId>atlassian-uri</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-auto</artifactId>
            <version>2.8.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.pageweight</groupId>
            <artifactId>webdriver-page-weight</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-importers-plugin-tests</artifactId>
            <version>${jim.version}</version>
            <exclusions>
                <!-- Embedded scanner 1.x libs violate enforce_spring_scanner_scope because they get dependency managed up to 2.x:
                     irrelevant side effect of jira-importers-plugin having 'compile' scope here to put it in test's classpath -->
                <exclusion>
                    <groupId>com.atlassian.plugin</groupId>
                    <artifactId>atlassian-spring-scanner-annotation</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugin</groupId>
                    <artifactId>atlassian-spring-scanner-runtime</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.feedback</groupId>
            <artifactId>jira-feedback-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <version>${atlassian.util.concurrent}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.whisper</groupId>
            <artifactId>atlassian-whisper-testkit</artifactId>
            <version>${whisper.version}</version>
        </dependency>
    </dependencies>
</project>
