<?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>
        <artifactId>atlassian-connect-parent</artifactId>
        <groupId>com.atlassian.plugins</groupId>
        <version>1.0.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>atlassian-connect-integration-tests</artifactId>
    <name>Atlassian Connect - IT Tests</name>
    <packaging>atlassian-plugin</packaging>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>atlassian-connect-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <version>${atlassian.selenium.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>atlassian-browsers-linux64</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-linux64</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.httpclient</groupId>
            <artifactId>atlassian-httpclient-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.kohsuke.redstone</groupId>
            <artifactId>redstone</artifactId>
            <version>1.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>atlassian-confluence-pageobjects</artifactId>
            <version>${atlassian.confluence.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-webdriver-support</artifactId>
            <version>${atlassian.confluence.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>${atlassian.jira.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpmime</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-func-test-basics</artifactId>
            <version>${functestbasics.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.jira.tests</groupId>
                    <artifactId>jira-testkit-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.tests</groupId>
            <artifactId>jira-testkit-client</artifactId>
            <version>${atlassian.jira.testkit.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jvnet.hudson</groupId>
            <artifactId>jira-api</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cc.plural</groupId>
            <artifactId>jsonij</artifactId>
            <version>0.2.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.samskivert</groupId>
            <artifactId>jmustache</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.functest</groupId>
            <artifactId>functest-plugin</artifactId>
            <version>${functest.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-bridge</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>ka-func-test-framework</artifactId>
            <version>${atlassian.jira.testkit.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>atlassian-browsers-windows</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>atlassian-browsers-linux</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>atlassian-browsers-linux64</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>1.8-atlassian-8</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <configuration>
                    <skipManifestValidation>true</skipManifestValidation>
                    <jvmArgs>-Xmx1024m -XX:MaxPermSize=256m</jvmArgs>
                    <installPlugin>false</installPlugin>

                    <systemPropertyVariables>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <atlassian.mail.senddisabled>false</atlassian.mail.senddisabled>
                        <sun.net.http.allowRestrictedHeaders>true</sun.net.http.allowRestrictedHeaders>
                        <webdriver.browser>${webdriver.browser}</webdriver.browser>
                    </systemPropertyVariables>

                    <functionalTestPattern>it/**/Test*.java</functionalTestPattern>

                    <products>
                        <product>
                            <id>jira</id>
                            <version>${atlassian.jira.version}</version>
                            <log4jProperties>src/test/resources/log4j-jira.properties</log4jProperties>
                            <productDataPath>${basedir}/src/test/resources/jira-generated-test-resources.zip
                            </productDataPath>
                            <systemPropertyVariables>
                                <product>jira</product>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.webhooks</groupId>
                                    <artifactId>atlassian-webhooks-plugin</artifactId>
                                    <version>${atlassian.webhooks.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins.webhooks</groupId>
                                    <artifactId>jira-webhooks-plugin</artifactId>
                                    <version>${atlassian.jira.webhooks.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.httpclient</groupId>
                                    <artifactId>atlassian-httpclient-plugin</artifactId>
                                    <version>${atlassian.httpclient.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-test-support-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.gadgets</groupId>
                                    <artifactId>atlassian-gadgets-publisher-plugin</artifactId>
                                    <version>3.2.0-m8</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.functest</groupId>
                                    <artifactId>functest-plugin</artifactId>
                                    <version>${functest.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jwt</groupId>
                                    <artifactId>jwt-plugin</artifactId>
                                    <version>${atlassian.jwt.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bundles</groupId>
                                    <artifactId>json-schema-validator-atlassian-bundle</artifactId>
                                    <version>${atlassian.json.schema.validator.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>confluence</id>
                            <version>${atlassian.confluence.version}</version>
                            <log4jProperties>src/test/resources/log4j-confluence.properties
                            </log4jProperties>
                            <productDataPath>
                                ${basedir}/src/test/resources/confluence-generated-test-resources.zip
                            </productDataPath>
                            <systemPropertyVariables>
                                <product>confluence</product>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.webhooks</groupId>
                                    <artifactId>atlassian-webhooks-plugin</artifactId>
                                    <version>${atlassian.webhooks.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.httpclient</groupId>
                                    <artifactId>atlassian-httpclient-plugin</artifactId>
                                    <version>${atlassian.httpclient.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-test-support-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jwt</groupId>
                                    <artifactId>jwt-plugin</artifactId>
                                    <version>${atlassian.jwt.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bundles</groupId>
                                    <artifactId>json-schema-validator-atlassian-bundle</artifactId>
                                    <version>${atlassian.json.schema.validator.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-scriptsfinished-plugin</artifactId>
                                    <version>${atlassian.confluence.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                    </products>

                    <testGroups>
                        <testGroup>
                            <id>confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <systemProperties>
                                <testedProductClass>
                                    com.atlassian.plugin.connect.test.pageobjects.confluence.FixedConfluenceTestedProduct
                                </testedProductClass>
                            </systemProperties>
                            <excludes>
                                <exclude>it/jira/*.java</exclude>
                                <exclude>it/*/jira/*.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>jira</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <systemProperties>
                                <testedProductClass>
                                    com.atlassian.jira.pageobjects.JiraTestedProduct
                                </testedProductClass>
                            </systemProperties>
                            <excludes>
                                <exclude>it/confluence/*.java</exclude>
                                <exclude>it/*/confluence/*.java</exclude>
                            </excludes>
                        </testGroup>
                    </testGroups>
                </configuration>
                <dependencies>
                    <dependency>
                        <artifactId>junit</artifactId>
                        <groupId>junit</groupId>
                        <version>4.10</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.hamcrest</groupId>
                                <artifactId>hamcrest-core</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <properties>
        <testkit.version>${atlassian.jira.testkit.version}</testkit.version>
        <jetty.version>8.1.7.v20120910</jetty.version>
        <functest.version>0.7.1</functest.version>
        <functestbasics.version>1.9.7</functestbasics.version>
    </properties>
</project>
