<?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.applinks</groupId>
        <artifactId>applinks-parent</artifactId>
        <version>12.0.1</version>
    </parent>

    <artifactId>applinks-tests</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Applinks - Functional Tests - Test Suite</name>
    <description>[INTERNAL] Backdoor plugin and integration tests for Application Links</description>

    <properties>
        <amps.dev.tools>false</amps.dev.tools>
        <!-- used to control resource directories for dynamic reloading. Should only be on in dev environment, off for CI -->
        <!-- pointing to the pom.xml by default, this will result in no dynamic reloading, but also avoid warnings that
             are produced by the WRM if this points to a non-existing location -->
        <amps.resource.directories>${basedir}/pom.xml</amps.resource.directories>
        <!-- enable AMPS QuickReload (hot-deploy of plugin jars). Should only be on in dev environment, off for CI -->
        <amps.quick.reload>false</amps.quick.reload>
        <!-- override these to support multiple instances without clashing (see refapp1, refapp2, jira etc. profiles below) -->
        <applinks.build.directory>${basedir}/target</applinks.build.directory>
        <!-- main instance for smoke tests. See it.smoke.* profiles below -->
        <applinks.smoke.instance1 />
        <!-- background instance instance for smoke tests. . See it.smoke.* profiles below -->
        <applinks.smoke.instance2 />
        <applinks.e2e.instance />
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <bamboo.data.version>${bamboo.version}</bamboo.data.version>
        <bamboo.jvm.args>${jvm.args}</bamboo.jvm.args>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
        <bitbucket.jvm.args>${jvm.args}</bitbucket.jvm.args>
        <confluence.data.version>${confluence.test.version}</confluence.data.version>
        <confluence.jvm.args>-Dpassword.confirmation.disabled=true ${jvm.args} -Xmx${confluence.jvm.args.xmx}</confluence.jvm.args>
        <!-- CONFLUENCE: disable websudo -->
        <confluence.jvm.args.xmx>1g</confluence.jvm.args.xmx>
        <confluence.test.version>${confluence.version}</confluence.test.version>
        <fecru.data.version>${fecru.version}</fecru.data.version>
        <fecru.jvm.args>${jvm.args}</fecru.jvm.args>
        <fecru.version>4.8.13</fecru.version>
        <!-- Properties used to control integration tests - empty by default -->
        <!-- controls JUnit integration test categories to run. See it.* profiles below -->
        <it.categories />
        <jira.data.version>${jira.version}</jira.data.version>
        <!-- JIRA: disable onboarding, websudo and dark theme switcher popup -->
        <jira.jvm.args>-Datlassian.darkfeature.jira.onboarding.feature.disabled=true -Djira.websudo.is.disabled=true -Datlassian.darkfeature.com.atlassian.jira.theme.switcher.disabled=true ${jvm.args}</jira.jvm.args>
        <jira.test.version>${jira.version}</jira.test.version>
        <!-- Runtime JVM arguments passed in to running products -->
        <jvm.args>-Dupm.plugin.upload.enabled=true ${uniconn.jvm.env.args}</jvm.args>
        <uniconn.jvm.env.args>-Dapplinks.cloud.api.base.url=${applinks.cloud.api.base.url}</uniconn.jvm.env.args>
        <!-- run WebDriver in XVFB virtual screen -->
        <jvmDebugSuspend>false</jvmDebugSuspend>
        <refapp1.jvm.args>-Dsuper.batch.for=all -Datlassian.refapp.websudo.disabled=true ${jvm.args}</refapp1.jvm.args>
        <refapp2.jvm.args>-Dsuper.batch.for=all -Datlassian.refapp.websudo.disabled=true ${jvm.args}</refapp2.jvm.args>
        <xvfb.enable>true</xvfb.enable>
        <!-- Profiles override this when tests or local runs need a non-production SRS endpoint. -->
        <applinks.cloud.api.base.url>https://api.atlassian.com</applinks.cloud.api.base.url>
        <atlassian.browsers.version>4.4.0</atlassian.browsers.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-func-test-shared</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-uniconn-client-utils</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Applinks dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-uniconn-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-host</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-oauth-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-cors-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>applinks-basicauth-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Atlassian dependencies -->
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-service-provider-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.oauth</groupId>
            <artifactId>atlassian-oauth-consumer-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-internal-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Javax dependencies -->
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-internal-api -->
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!-- provided by platform-internal-api -->
            <groupId>tools.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.plugins</groupId>
            <artifactId>confluence-functestrpc-plugin</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.confluence</groupId>
                    <artifactId>confluence</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies - Applinks -->

        <dependency>
            <groupId>com.atlassian.user</groupId>
            <artifactId>atlassian-user</artifactId>
            <version>3.0.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-func-test-setup</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-pageobjects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-common</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-func-test-rest-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Test dependencies - Atlassian -->
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements-aui</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.refapp</groupId>
            <artifactId>atlassian-refapp-pageobjects</artifactId>
            <version>${refapp.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.plugins</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>${jira.test.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.plugins</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.browsers</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>org.json</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-text</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-core</artifactId>
                </exclusion>
                <!-- This was reporting misleading errors on test failures.-->
                <exclusion>
                    <groupId>com.atlassian</groupId>
                    <artifactId>flaky-test-reporter</artifactId>
                </exclusion>
                <!-- JSONB integration disables Jackson standard integration in test environemnt -->
                <!-- Our entities are defined with Jackson annotations -->
                <!-- One of the found issues was that JSONB doesn't play well with private properties without public setters, like `IncomingApplicationLinkDetails` -->
                <exclusion>
                    <groupId>org.glassfish.jersey.media</groupId>
                    <artifactId>jersey-media-json-binding</artifactId>
                </exclusion>
                <!-- prevent selecting junit5 by surefire (removed junit-platform-runner causes junit5 provider to be selected)-->
                <exclusion>
                    <groupId>org.junit.platform</groupId>
                    <artifactId>junit-platform-engine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.platform</groupId>
                    <artifactId>junit-platform-commons</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-page-objects</artifactId>
            <version>${bitbucket.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.plugins</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>org.json</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wiremock</groupId>
                    <artifactId>wiremock</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-webdriver-pageobjects</artifactId>
            <version>${confluence.pageobjects.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.plugins</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.oauth2</groupId>
                    <artifactId>oauth2-client-rest</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-dark-features-rest-plugin</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-dark-features-test-utils</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-test-resources</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-auto</artifactId>
            <version>${atlassian.browsers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-osx</artifactId>
            <version>${atlassian.browsers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-linux64</artifactId>
            <version>${atlassian.browsers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.browsers</groupId>
            <artifactId>atlassian-browsers-windows</artifactId>
            <version>${atlassian.browsers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.securetunnel.client</groupId>
            <artifactId>tunnel-client-plugin</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Test dependencies - 3rd party -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Using log4j-1.2-api instead of slf4j-reload4j to support Log4j 2.25.3 -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- This is required by Selenium but not pulled in transitively because Maven. If you dare to remove, WebDriver
             tests will (boom). Unless it's 5 years later and scopes have changed... or Selenium doesn't need GSON any
             more -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wiremock</groupId>
            <artifactId>wiremock-standalone</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.ta</groupId>
            <artifactId>wiremock-pact-generator</artifactId>
            <version>2.5.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-whitelist-test-utils</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <directory>${applinks.build.directory}</directory>
        <plugins>
            <!-- Runner plugins need to be explicitly defined here to pick up the parent configuration, because AMPS -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <argLine>${jvm.opens}</argLine>
                    <groups>${it.categories}</groups>
                    <systemPropertyVariables>
                        <applinks.smoke.instance1>${applinks.smoke.instance1}</applinks.smoke.instance1>
                        <applinks.smoke.instance2>${applinks.smoke.instance2}</applinks.smoke.instance2>
                        <applinks.e2e.instance>${applinks.e2e.instance}</applinks.e2e.instance>
                        <applinks.cloud.api.base.url>${applinks.cloud.api.base.url}</applinks.cloud.api.base.url>
                        <webdriver.firefox.profile.preferences>dom.security.https_first=false;dom.security.https_first_pbm=false;dom.security.https_only_mode=false;dom.security.https_only_mode_pbm=false</webdriver.firefox.profile.preferences>
                        <webdriver.firefox.remote.preferences>dom.security.https_first=false;dom.security.https_first_pbm=false;dom.security.https_only_mode=false;dom.security.https_only_mode_pbm=false</webdriver.firefox.remote.preferences>
                    </systemPropertyVariables>
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${jvm.opens}</argLine>
                    <!-- DCPL-4340: Honour skip.unit.tests from it.ci.smoke profile -->
                    <skipTests>${skip.unit.tests}</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${platform.version}</productVersion>
                    <parallel>true</parallel>
                    <!-- Starts the applications in parallel -->
                    <skipITs>${skip.integration.tests}</skipITs>
                    <buildTestPlugin>true</buildTestPlugin>
                    <excludeAllTestDependencies>true</excludeAllTestDependencies>
                    <enableQuickReload>${amps.quick.reload}</enableQuickReload>
                    <enableAchoo>${amps.dev.tools}</enableAchoo>
                    <enableDevToolbox>${amps.dev.tools}</enableDevToolbox>
                    <enableWebConsole>${amps.dev.tools}</enableWebConsole>
                    <enablePde>${amps.dev.tools}</enablePde>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                    <verifyFeManifestAssociationsFailOnUndeclaredFiles>false</verifyFeManifestAssociationsFailOnUndeclaredFiles>
                    <systemPropertyVariables>
                        <atlassian.dev.mode>${dev.mode}</atlassian.dev.mode>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <applinks.allow.all.hosts>true</applinks.allow.all.hosts>
                        <confluence.version>${confluence.test.version}</confluence.version>
                        <atlassian.oauth2.client.skip.base.url.https.requirement>true</atlassian.oauth2.client.skip.base.url.https.requirement>
                        <atlassian.oauth2.provider.skip.base.url.https.requirement>true</atlassian.oauth2.provider.skip.base.url.https.requirement>
                        <atlassian.oauth2.client.skip.provider.https.requirement>true</atlassian.oauth2.client.skip.provider.https.requirement>
                        <atlassian.darkfeature.applinks.uniconn>true</atlassian.darkfeature.applinks.uniconn>
                        <ssrf.denylist.enabled>false</ssrf.denylist.enabled>
                    </systemPropertyVariables>
                    <jvmDebugSuspend>${jvmDebugSuspend}</jvmDebugSuspend>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            <!-- Used by atlassian-plugin.xml -->
                            com.atlassian.applinks.internal.common.web.condition,
                            com.atlassian.applinks.core.util,
                            *
                        </Import-Package>
                    </instructions>
                    <products>
                        <!-- NOTE: if you're changing/adding any instance that is supposed to be used in automated
                                   tests, you will also need to modify the ProductInstances class accordingly -->
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp1</instanceId>
                            <httpPort>5990</httpPort>
                            <jvmDebugPort>5001</jvmDebugPort>
                            <ajpPort>9001</ajpPort>
                            <contextPath>/refapp1</contextPath>
                            <version>${refapp.version}</version>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp1.log</output>
                            <jvmArgs>${refapp1.jvm.args}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp2</instanceId>
                            <version>${refapp.version}</version>
                            <httpPort>5992</httpPort>
                            <jvmDebugPort>5002</jvmDebugPort>
                            <ajpPort>9002</ajpPort>
                            <contextPath>/refapp2</contextPath>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp2.log</output>
                            <jvmArgs>${refapp2.jvm.args}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <!--Runs a version of refapp that has a 3.x version of applinks bundled (requires JDK 1.7 to run) -->
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp-applinksv3</instanceId>
                            <httpPort>5993</httpPort>
                            <jvmDebugPort>5003</jvmDebugPort>
                            <ajpPort>9003</ajpPort>
                            <contextPath>/refapp3</contextPath>
                            <version>2.19.2</version>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp-applinksv3.log</output>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                        </product>

                        <!-- Runs core Applinks + OAuth plugin -->
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp4</instanceId>
                            <httpPort>5994</httpPort>
                            <jvmDebugPort>5004</jvmDebugPort>
                            <ajpPort>9004</ajpPort>
                            <contextPath>/refapp4</contextPath>
                            <version>${refapp.version}</version>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp4.log</output>
                            <jvmArgs>${refapp1.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <!-- Runs core Applinks plugin only -->
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp5</instanceId>
                            <version>${refapp.version}</version>
                            <httpPort>5995</httpPort>
                            <jvmDebugPort>5005</jvmDebugPort>
                            <ajpPort>9005</ajpPort>
                            <contextPath>/refapp5</contextPath>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp5.log</output>
                            <jvmArgs>${refapp2.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                    <version>${darkfeatures.rest.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <!-- Runs core Applinks plugin + tunnel-client-plugin -->
                        <product>
                            <id>refapp</id>
                            <instanceId>refapp6</instanceId>
                            <version>${refapp.version}</version>
                            <httpPort>5996</httpPort>
                            <jvmDebugPort>5006</jvmDebugPort>
                            <ajpPort>9006</ajpPort>
                            <contextPath>/refapp6</contextPath>
                            <log4jProperties>src/test/resources/log4j.properties</log4jProperties>
                            <output>${project.build.directory}/refapp6.log</output>
                            <jvmArgs>${refapp1.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${refapp.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.securetunnel.client</groupId>
                                    <artifactId>tunnel-client-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                        <product>
                            <id>jira</id>
                            <instanceId>jira</instanceId>
                            <containerId>tomcat11x</containerId>
                            <httpPort>2990</httpPort>
                            <jvmDebugPort>5011</jvmDebugPort>
                            <ajpPort>9011</ajpPort>
                            <version>${jira.version}</version>
                            <productDataVersion>${jira.data.version}</productDataVersion>
                            <output>${project.build.directory}/jira-${jira.version}.log</output>
                            <jvmArgs>${jira.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <!-- <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.version}</version>
                                </application>
                            </applications> -->
                            <systemPropertyVariables>
                                <cargo.java.home>${jira.java.home}</cargo.java.home>
                                <atlassian.darkfeature.never.display.newsletter.prompts>true</atlassian.darkfeature.never.display.newsletter.prompts>
                                <com.atlassian.plugins.authentication.basic.auth.filter.force.allow>true</com.atlassian.plugins.authentication.basic.auth.filter.force.allow>
                                <com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>false</com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.securetunnel.client</groupId>
                                    <artifactId>tunnel-client-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>

                            </libArtifacts>
                        </product>

                        <product>
                            <id>jira</id>
                            <!-- Second JIRA instance for applink-to-applink dev/testing. Use mvn amps:run -Ddev.app=jira2 -->
                            <instanceId>jira2</instanceId>
                            <containerId>tomcat11x</containerId>
                            <httpPort>2992</httpPort>
                            <jvmDebugPort>5013</jvmDebugPort>
                            <ajpPort>9013</ajpPort>
                            <contextPath>/jira2</contextPath>
                            <version>${jira.version}</version>
                            <productDataVersion>${jira.data.version}</productDataVersion>
                            <output>${project.build.directory}/jira2-${jira.version}.log</output>
                            <jvmArgs>${jira.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${jira.java.home}</cargo.java.home>
                                <atlassian.darkfeature.never.display.newsletter.prompts>true</atlassian.darkfeature.never.display.newsletter.prompts>
                                <com.atlassian.plugins.authentication.basic.auth.filter.force.allow>true</com.atlassian.plugins.authentication.basic.auth.filter.force.allow>
                                <com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>false</com.atlassian.plugins.authentication.basic.auth.filter.invalidate.session>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <product>
                            <id>jira</id>
                            <!-- Use jenv exec mvn amps:run -Ddev.app=jira9 to start this product locally-->
                            <instanceId>jira9</instanceId>
                            <version>9.4.30</version>
                            <httpPort>2993</httpPort>
                            <ajpPort>9012</ajpPort>
                            <jvmDebugPort>5012</jvmDebugPort>
                            <output>${project.build.directory}/jira9.log</output>
                            <!-- If updating the Jira version here you will need to replace the homezip that is generated.
                            To do this you will need to start remove productDataPath, start up the new version of Jira for
                            backwards compatibility tests and create a user for admin with default credentials. Ensure that
                            a version of applinks is injected with the bug fix DCPL-1531 or a product version that contains this.
                            After the user is created shutdown the product and run atlas-create-home-zip replace the existing zip,
                            and add the productDataPath back.
                            -->
                            <productDataPath>${project.basedir}/src/test/resources/jira9-test-data/jira9.zip</productDataPath>
                            <jvmArgs>${jira.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${jira.java.home}</cargo.java.home>
                                <atlassian.darkfeature.never.display.newsletter.prompts>true</atlassian.darkfeature.never.display.newsletter.prompts>
                            </systemPropertyVariables>
                            <!-- Inject the bugfix version of applinks until a version of Jira 9.4.x is available with this fix-->
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.applinks</groupId>
                                    <artifactId>applinks-tests</artifactId>
                                    <version>9.0.17</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence</instanceId>
                            <containerId>tomcat11x</containerId>
                            <httpPort>1990</httpPort>
                            <jvmDebugPort>5021</jvmDebugPort>
                            <ajpPort>9021</ajpPort>
                            <version>${confluence.test.version}</version>
                            <output>${project.build.directory}/confluence-${confluence.test.version}.log</output>
                            <productDataVersion>${confluence.data.version}</productDataVersion>
                            <jvmArgs>${confluence.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <atlassian.darkfeature.pulp>false</atlassian.darkfeature.pulp>
                                <cargo.java.home>${confluence.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functestrpc-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.securetunnel.client</groupId>
                                    <artifactId>tunnel-client-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <product>
                            <id>confluence</id>
                            <instanceId>confluence2</instanceId>
                            <containerId>tomcat11x</containerId>
                            <httpPort>1992</httpPort>
                            <jvmDebugPort>5022</jvmDebugPort>
                            <ajpPort>9022</ajpPort>
                            <contextPath>/confluence2</contextPath>
                            <output>${project.build.directory}/confluence2.log</output>
                            <version>${confluence.test.version}</version>
                            <output>${project.build.directory}/confluence-${confluence.test.version}.log</output>
                            <productDataVersion>${confluence.data.version}</productDataVersion>
                            <jvmArgs>${confluence.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <atlassian.darkfeature.pulp>false</atlassian.darkfeature.pulp>
                                <cargo.java.home>${confluence.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functestrpc-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins</groupId>
                                    <artifactId>atlassian-dark-features-rest-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>

                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket</instanceId>
                            <jvmDebugPort>5066</jvmDebugPort>
                            <version>${bitbucket.version}</version>
                            <output>${project.build.directory}/bitbucket.log</output>
                            <productDataVersion>${bitbucket.data.version}</productDataVersion>
                            <jvmArgs>${bitbucket.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${bitbucket.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                        <product>
                            <id>fecru</id>
                            <instanceId>fecru</instanceId>
                            <version>${fecru.version}</version>
                            <productDataVersion>${fecru.data.version}</productDataVersion>
                            <jvmDebugPort>5041</jvmDebugPort>
                            <ajpPort>9041</ajpPort>
                            <output>${project.build.directory}/fecru.log</output>
                            <jvmArgs>${fecru.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${fecru.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                        <product>
                            <id>bamboo</id>
                            <instanceId>bamboo</instanceId>
                            <version>${bamboo.version}</version>
                            <productDataVersion>${bamboo.data.version}</productDataVersion>
                            <jvmDebugPort>5051</jvmDebugPort>
                            <ajpPort>9051</ajpPort>
                            <output>${project.build.directory}/bamboo.log</output>
                            <jvmArgs>${bamboo.jvm.args} ${product.jvmArgs}</jvmArgs>
                            <systemPropertyVariables>
                                <cargo.java.home>${bamboo.java.home}</cargo.java.home>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-basicauth-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-cors-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-oauth-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-api</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-host</artifactId>
                                </libArtifact>
                                <libArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>applinks-spi</artifactId>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                    </products>
                    <testGroups>
                        <!-- For integration tests - all browser tests running against refapp-refapp -->
                        <testGroup>
                            <id>refapp_refapp</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/refapp_refapp/**/*TestRefApp.java</include>
                                <include>it/**/refapp_refapp/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <!-- the *_all groups are configured to run all "it.*" tests, the categories are used to further
                             filter the tests to run (see "it.categories" property) -->
                        <testGroup>
                            <id>start_refapp_1_2</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>refapp_refapp_all</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*TestRefApp.java</include>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>confluence_confluence_all</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>confluence2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <!-- DCPL-4340: Smoke slices - confluence-confluence OAuth1 (excludes OAuth2 tests) -->
                        <testGroup>
                            <id>apl_smoke_slice_confluence_confluence_oauth1</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>confluence2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                                <exclude>it/**/smoke/oauth2/**/*Test.java</exclude>
                                <exclude>it/**/e2e/**/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <!-- DCPL-4340: Smoke slices - confluence-confluence OAuth2 only -->
                        <testGroup>
                            <id>apl_smoke_slice_confluence_confluence_oauth2</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>confluence2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/smoke/oauth2/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>refapp_refapp_rest_only</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/rest/**/*TestRefApp.java</include>
                                <include>it/**/rest/**/*Test.java</include>
                                <include>it/**/rest/**Test*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>jira_confluence_all</id>
                            <productIds>
                                <productId>jira</productId>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <!-- DCPL-4340: Smoke slices - jira-confluence split into OAuth1 and OAuth2-only jobs -->
                        <testGroup>
                            <id>apl_smoke_slice_jira_confluence_oauth1</id>
                            <productIds>
                                <productId>jira</productId>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                                <exclude>it/**/smoke/oauth2/**/*Test.java</exclude>
                                <exclude>it/**/e2e/**/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>apl_smoke_slice_jira_confluence_oauth2</id>
                            <productIds>
                                <productId>jira</productId>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/smoke/oauth2/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <!-- Test group for backwards compatibility between Platform 7 and 6-->
                        <testGroup>
                            <id>jira_p6_confluence_p7_all</id>
                            <productIds>
                                <productId>jira9</productId>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/JenkinsApiCompatibilityTest.java</exclude>
                                <exclude>it/**/dance/*Test.java</exclude>
                                <exclude>it/**/incoming/*Test.java</exclude>
                                <exclude>it/**/outgoing/*Test.java</exclude>
                                <exclude>it/**/oauth2/list/applinks/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket_bamboo_all</id>
                            <productIds>
                                <productId>bitbucket</productId>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket_jira_all</id>
                            <productIds>
                                <productId>bitbucket</productId>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket_confluence_all</id>
                            <productIds>
                                <productId>bitbucket</productId>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>fecru_refapp_all</id>
                            <productIds>
                                <productId>fecru</productId>
                                <productId>refapp1</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>refapp_refapp_smoke</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                                <include>it/**/Test*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <!-- Test group for backwards compatibility testing against Applinks 3.x -->
                        <testGroup>
                            <id>refapp_applinksv3</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp-applinksv3</productId>
                            </productIds>
                            <includes>
                                <include>it/**/refapp_applinksv3/**/*Test.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/**/backwards/compatability/*Test.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>e2e_confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>it/**/e2e/**/*Test.java</includes>
                        </testGroup>
                        <testGroup>
                            <id>e2e_jira</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>it/**/e2e/**/*Test.java</includes>
                        </testGroup>
                        <!-- DCPL-4341: UTIT slice - refapp_refapp/v2 -->
                        <testGroup>
                            <id>apl_rest_slice_refapp_v2</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/refapp_refapp/v2/**/*TestRefApp.java</include>
                                <include>it/**/refapp_refapp/v2/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <!-- DCPL-4341: UTIT slice - refapp_refapp/v4 -->
                        <testGroup>
                            <id>apl_rest_slice_refapp_v4</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/refapp_refapp/v4/**/*TestRefApp.java</include>
                                <include>it/**/refapp_refapp/v4/**/*Test.java</include>
                            </includes>
                        </testGroup>
                        <!-- DCPL-4341: UTIT slice - refapp_refapp root package (excludes v2/v4) -->
                        <testGroup>
                            <id>apl_rest_slice_refapp_root</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/refapp_refapp/*TestRefApp.java</include>
                                <include>it/**/refapp_refapp/*Test.java</include>
                            </includes>
                        </testGroup>
                        <!-- DCPL-4341: REST IT slice - rest, core, auth resource tests -->
                        <testGroup>
                            <id>apl_rest_slice_rest_api</id>
                            <productIds>
                                <productId>refapp1</productId>
                                <productId>refapp2</productId>
                            </productIds>
                            <includes>
                                <include>it/**/rest/**/*Test.java</include>
                                <include>it/**/core/**/*Test.java</include>
                                <include>it/**/auth/**/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
                <executions>
                    <execution>
                        <id>js-enforcement</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- Enable AMPS dev plugins, for those who somehow think they are useful -->
        <profile>
            <id>enable-amps-dev-tools</id>
            <activation>
                <property>
                    <name>amps.dev.tools</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <amps.dev.tools>true</amps.dev.tools>
            </properties>
        </profile>

        <!-- CI run configurations that control different test suites to run -->
        <!-- REST tests against refapp-refapp -->
        <profile>
            <id>it.rest.refapp</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
                <testGroups>refapp_refapp_all</testGroups>
            </properties>
        </profile>

        <!-- DCPL-4341: UTIT slice profile - refapp_refapp/v2 -->
        <profile>
            <id>it.rest.refapp.refapp-v2</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
                <testGroups>apl_rest_slice_refapp_v2</testGroups>
            </properties>
        </profile>

        <!-- DCPL-4341: UTIT slice profile - refapp_refapp/v4 -->
        <profile>
            <id>it.rest.refapp.refapp-v4</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
                <testGroups>apl_rest_slice_refapp_v4</testGroups>
            </properties>
        </profile>

        <!-- DCPL-4341: UTIT slice profile - refapp_refapp root -->
        <profile>
            <id>it.rest.refapp.refapp-root</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
                <testGroups>apl_rest_slice_refapp_root</testGroups>
            </properties>
        </profile>

        <!-- DCPL-4341: REST IT slice profile - rest, core, auth resources -->
        <profile>
            <id>it.rest.refapp.rest-api</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
                <testGroups>apl_rest_slice_rest_api</testGroups>
            </properties>
        </profile>

        <profile>
            <id>it.category.refapp</id>
            <properties>
                <it.categories>it.com.atlassian.applinks.testing.categories.RefappTest</it.categories>
            </properties>
        </profile>
        <!-- JIRA-Confluence smoke tests -->
        <profile>
            <id>it.smoke.jira-confluence</id>
            <properties>
                <applinks.smoke.instance1>jira</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>jira_confluence_all</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <confluence.version>${confluence.test.version}</confluence.version>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>it.smoke.jira-p6-confluence-p7</id>
            <properties>
                <applinks.smoke.instance1>jira9</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <jira.test.version>9.4.21</jira.test.version>
                <testGroups>jira_p6_confluence_p7_all</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <confluence.version>${confluence.test.version}</confluence.version>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Bitbucket-Bamboo smoke tests -->
        <profile>
            <id>it.smoke.bitbucket-bamboo</id>
            <properties>
                <applinks.smoke.instance1>bitbucket</applinks.smoke.instance1>
                <applinks.smoke.instance2>bamboo</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>bitbucket_bamboo_all</testGroups>
            </properties>
        </profile>
        <profile>
            <id>it.smoke.bitbucket-jira</id>
            <properties>
                <applinks.smoke.instance1>bitbucket</applinks.smoke.instance1>
                <applinks.smoke.instance2>jira</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>bitbucket_jira_all</testGroups>
            </properties>
        </profile>
        <profile>
            <id>it.smoke.bitbucket-confluence</id>
            <properties>
                <applinks.smoke.instance1>bitbucket</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>bitbucket_confluence_all</testGroups>
            </properties>
        </profile>
        <profile>
            <id>it.smoke.confluence-confluence</id>
            <properties>
                <applinks.smoke.instance1>confluence</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence2</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>confluence_confluence_all</testGroups>
            </properties>
        </profile>
        <!-- DCPL-4340: Smoke slices - jira-confluence OAuth1 (excludes OAuth2 tests) -->
        <profile>
            <id>it.smoke.jira-confluence.oauth1</id>
            <properties>
                <applinks.smoke.instance1>jira</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>apl_smoke_slice_jira_confluence_oauth1</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <confluence.version>${confluence.test.version}</confluence.version>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- DCPL-4340: Smoke slices - jira-confluence OAuth2 only -->
        <profile>
            <id>it.smoke.jira-confluence.oauth2</id>
            <properties>
                <applinks.smoke.instance1>jira</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>apl_smoke_slice_jira_confluence_oauth2</testGroups>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <confluence.version>${confluence.test.version}</confluence.version>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- DCPL-4340: Smoke slices - confluence-confluence OAuth1 (excludes OAuth2 tests) -->
        <profile>
            <id>it.smoke.confluence-confluence.oauth1</id>
            <properties>
                <applinks.smoke.instance1>confluence</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence2</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>apl_smoke_slice_confluence_confluence_oauth1</testGroups>
            </properties>
        </profile>
        <!-- DCPL-4340: Smoke slices - confluence-confluence OAuth2 only -->
        <profile>
            <id>it.smoke.confluence-confluence.oauth2</id>
            <properties>
                <applinks.smoke.instance1>confluence</applinks.smoke.instance1>
                <applinks.smoke.instance2>confluence2</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>apl_smoke_slice_confluence_confluence_oauth2</testGroups>
            </properties>
        </profile>
        <profile>
            <id>it.smoke.refapp-refapp</id>
            <properties>
                <applinks.smoke.instance1>refapp1</applinks.smoke.instance1>
                <applinks.smoke.instance2>refapp2</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>refapp_refapp_smoke</testGroups>
            </properties>
        </profile>
        <!-- Fecru-Refapp smoke tests -->
        <profile>
            <id>it.smoke.fecru-refapp</id>
            <properties>
                <applinks.smoke.instance1>fecru</applinks.smoke.instance1>
                <applinks.smoke.instance2>refapp1</applinks.smoke.instance2>
                <it.categories>it.com.atlassian.applinks.testing.categories.SmokeTest</it.categories>
                <testGroups>fecru_refapp_all</testGroups>
            </properties>
        </profile>

        <!-- e2e tests -->
        <profile>
            <id>it.e2e.setup</id>
            <properties>
                <applinks.cloud.api.base.url>http://localhost:3000</applinks.cloud.api.base.url>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.plugin.version}</version>
                        <configuration>
                            <installDirectory>${maven.multiModuleProjectDirectory}/.node</installDirectory>
                            <workingDirectory>${basedir}/src/test/resources/uniconn-srs-simulator</workingDirectory>
                            <nodeVersionFile>${basedir}/../.nvmrc</nodeVersionFile>
                        </configuration>
                        <executions>
                            <execution>
                                <id>install node and corepack</id>
                                <goals>
                                    <goal>install-node-and-corepack</goal>
                                </goals>
                                <phase>generate-resources</phase>
                            </execution>
                            <execution>
                                <id>yarn install</id>
                                <goals>
                                    <goal>corepack</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <arguments>yarn install --immutable</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>start simulator</id>
                                <goals>
                                    <goal>corepack</goal>
                                </goals>
                                <phase>pre-integration-test</phase>
                                <configuration>
                                    <arguments>yarn run start-server</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop simulator</id>
                                <goals>
                                    <goal>corepack</goal>
                                </goals>
                                <phase>post-integration-test</phase>
                                <configuration>
                                    <arguments>yarn run stop-server</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>contract testing validation</id>
                                <goals>
                                    <goal>corepack</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <skip>${skip.unit.tests}</skip>
                                    <arguments>yarn run contract-testing:validate</arguments>
                                </configuration>
                            </execution>
                            <!-- TODO: SWITCH-98 share mocks -->
<!--                            <execution>-->
<!--                              <id>npm contract testing mocks</id>-->
<!--                              <goals>-->
<!--                                <goal>npm</goal>-->
<!--                              </goals>-->
<!--                              <phase>none</phase>-->
<!--                              <configuration>-->
<!--                                <arguments>run contract-testing:share</arguments>-->
<!--                              </configuration>-->
<!--                            </execution>-->
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>it.e2e.confluence</id>
            <properties>
                <applinks.e2e.instance>confluence</applinks.e2e.instance>
                <testGroups>e2e_confluence</testGroups>
            </properties>
        </profile>

        <profile>
            <id>it.e2e.jira</id>
            <properties>
                <applinks.e2e.instance>jira</applinks.e2e.instance>
                <testGroups>e2e_jira</testGroups>
            </properties>
        </profile>

        <!-- Dev environment: enable dynamic resource reloading -->
        <profile>
            <id>dev-app</id>
            <activation>
                <property>
                    <name>dev.app</name>
                </property>
            </activation>
            <properties>
                <amps.resource.directories>${basedir}/src/main/resources,${basedir}/../applinks-plugin/src/main/resources</amps.resource.directories>
                <amps.quick.reload>true</amps.quick.reload>
            </properties>
        </profile>

        <!-- Configures application links to connect to the Atlassian Cloud's staging environment -->
        <profile>
            <id>srs-staging</id>
            <properties>
                <applinks.cloud.api.base.url>https://api.stg.atlassian.com</applinks.cloud.api.base.url>
                <uniconn.jvm.env.args>
                    -Dapplinks.cloud.api.base.url=${applinks.cloud.api.base.url}
                    -Dapplinks.uniconn.lifecycle.interval.seconds=30
                    -Djcma.env=staging
                    -Dmigration.api.base.hostname=api.stg.atlassian.com
                    -Denvironment=stg
                    -Dportfolio.analyzer.service.url=https://api.stg.atlassian.com/portfolio-analyzer
                    -Dmigration.environment=STAGING
                    -Ddcdp.transfer.cloud.url=api.stg.atlassian.com
                    -Datlassian.dcdp.data.collect.scheduler.interval-ms=10000
                    -Datlassian.dcdp.transfer.scheduler.interval-ms=30000
                    -Dsecure.tunnel.service.endpoint=wss://tunnel.stg.services.atlassian.com
                </uniconn.jvm.env.args>
            </properties>
        </profile>

        <!--
            Single product run configurations for manual testing. You can run multiple products from the same
            applinks-tests directory. The caveat is that each one will create a separate target_<profile-id> directory,
            which will only be removed by mvn clean if run with the same profile (e.g. mvn clean -Pjira will remove
            target_jira).

            NOTE: use -Ddev.app=<instanceId> instead of -P<instanceId> to also activate other important dev environment
            profiles (see above).
        -->
        <!-- Alias for refapp1 profile for Hamish :) -->
        <profile>
            <id>refapp</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>refapp</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp1</applinks.build.directory>
                <instanceId>refapp1</instanceId>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=refapp1 to run refapp1 in target_refapp1 -->
        <profile>
            <id>refapp1</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>refapp1</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp1</applinks.build.directory>
                <instanceId>refapp1</instanceId>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=refapp2 to run refapp2 in target_refapp2 -->
        <profile>
            <id>refapp2</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>refapp2</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp2</applinks.build.directory>
                <instanceId>refapp2</instanceId>
            </properties>
        </profile>
        <profile>
            <id>confluence2</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>confluence2</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_confluence2</applinks.build.directory>
                <instanceId>confluence2</instanceId>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=refapp4 to run refapp4 in target_refapp4 -->
        <profile>
            <id>refapp4</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>refapp4</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_refapp4</applinks.build.directory>
                <instanceId>refapp4</instanceId>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=jira-platform6 to run JIRA in target_jira -->
        <profile>
            <id>jira9</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>jira9</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target</applinks.build.directory>
                <product>jira9</product>
                <tomcat.version>tomcat9x</tomcat.version>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=jira to run JIRA in target_jira -->
        <profile>
            <id>jira</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>jira</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_jira</applinks.build.directory>
                <product>jira</product>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=jira2 to run a second JIRA in target_jira2 (http://localhost:2992/jira2) -->
        <profile>
            <id>jira2</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>jira2</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_jira2</applinks.build.directory>
                <!-- Select the jira2 product instance from the <products> catalog above.
                     Ports/context path are defined there (httpPort 2992, contextPath /jira2). -->
                <instanceId>jira2</instanceId>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=confluence to run Confluence in target_confluence -->
        <profile>
            <id>confluence</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>confluence</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_confluence</applinks.build.directory>
                <product>confluence</product>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=bitbucket to run Bitbucket in target_bitbucket -->
        <profile>
            <id>bitbucket</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>bitbucket</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_bitbucket</applinks.build.directory>
                <product>bitbucket</product>
            </properties>
        </profile>
        <!-- mvn amps:run -Ddev.app=fecru to run just FeCru in target_fecru -->
        <profile>
            <id>fecru</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>fecru</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_fecru</applinks.build.directory>
                <product>fecru</product>
            </properties>
        </profile>

        <profile>
            <id>bamboo</id>
            <activation>
                <property>
                    <name>dev.app</name>
                    <value>bamboo</value>
                </property>
            </activation>
            <properties>
                <applinks.build.directory>${basedir}/target_bamboo</applinks.build.directory>
                <product>bamboo</product>
            </properties>
        </profile>
    </profiles>
</project>