<?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.activeobjects</groupId>
        <artifactId>activeobjects-plugin-parent-pom</artifactId>
        <version>3.6.5</version>
    </parent>

    <artifactId>activeobjects-test-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>ActiveObjects Plugin - Test Plugin</name>
    <description>A plugin to do some integration testing of AO.</description>

    <properties>
        <atlassian.diagnostics.version>1.1.21</atlassian.diagnostics.version>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>

        <commons-httpclient.version>3.1-atlassian-2</commons-httpclient.version>
        <dom4j.version>1.6.1-atlassian-3</dom4j.version>
        <jaxen.version>1.2.0-atlassian-2</jaxen.version>
        <jsr311-api.version>1.1.1</jsr311-api.version>
        <restassured.version>4.4.0</restassured.version>
        <xmlunit.version>1.6</xmlunit.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- this is brought by the model -->
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-core</artifactId>
                <version>${project.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>xalan</groupId>
                <artifactId>xalan</artifactId>
                <version>2.7.2</version>
            </dependency>

            <!--   Test dependencies    -->
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>${jsr311-api.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
                <version>${commons-httpclient.version}</version>
            </dependency>
            <dependency>
                <groupId>dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>${dom4j.version}</version>
            </dependency>
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>${restassured.version}</version>
            </dependency>
            <dependency>
                <groupId>jaxen</groupId>
                <artifactId>jaxen</artifactId>
                <version>${jaxen.version}</version>
            </dependency>
            <dependency>
                <groupId>xmlunit</groupId>
                <artifactId>xmlunit</artifactId>
                <version>${xmlunit.version}</version>
            </dependency>

            <!-- refapp -->
            <dependency>
                <groupId>com.atlassian.refapp</groupId>
                <artifactId>atlassian-refapp-pageobjects</artifactId>
                <version>${refapp.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-spi</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-test-model</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.sal</groupId>
                    <artifactId>sal-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.java.dev.activeobjects</groupId>
                    <artifactId>activeobjects-test</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.beehive</groupId>
            <artifactId>beehive-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>

        <!--   Test dependencies    -->
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- refapp -->
        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <webdriver.browser>firefox</webdriver.browser>
                        <xvfb.enable>true</xvfb.enable>
                        <refapp.profiling.enabled>true</refapp.profiling.enabled>
                    </systemPropertyVariables>
                    <containerId>tomcat85x</containerId>
                    <banningExcludes>com.atlassian.activeobjects:activeobjects-test</banningExcludes>
                    <pluginDependencies>
                        <pluginDependency>
                            <groupId>com.atlassian.diagnostics</groupId>
                            <artifactId>noisy-neighbour-plugin</artifactId>
                        </pluginDependency>
                        <pluginDependency>
                            <groupId>com.atlassian.diagnostics</groupId>
                            <artifactId>upgrade-task-plugin</artifactId>
                        </pluginDependency>
                    </pluginDependencies>
                    <products>
                        <product>
                            <id>refapp</id>
                            <version>${refapp.version}</version>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.activeobjects</groupId>
                                    <artifactId>activeobjects-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.diagnostics</groupId>
                                    <artifactId>noisy-neighbour-plugin</artifactId>
                                    <version>${atlassian.diagnostics.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.diagnostics</groupId>
                                    <artifactId>upgrade-task-plugin</artifactId>
                                    <version>${atlassian.diagnostics.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.atlassian.activeobjects</groupId>
                                    <artifactId>activeobjects-spi</artifactId>
                                    <version>${project.version}</version>
                                </libArtifact>
                            </libArtifacts>
                            <output>${project.build.directory}/refapp.log</output>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>refapp</id>
                            <productIds>
                                <productId>refapp</productId>
                            </productIds>
                            <includes>
                                <include>it/**</include>
                            </includes>
                            <systemProperties>
                                <tested.app>com.atlassian.webdriver.refapp.RefappTestedProduct</tested.app>
                                <refapp.profiling.enabled>true</refapp.profiling.enabled>
                            </systemProperties>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
