<?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-m7-acdev_593-build4</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>
            </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>com.atlassian.httpclient</groupId>
            <artifactId>atlassian-httpclient-apache-httpcomponents</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>
            </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>
            </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>junit</groupId>
            <artifactId>junit</artifactId>
            <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>${jira.func.test.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>
    </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>chrome</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>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-rest-test-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>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.atlassian.util.concurrent</groupId>
                                    <artifactId>atlassian-util-concurrent</artifactId>
                                    <version>${atlassian-util-concurrent.version}</version>
                                </libArtifact>
                                <!-- TODO remove this once 3.0.5 is in all products -->
                                <libArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-plugins-core</artifactId>
                                    <version>${atlassian.plugins.version}</version>
                                </libArtifact>
                            </libArtifacts>

                            <bundledArtifacts>
                                <!-- TODO: remove this once UPM 2.13 is bundled with products -->
                                <bundledArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                                    <version>${atlassian.upm.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                            
                        </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>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>atlassian-connect-rest-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <!-- TODO remove this once 3.0.5 is in all products -->
                                <libArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-plugins-core</artifactId>
                                    <version>${atlassian.plugins.version}</version>
                                </libArtifact>
                            </libArtifacts>

                            <bundledArtifacts>
                                <!-- TODO: remove this once UPM 2.13 is bundled with products -->
                                <bundledArtifact>
                                    <groupId>com.atlassian.upm</groupId>
                                    <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                                    <version>${atlassian.upm.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                            
                            
                        </product>
                    </products>

                    <pluginDependencies>
                    </pluginDependencies>

                    <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>
                            </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>
                            </excludes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <jetty.version>8.1.7.v20120910</jetty.version>
        <functest.version>0.7.1</functest.version>
        <jira.func.test.version>${atlassian.jira.modules.version}</jira.func.test.version>
    </properties>
</project>