<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.upm</groupId>
        <artifactId>wired-tests</artifactId>
        <version>2.17.5-m1</version>
    </parent>
    <artifactId>wired-tests-suite</artifactId>
    <packaging>atlassian-plugin</packaging>
    <name>Atlassian Universal Plugin Manager Wired Tests Suite</name>
    <description>Wired tests which run with plugin modules within a product instance</description>

    <dependencies>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-compat</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>testing</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.integrationtesting</groupId>
                    <artifactId>atlassian-integrationtesting-lib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-spi</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>wired-tests-helper-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
            <type>atlassian-plugin</type>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-lib</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-common</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.beehive</groupId>
            <artifactId>beehive-compat</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira</artifactId>
            <version>${jira.target.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-api</artifactId>
            <version>${stash.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-api</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.extras</groupId>
                    <artifactId>atlassian-extras-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.extras</groupId>
                    <artifactId>atlassian-extras</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.fisheye</groupId>
            <artifactId>atlassian-fisheye-api</artifactId>
            <version>${fecru.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.fisheye</groupId>
            <artifactId>fisheye-jar</artifactId>
            <version>${fecru.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.fisheye</groupId>
                    <artifactId>atlassian-fisheye-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.extras</groupId>
                    <artifactId>atlassian-extras</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>refapp-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>jira-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>confluence-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>fecru-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>stash-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>bamboo-host-license-provider</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.extras</groupId>
            <artifactId>atlassian-extras-api</artifactId>
            <version>${atlassian.extras.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.extras</groupId>
            <artifactId>atlassian-extras-core</artifactId>
            <version>${atlassian.extras.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <httpPort>${httpPort}</httpPort>
                    <contextPath>${contextPath}</contextPath>
                    <buildTestPlugin>true</buildTestPlugin>
                    <systemPropertyVariables>
                        <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                        <devtoolbar.enable>true</devtoolbar.enable>
                        <mac.baseurl>${mac.baseurl}</mac.baseurl>
                        <mpac.baseurl>${mpac.baseurl}</mpac.baseurl>
                        <mpac.website>${mpac.website}</mpac.website>
                        <httpPort>${httpPort}</httpPort>
                        <contextPath>${contextPath}</contextPath>
                        <upm.pac.disable>${upm.pac.disable}</upm.pac.disable>
                        <atlassian.dev.confluence.whatsnew.show>false</atlassian.dev.confluence.whatsnew.show>
                        <atlassian.dev.jira.whatsnew.show>false</atlassian.dev.jira.whatsnew.show>
                        <atlassian.upm.server.data.disable>${atlassian.upm.server.data.disable}</atlassian.upm.server.data.disable>
                        <atlassian.webresource.disable.minification>${atlassian.webresource.disable.minification}</atlassian.webresource.disable.minification>
                        <atlassian.upm.debug>${atlassian.upm.debug}</atlassian.upm.debug>
                        <atlassian.upm.on.demand.plugin.installation.allowed>${atlassian.upm.on.demand.plugin.installation.allowed}</atlassian.upm.on.demand.plugin.installation.allowed>
                        <atlassian.upm.on.demand>${atlassian.upm.on.demand}</atlassian.upm.on.demand>
                        <atlassian.upm.user.installed.override>${atlassian.upm.user.installed.override}</atlassian.upm.user.installed.override>
                        <upm.version>${project.version}</upm.version>
                    </systemPropertyVariables>
                    <deployArtifacts>
                        <deployArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>wired-tests-helper-plugin</artifactId>
                            <version>${project.version}</version>
                        </deployArtifact>
                    </deployArtifacts>
                    <bundledArtifacts>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>wired-tests-helper-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>fake-mac-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>fake-pac-plugin</artifactId>
                            <version>${project.version}</version>
                        </bundledArtifact>
                    </bundledArtifacts>
                    <products>
                        <product>
                            <id>jira</id>
                            <version>${jira.version}</version>
                            <productDataPath>${home.location}/jira/non-eval-license.zip</productDataPath>
                            <output>${project.build.directory}/jira-${jira.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableSdkTools}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                            <!-- simulate an OnDemand environment by installing GreenHopper and Bonfire -->
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.plugins</groupId>
                                    <artifactId>jira-greenhopper-plugin</artifactId>
                                    <version>6.3.9.2</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bonfire</groupId>
                                    <artifactId>atlassian-bonfire-plugin</artifactId>
                                    <version>2.7.2.1</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>confluence</id>
                            <version>${confluence.version}</version>
                            <productDataPath>${home.location}/confluence/non-eval-license.zip</productDataPath>
                            <output>${project.build.directory}/confluence-${confluence.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableSdkTools}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                            <!-- simulate an OnDemand environment by installing Team Calendars -->
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.extra.team-calendars</groupId>
                                    <artifactId>team-calendars</artifactId>
                                    <version>4.1.4</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>stash</id>
                            <version>${stash.version}</version>
                            <containerId>tomcat7x</containerId>
                            <productDataPath>${home.location}/stash/non-eval-license.zip</productDataPath>
                            <output>${project.build.directory}/stash-${stash.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableSdkTools}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                        </product>
                        <product>
                            <id>bamboo</id>
                            <version>${bamboo.version}</version>
                            <productDataPath>${home.location}/bamboo/non-eval-license.zip</productDataPath>
                            <output>${project.build.directory}/bamboo-${bamboo.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableSdkTools}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                        </product>
                        <product>
                            <id>fecru</id>
                            <version>${fecru.version}</version>
                            <productDataPath>${home.location}/fecru/non-eval-license.zip</productDataPath>
                            <output>${project.build.directory}/fecru-${fecru.version}.log</output>
                            <enableDevToolbox>${enableSdkTools}</enableDevToolbox>
                            <enableFastdev>${enableSdkTools}</enableFastdev>
                            <enablePde>${enableSdkTools}</enablePde>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>jira</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                            <excludes>
                                <exclude>${testExcludes}</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                            <excludes>
                                <exclude>${testExcludes}</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>stash</id>
                            <productIds>
                                <productId>stash</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                            <excludes>
                                <exclude>${testExcludes}</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>bamboo</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                            <excludes>
                                <exclude>${testExcludes}</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>fecru</id>
                            <productIds>
                                <productId>fecru</productId>
                            </productIds>
                            <includes>
                                <include>${testIncludes}</include>
                            </includes>
                            <excludes>
                                <exclude>${testExcludes}</exclude>
                            </excludes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- allows for running OnDemand tests from a unicorn container -->
            <id>onDemandCI</id>
            <properties>
                <server>https://upm-ci.jira-dev.com</server>
                <contextPath>/</contextPath>
                <httpPort>80</httpPort>

                <testExcludes>it/**/btf/**/*Test.java</testExcludes>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <version>2.12.4</version>
                            <configuration>
                                <includes>
                                    <include>${testIncludes}</include>
                                </includes>
                                <excludes>
                                    <exclude>${testExcludes}</exclude>
                                </excludes>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- allows for running OnDemand tests from a local container -->
            <id>onDemandLocal</id>
            <properties>
                <testExcludes>it/**/btf/**/*Test.java</testExcludes>
                <atlassian.upm.on.demand>true</atlassian.upm.on.demand>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <version>2.12.4</version>
                            <configuration>
                                <includes>
                                    <include>${testIncludes}</include>
                                </includes>
                                <excludes>
                                    <exclude>${testExcludes}</exclude>
                                </excludes>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>ide</id>
            <!-- UPM-1268 : Duplicate dependency declarations are here to make idea / eclipse happy; otherwise they
              don't handle dependencies of type atlassian-plugin well. If you get compilation problems in your
               ide, try activating this profile. These also need to be kept up to date if additional atlassian-plugin type
                dependencies are added to the default profile. -->
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.upm</groupId>
                    <artifactId>wired-tests-helper-plugin</artifactId>
                    <version>${project.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <properties>
        <httpPort>4990</httpPort>
        <testIncludes>it/**/wiredtests/**/*Test.java</testIncludes>
        <testExcludes>it/**/ondemand/**/*Test.java</testExcludes> <!-- by default, run as if a BTF environment -->
        <home.location>${basedir}/../../atlassian-universal-plugin-manager-integration-tests/src/test/resources</home.location>
        <atlassian.upm.user.installed.override>com.atlassian.bonfire.plugin,com.pyxis.greenhopper.jira,com.atlassian.confluence.extra.team-calendars</atlassian.upm.user.installed.override>
    </properties>
</project>
