<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>stash-hipchat-integration</artifactId>
        <version>6.29.0-D20150624T015846</version>
    </parent>

    <groupId>com.atlassian.stash.plugins</groupId>
    <artifactId>stash-hipchat-integration-func-tests</artifactId>
    <name>Stash Hipchat Integration Func tests</name>
    <description>Provides tests for testing the Stash HipChat integration.</description>

    <properties>
        <baseurl.stash>http://127.0.0.1/stash</baseurl.stash>
        <context.stash.path>/stash</context.stash.path>
        <http.stash.port>7990</http.stash.port>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash.plugins</groupId>
            <artifactId>stash-hipchat-integration-page-objects</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-func-test-common</artifactId>
            <version>${stash.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>base-hipchat-integration-plugin-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>hipchat-mocked-server</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-page-objects</artifactId>
            <version>${stash.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.hipchat</groupId>
            <artifactId>hipchat-java-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <scope>test</scope>
            <version>2.2.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-htmlunit-driver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>base-hipchat-integration-plugin</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>12.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <installPlugin>false</installPlugin>
                    <extractDependencies>false</extractDependencies>
                    <excludeAllTestDependencies>true</excludeAllTestDependencies>
                    <testGroups>
                        <testGroup>
                            <id>stash</id>
                            <productIds>
                                <productId>stash</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                    <products>
                        <product>
                            <id>stash</id>
                            <version>${stash.version}</version>
                            <dataVersion>${stash.data.version}</dataVersion>
                            <output>${project.build.directory}/stash-${stash.version}.log</output>
                            <containerId>tomcat8x</containerId>

                            <systemPropertyVariables>
                                <file.encoding>UTF-8</file.encoding>
                                <atlassian.dev.mode>false</atlassian.dev.mode>
                                <java.awt.headless>true</java.awt.headless>
                                <!-- Our func tests don't know how to wait for the system to be available, so force
                                     it to come up synchronously so that Cargo will block for us -->
                                <johnson.spring.lifecycle.synchronousStartup>true</johnson.spring.lifecycle.synchronousStartup>
                                <feature.getting.started.page>false</feature.getting.started.page>
                            </systemPropertyVariables>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>base-hipchat-integration-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>base-hipchat-integration-plugin-api</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.stash.plugins</groupId>
                                    <artifactId>stash-hipchat-integration-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.stash.plugins</groupId>
                                    <artifactId>stash-hipchat-integration-test-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                        </product>
                    </products>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeTransitive>false</excludeTransitive>
                            <includeScope>test</includeScope>
                            <includeTypes>zip</includeTypes>
                            <outputDirectory>${project.build.testOutputDirectory}/git</outputDirectory>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <target>1.7</target>
                    <source>1.7</source>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <skipTests>true</skipTests> <!--Only func tests here, no unit-->
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
