<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.plugins.authentication</groupId>
        <artifactId>atlassian-authentication-plugin-parent</artifactId>
        <version>5.3.1</version>
    </parent>

    <artifactId>atlassian-authentication-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>

    <name>Authentication for Atlassian Data Center</name>
    <description>Provides additional security through single sign-on and two-step verification</description>

    <properties>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <confluence.pageobjects.version>12.2.5</confluence.pageobjects.version>
        <jira.pageobjects.version>${jira.version}</jira.pageobjects.version>
        <personal.access.tokens.version>2.0.7</personal.access.tokens.version>
        <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
        <oracle.driver.version>19.3.0.0</oracle.driver.version>
        <postgres.driver.version>42.2.20</postgres.driver.version>
        <mysql.driver.version>8.0.24</mysql.driver.version>

        <!-- skip integration tests by default, enable using profiles -->
        <skipITs>true</skipITs>

        <!-- We only run one product at a time, so force them to have the same baseURL to make it easy to run tests from IDEA -->
        <license.suffix>-dc</license.suffix>
        <product.httpPort>5990</product.httpPort>
        <product.contextPath>/product</product.contextPath>
        <product.useHttps>true</product.useHttps>
        <!--  product.crowd.* properties are used when Crowd is supposed to be used as SSO SP. This is done by
        starting crowd using crowd-sso as productId       -->
        <product.crowd.httpPort>8095</product.crowd.httpPort>
        <product.crowd.contextPath>/crowd</product.crowd.contextPath>
        <product.crowd.useHttps>true</product.crowd.useHttps>
        <!-- Default ajpPort for products is 8009  -->
        <product.crowd.ajpPort>9009</product.crowd.ajpPort>

        <debug.analytics>false</debug.analytics>
        <h2version />

        <jvmOpens>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</jvmOpens>
        <product.jvmOpens>${jvmOpens} --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED</product.jvmOpens>
        <jvm.args.custom /> <!-- Allows to specify custom arguments in build scripts -->
        <!--suppress UnresolvedMavenProperty -->
        <product.jvmArgs>${product.jvmOpens} -Xmx1024m -Datlassian.darkfeature.atlassian.authentication.include.stacktrace.in.error.messages=true -Datlassian.authentication.debug.analytics=${debug.analytics} -Dopenldap-port=${openldap.port} ${jvm.args.custom} -Duser.country=US -Duser.language=en</product.jvmArgs>
        <product.crowd.jvmArgs>${jvmOpens} -Xmx1024m</product.crowd.jvmArgs>
        <yarn.build.profile />
        <yarn.install.command>install --frozen-lockfile</yarn.install.command>
        <jira.shared.home>/tmp/jira_shared</jira.shared.home>
        <confluence.shared.home>${project.build.directory}/${product}/home/shared-home</confluence.shared.home>
        <product>jira-with-apps</product>
        <skip.shared.home.cleanup>false</skip.shared.home.cleanup>
        <webdriver.firefox.profile.preferences>browser.download.folderList=2;browser.download.dir=${project.build.directory}/webdriverDownload;browser.download.manager.showWhenStarting=false;pdfjs.disabled=true;browser.helperApps.neverAsk.saveToDisk=application/pdf,application/zip,text/plain,text/csv</webdriver.firefox.profile.preferences>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>onetime</artifactId>
            <version>2.1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains</groupId>
                    <artifactId>annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>xwork</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>webwork</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>${jakarta-annotation.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.json</groupId>
            <artifactId>atlassian-json-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.7</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.soy</groupId>
            <artifactId>soy-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-webresource</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-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.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-extender</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.scheduler</groupId>
            <artifactId>atlassian-scheduler-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Security service -->
        <dependency>
            <groupId>com.atlassian.secrets</groupId>
            <artifactId>atlassian-secrets-store</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-lts8on</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.atlassian.fugue</groupId>
            <artifactId>fugue</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- OneLogin saml lib -->
        <dependency>
            <groupId>com.onelogin</groupId>
            <artifactId>java-saml</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.santuario</groupId>
            <artifactId>xmlsec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Security related version override -->
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
            <version>4.4.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.analytics</groupId>
            <artifactId>analytics-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>embedded-crowd-api</artifactId>
            <version>${crowd.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-api</artifactId>
            <version>${crowd.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-integration-api</artifactId>
            <version>${crowd.version}</version>
            <scope>provided</scope>
        </dependency>

        <!--OpenID Connect deps-->
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>oauth2-oidc-sdk</artifactId>
            <version>8.36.2</version>
            <exclusions>
                <exclusion>
                    <groupId>com.nimbusds</groupId>
                    <artifactId>lang-tag</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.nimbusds</groupId>
                    <artifactId>nimbus-jose-jwt</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.mail</groupId>
                    <artifactId>javax.mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.minidev</groupId>
                    <artifactId>json-smart</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- oauth2-oidc-sdk uses version ranges for json-smart, lang-tag and
             nimbus-jose-jwt, so we set explicit versions here to "pin" them.
             Otherwise our builds aren't reproducible, since building the same
             code at a later date might pick up a newer dependency version -->
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>lang-tag</artifactId>
            <version>1.4.4</version>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <version>9.37.3</version>
            <exclusions>
                <exclusion>
                    <groupId>net.minidev</groupId>
                    <artifactId>json-smart</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
        </dependency>
        <!-- json-smart has a compile scope dependency on asm, if we're not declaring it explicitly then another dependency,
             which has ASM in provided scope, may cause a newer/older version to be pulled -->
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>9.3</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-builder</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-core</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- test deps -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>pl.pragmatists</groupId>
            <artifactId>JUnitParams</artifactId>
            <version>1.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jamesmurty.utils</groupId>
            <artifactId>java-xmlbuilder</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-lambda</artifactId>
            <version>1.2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.9.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <version>${atlassian.webdriver.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements</artifactId>
            <version>${atlassian.webdriver.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements-aui</artifactId>
            <version>${atlassian.webdriver.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.authentication</groupId>
            <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.authentication</groupId>
            <artifactId>atlassian-authentication-plugin-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.authentication</groupId>
            <artifactId>authentication-plugin-rest</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.authentication</groupId>
            <artifactId>atlassian-authentication-plugin-websudo-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>javax.mail-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.mail</groupId>
                    <artifactId>javax.mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>opensymphony</groupId>
                    <artifactId>webwork</artifactId>
                </exclusion>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.platform</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>com.atlassian.bamboo</groupId>-->
<!--            <artifactId>atlassian-bamboo-rest-model</artifactId>-->
<!--            <version>${bamboo.version}</version>-->
<!--            <scope>provided</scope>-->
<!--            <exclusions>-->
<!--                &lt;!&ndash; security exclusions &ndash;&gt;-->
<!--                <exclusion>-->
<!--                    <groupId>log4j</groupId>-->
<!--                    <artifactId>log4j</artifactId>-->
<!--                </exclusion>-->
<!--            </exclusions>-->
<!--        </dependency>-->
        <dependency>
            <groupId>com.atlassian.audit</groupId>
            <artifactId>atlassian-audit-api</artifactId>
            <scope>provided</scope>
            <version>1.9.5</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-it-hosting-util</artifactId>
            <version>${bitbucket.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jetbrains</groupId>
                    <artifactId>annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-api</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-orm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jetbrains</groupId>
                    <artifactId>annotations</artifactId>
                </exclusion>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo.plugins</groupId>
            <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
            <version>${bamboo.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains</groupId>
                    <artifactId>annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.seraph</groupId>
            <artifactId>atlassian-seraph</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-rest-application-management</artifactId>
            <version>${crowd.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-pageobjects</artifactId>
            <version>${crowd.pageobjects.version}</version>
            <scope>test</scope>
            <exclusions>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.security</groupId>
                    <artifactId>spring-security-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-webmvc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>${jira.pageobjects.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.activeobjects</groupId>
                    <artifactId>activeobjects-plugin</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.platform</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-support</artifactId>
                </exclusion>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.thoughtworks.xstream</groupId>
                    <artifactId>xstream</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jsoup</groupId>
                    <artifactId>jsoup</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.security</groupId>
                    <artifactId>spring-security-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>1.8.0.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-webdriver-pageobjects</artifactId>
            <version>${confluence.pageobjects.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit-dep</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <!-- security exclusions -->
                <exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jsoup</groupId>
                    <artifactId>jsoup</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.ws.rs</groupId>
                    <artifactId>jsr311-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.39.1</version>
            <scope>test</scope>
        </dependency>
        <!-- Old Jira pageobjects are using old Jersey -->
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.19.5-atlassian-17</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-page-objects</artifactId>
            <version>${bitbucket.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-pageobjects</artifactId>
            <version>${bamboo.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>atlassian-pageobjects-elements</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.selenium</groupId>
                    <artifactId>atlassian-pageobjects-elements-aui</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.applinks</groupId>
                    <artifactId>applinks-pageobjects</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.bitbucket.server</groupId>
                    <artifactId>bitbucket-page-objects</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>stax2-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.atlassian.plugins.rest</groupId>
                    <artifactId>atlassian-rest-module</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-server-api</artifactId>
            <version>${crowd.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.crowd</groupId>
            <artifactId>crowd-rest-admin</artifactId>
            <version>${crowd.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-jaxrs2</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.dc.swagger</groupId>
            <artifactId>annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <version>64.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.pats</groupId>
            <artifactId>pats-plugin</artifactId>
            <version>${personal.access.tokens.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.testutils</groupId>
            <artifactId>atlassian-test-annotations</artifactId>
            <version>2.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgres.driver.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.driver.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc8-atlassian-hosted</artifactId>
            <version>${oracle.driver.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.johnson</groupId>
            <artifactId>atlassian-johnson-core</artifactId>
            <scope>provided</scope>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>com.atlassian.jira</groupId>-->
<!--            <artifactId>jira-core</artifactId>-->
<!--        </dependency>-->

        <!-- Some internal classes require it, we have to provide consistent versions -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.20.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.20.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.15.0</version>
                    <configuration>
                        <installDirectory>../.node</installDirectory>
                        <workingDirectory>.</workingDirectory>
                        <npmInheritsProxyConfigFromMaven>true</npmInheritsProxyConfigFromMaven>
                        <serverId>maven-atlassian-com</serverId>
                        <nodeDownloadRoot>https://packages.atlassian.com/artifactory/nodejs-dist/</nodeDownloadRoot>
                        <yarnDownloadRoot>https://packages.atlassian.com/artifactory/yarn-dist/</yarnDownloadRoot>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <extractDependencies>false</extractDependencies>
                    <enableQuickReload>true</enableQuickReload>
                    <enableDevToolbox>false</enableDevToolbox>
                    <compressResources>false</compressResources>
                    <startupTimeout>700000</startupTimeout>
                    <!-- processI18nUsage is required due to https://bulldog.internal.atlassian.com/browse/AAUTH-609 -->
                    <processI18nUsage>false</processI18nUsage>
                    <jvmArgs>${jvmOpens}</jvmArgs>

                    <!-- See here for an explanation of default instructions: -->
                    <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Atlassian-Scan-Folders>META-INF/plugin-descriptors</Atlassian-Scan-Folders>

                        <Export-Package>
                            com.atlassian.plugins.authentication.common.upgrade.*,
                            com.atlassian.plugins.authentication.api.*,
                        </Export-Package>

                        <DynamicImport-Package>
                            com.atlassian.servicedesk.api.portal.login
                        </DynamicImport-Package>
                        <Import-Package>
                            com.opensymphony.xwork.*;resolution:="optional",
                            com.opensymphony.webwork.*;resolution:="optional",
                            com.opensymphony.xwork2*;resolution:="optional",
                            com.atlassian.xwork.*;resolution:="optional",
                            com.atlassian.confluence.dmz.struts;resolution:="optional",
                            org.apache.struts2.dispatcher;resolution:="optional",
                            com.atlassian.application.api.*;resolution:="optional",
                            com.atlassian.bitbucket.*;resolution:="optional",
                            com.atlassian.bamboo.*;resolution:="optional",
                            com.atlassian.extras.api.confluence.*;resolution:="optional",
                            com.atlassian.extras.api.bitbucket.*;resolution:="optional",
                            com.atlassian.jira.application.*;resolution:="optional",
                            com.atlassian.jira.config.*;resolution:="optional",
                            com.atlassian.jira.component;resolution:="optional",
                            com.atlassian.jira.startup.mode;resolution:="optional",
                            com.atlassian.jira.bc.*;resolution:="optional",
                            com.atlassian.jira.exception.*;resolution:="optional",
                            com.atlassian.jira.security.groups.*;resolution:="optional",
                            com.atlassian.jira.security.groups.*;resolution:="optional",
                            com.atlassian.jira.help.*;resolution:="optional",
                            com.atlassian.jira.plugin.profile.*;resolution:="optional",
                            com.atlassian.jira.user.*;resolution:="optional",
                            com.atlassian.jira.util.*;resolution:="optional",
                            com.atlassian.jira.web.*;resolution:="optional",
                            com.atlassian.servicedesk.api.portal.login.*;resolution:="optional",
                            com.atlassian.analytics.api.annotations;resolution:="optional",
                            com.atlassian.crowd.embedded.api.*;resolution:="optional",
                            com.atlassian.crowd.exception.*;resolution:="optional",
                            com.atlassian.crowd.service.authentication.*;resolution:="optional",
                            com.atlassian.confluence.event.events.*;resolution:="optional",
                            com.atlassian.confluence.languages.*;resolution:="optional",
                            com.atlassian.confluence.security.*;resolution:="optional",
                            com.atlassian.confluence.license.*;resolution:="optional",
                            com.atlassian.confluence.plugin.*;resolution:="optional",
                            com.atlassian.confluence.setup.*;resolution:="optional",
                            com.atlassian.confluence.upgrade.*;resolution:="optional",
                            com.atlassian.confluence.user.*;resolution:="optional",
                            com.atlassian.confluence.util.*;resolution:="optional",
                            com.atlassian.confluence.web.*;resolution:="optional",
                            com.atlassian.confluence.admin.criteria.*;resolution:="optional",
                            com.atlassian.user.*;resolution:="optional",
                            com.atlassian.seraph.config.*;resolution:="optional",
                            com.atlassian.seraph.service.rememberme.*;resolution:="optional",
                            com.atlassian.seraph.auth.*;resolution:="optional",
                            com.atlassian.spring.container*;resolution:="optional",
                            org.acegisecurity.context.*;resolution:="optional",
                            com.atlassian.confluence.cluster.*;resolution:="optional",
                            com.atlassian.jira.cluster.*;resolution:="optional",
                            com.atlassian.jira.bc.security.login.*;resolution:="optional",
                            com.atlassian.jira.security.login.*;resolution:="optional",
                            com.atlassian.secrets.*;resolution:="optional",
                            com.atlassian.jira.event.*;resolution:="optional",
                            com.atlassian.dc.swagger.annotations.*;resolution:="optional",
                            com.atlassian.plugins.authentication.api.tsv.websudo.*;resolution:="optional",
                            !com.atlassian.plugins.authentication.*,
                            <!--*;resolution:="optional"-->
                            com.atlassian.audit.api.*,
                            com.atlassian.*,
                            com.google.common.*,
                            io.atlassian.fugue.*,
                            javax.annotation,
                            javax.crypto.*,
                            javax.inject,
                            javax.mail.internet.*,
                            javax.security.*,
                            javax.servlet.*,
                            javax.ws.*,
                            javax.xml,
                            javax.xml.*,
                            javax.net.ssl.*,
                            net.java.ao.*,
                            org.apache.commons.codec.*,
                            org.apache.commons.io.*,
                            org.apache.commons.lang3.*,
                            org.apache.commons.logging.*,
                            org.apache.http.client.*,
                            org.bouncycastle.asn1.*,
                            org.bouncycastle.cert.*,
                            org.bouncycastle.jce.provider.*,
                            org.bouncycastle.openssl.*,
                            org.bouncycastle.operator.*,
                            org.bouncycastle.util.*,
                            org.eclipse.gemini.blueprint.*,
                            org.slf4j.*,
                            org.aopalliance.aop;
                            org.aopalliance.intercept;
                            org.springframework.aop;
                            org.springframework.aop.support,
                            org.springframework.aop.support.annotation;
                            org.springframework.aop.framework;
                            org.springframework.aop.framework.autoproxy;
                            org.springframework.beans.*,
                            org.springframework.cglib.core,
                            org.springframework.cglib.proxy,
                            org.springframework.cglib.reflect,
                            org.springframework.context.annotation,
                            org.springframework.core,
                            org.springframework.core.type,
                            org.springframework.core.io,
                            org.springframework.http,
                            org.springframework.osgi.context.*,
                            org.springframework.stereotype,
                            org.springframework.util,
                            org.springframework.web.util.*,
                            com.fasterxml.jackson*,
                            org.w3c.*,
                            org.osgi.framework.*,
                            org.xml.*,
                            org.springframework.web.util.*,
                            org.springframework.osgi.context.*,
                            org.osgi.util.tracker.*,
                        </Import-Package>

                        <!-- Ensure plugin is spring powered -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>

                    <systemPropertyVariables>
                        <xvfb.enable>${xvfb.enable}</xvfb.enable>
                        <trimStackTrace>false</trimStackTrace>
                        <es.insecure.allow.root>true</es.insecure.allow.root>
                    </systemPropertyVariables>

                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.plugins.authentication</groupId>
                            <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                        </pluginArtifact>
                    </pluginArtifacts>

                    <products>
                        <product>
                            <id>jira</id>
                            <instanceId>jira</instanceId>
                            <version>${jira.version.amps}</version>

                            <!--
                                Updated to a new home directory version from 6.0, with the following changes:
                                * a license with an extra 'com.atlassian.plugins.authentication.impl.web.LicenseFilter' property
                                * a non admin-user created ('user'/'user')
                            -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/jira/jira${license.suffix}-generated-resources-v2.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <server>localhost</server>
                            <sharedHome>${jira.shared.home}</sharedHome>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <log4j2Config>${project.build.testOutputDirectory}/jira-log4j2.xml</log4j2Config>
                        </product>
                        <product>
                            <id>jira</id>
                            <instanceId>jira-with-apps</instanceId>
                            <version>${jira.version.amps}</version>

                            <!--
                                Updated to a new home directory version from 6.0, with the following changes:
                                * a DC license
                                * a non admin-user created ('user'/'user')
                                * clustering enabled
                                * shared home in /tmp/jira_shared
                            -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/jira/jira${license.suffix}-generated-resources-v2.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.version.amps}</version>
                                </application>
                                <application>
                                    <applicationKey>jira-servicedesk</applicationKey>
                                    <!--
                                      JSM version has to match Jira, e.g.:
                                      Jira 8.5.x -> JSM 4.5.x
                                      Jira 8.22.x -> JSM 4.22.x
                                      Jira 9.5.x -> JSM 5.5.x
                                      Jira 9.6.x -> JSM 5.6.x
                                      Jira 9.11.x -> JSM 5.11.x
                                    -->
                                    <version>${jira.servicemanagement.version.amps}</version>
                                </application>
                            </applications>
                            <server>localhost</server>
                            <sharedHome>${jira.shared.home}</sharedHome>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>com.h2database</groupId>
                                    <artifactId>h2</artifactId>
                                    <version>2.0.204</version>
                                </libArtifact>
                            </libArtifacts>
                            <log4j2Config>${project.build.testOutputDirectory}/jira-log4j2.xml</log4j2Config>
                        </product>
                        <product>
                            <id>jira</id>
                            <instanceId>jira-pre-upgrade</instanceId>
                            <version>${jira.version.amps}</version>

                            <!-- based on `jira-dc-generated-resources.zip', with added SSO configuration -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/jira/jira-dc-pre-upgrade-generated-resources-v2.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <server>localhost</server>
                            <sharedHome>${jira.shared.home}</sharedHome>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>confluence</id>
                            <instanceId>confluence</instanceId>
                            <version>${confluence.version.amps}</version>

                            <!--
                                Based on confluence-plugin-test-resources 5.10.1 with the following changes:
                                * a DC license
                                * a non admin-user created ('user'/'user')
                                * global permissions changed to allow anonymous users to access the instance
                                * upgraded to 6.6.11 as the original home dir wasn't compatible with 6.14 (upgrade failed)
                                * clustering enabled
                                * cluster join method set to TCP/IP with one peer at 127.0.0.1
                                * shared home inside local home
                                * database moved to the shared home as 7.12.0 searches for the H2 DB there
                            -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/confluence/conf${license.suffix}-generated-resources.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <!--com.atlassian.migration.agent has to be disabled due to: https://jira.atlassian.com/browse/CONFSERVER-60949-->
                            <jvmArgs>${product.jvmArgs} -Datlassian.darkfeature.pulp.disable=true -Datlassian.plugins.startup.options=disable-addons=com.atlassian.migration.agent -Dpassword.confirmation.disabled=true</jvmArgs>
                            <server>localhost</server>
                            <sharedHome>${confluence.shared.home}</sharedHome>
                            <output>${project.build.directory}/${product}/home/logs/atlassian-confluence-application.log</output>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>confluence</id>
                            <instanceId>confluence-pre-upgrade</instanceId>
                            <version>${confluence.version.amps}</version>

                            <!-- based on `conf-dc-generated-resources.zip', with added SSO configuration -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/confluence/conf-dc-pre-upgrade-generated-resources.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs} -Datlassian.darkfeature.pulp.disable=true</jvmArgs>
                            <server>localhost</server>
                            <sharedHome>${confluence.shared.home}</sharedHome>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>

                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket</instanceId>
                            <version>${bitbucket.version.amps}</version>

                            <!--
                                Based on an new home directory from 4.10, with the following changes:
                                * a license with an extra 'com.atlassian.plugins.authentication.impl.web.LicenseFilter' property
                                * added a public repo that should be readable for anonymous users
                            -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/bitbucket/bitbucket${license.suffix}-generated-resources-v2.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <server>localhost</server>
                            <systemPropertyVariables>
                                <es.insecure.allow.root>true</es.insecure.allow.root>
                                <!-- This is done as a work-around to run Bitbucket on Bamboo agents running 2.39 which
                                is the default value of this property  -->
                                <plugin.bitbucket-git.version.unsupported-from>3.0</plugin.bitbucket-git.version.unsupported-from>
                                <feature.whats.new>false</feature.whats.new>
                                <feature.public.access>true</feature.public.access>
                                <feature.websudo>false</feature.websudo>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bitbucket.server</groupId>
                                    <artifactId>bitbucket-it-test-support-plugin</artifactId>
                                    <version>${bitbucket.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket-pre-upgrade</instanceId>
                            <version>${bitbucket.version.amps}</version>

                            <!-- based on `bitbucket-dc-generated-resources.zip', with added SSO configuration -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/bitbucket/bitbucket-dc-pre-upgrade-generated-resources-v2.zip</productDataPath>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <server>localhost</server>
                            <systemPropertyVariables>
                                <es.insecure.allow.root>true</es.insecure.allow.root>
                                <!-- This is done as a work-around to run Bitbucket on Bamboo agents running 2.39 which
                                is the default value of this property  -->
                                <plugin.bitbucket-git.version.unsupported-from>3.0</plugin.bitbucket-git.version.unsupported-from>
                                <feature.whats.new>false</feature.whats.new>
                                <feature.websudo>false</feature.websudo>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bitbucket.server</groupId>
                                    <artifactId>bitbucket-it-test-support-plugin</artifactId>
                                    <version>${bitbucket.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>

                        <product>
                            <id>bamboo</id>
                            <version>${bamboo.version.amps}</version>

                            <!--
                                Based on an new home directory from 4.10, with the following changes:
                                * a license with an extra 'com.atlassian.plugins.authentication.impl.web.LicenseFilter' property
                                * added a public repo that should be readable for anonymous users
                            -->
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/bamboo/bamboo${license.suffix}-generated-resources.zip</productDataPath>
                            <containerId>tomcat9x</containerId>

                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <server>localhost</server>
                            <systemPropertyVariables>
                                <es.insecure.allow.root>true</es.insecure.allow.root>
                                <atlassian.feature.discovery.dialog.enabled>false</atlassian.feature.discovery.dialog.enabled>
                                <bamboo.websudo.disabled>true</bamboo.websudo.disabled>
                            </systemPropertyVariables>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.bamboo.plugins</groupId>
                                    <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                        <product>
                            <id>crowd</id>
                            <version>${crowd.version}</version>
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/crowd/crowd-generated-resources.zip</productDataPath>
                            <httpPort>${product.httpPort}</httpPort>
                            <useHttps>${product.useHttps}</useHttps>
                            <httpsPort>${product.httpPort}</httpsPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.contextPath}</contextPath>
                            <jvmArgs>${product.jvmArgs}</jvmArgs>
                            <installPlugin>true</installPlugin>
                            <server>localhost</server>
                        </product>
                        <product>
                            <id>crowd</id>
                            <instanceId>crowd-sso</instanceId>
                            <version>${crowd.version}</version>
                            <productDataPath>${project.build.testOutputDirectory}/generated-resources/crowd/crowd-generated-resources.zip</productDataPath>
                            <httpPort>${product.crowd.httpPort}</httpPort>
                            <useHttps>${product.crowd.useHttps}</useHttps>
                            <httpsPort>${product.crowd.httpPort}</httpsPort>
                            <ajpPort>${product.crowd.ajpPort}</ajpPort>
                            <httpsKeystoreFile>${project.build.testOutputDirectory}/test.keystore</httpsKeystoreFile>
                            <httpsKeystorePass>samltest</httpsKeystorePass>
                            <httpsKeyAlias>tomcat</httpsKeyAlias>
                            <httpsSslProtocol>TLS</httpsSslProtocol>
                            <contextPath>${product.crowd.contextPath}</contextPath>
                            <jvmArgs>${product.crowd.jvmArgs}</jvmArgs>
                            <installPlugin>false</installPlugin>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <server>localhost</server>
                        </product>
                        <product>
                            <id>refapp</id>
                            <version>7.0.0-m30</version>

                            <systemPropertyVariables>
                                <aws.region>eu-central-1</aws.region>
                            </systemPropertyVariables>
                            <output>${project.build.directory}/refapp.out</output>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.plugins.authentication</groupId>
                                    <artifactId>atlassian-authentication-test-helper-plugin</artifactId>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.pats</groupId>
                                    <artifactId>pats-plugin</artifactId>
                                    <version>${personal.access.tokens.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                    </products>

                    <testGroups>
                        <testGroup>
                            <id>jira-dc</id>
                            <productIds>
                                <productId>jira-with-apps</productId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                                <include>it/jira/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/jira/nojsm/**/*.java</exclude>
                                <exclude>it/jira/webdriver/nojsm/**/*.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>jira-server</id>
                            <productIds>
                                <productId>jira-with-apps</productId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                                <include>it/jira/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/jira/nojsm/**/*.java</exclude>
                                <exclude>it/jira/webdriver/nojsm/**/*.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>jira-acceptance-tests</id>
                            <productIds>
                                <productId>jira</productId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                                <include>it/jira/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                            </includes>
                            <excludes>
                                <exclude>it/common/webdriver/CrowdSamlConfigurationBrowserTest.java</exclude>
                                <exclude>it/common/webdriver/SamlConfigurationBrowserTest.java</exclude>
                                <exclude>it/jira/JiraJsmAwareDisableNativeLoginAuthTest.java</exclude>
                                <exclude>it/jira/JsmTwoStepVerificationResourceTest.java</exclude>
                                <exclude>it/jira/JsmAuthenticationResourceRestTest.java</exclude>
                                <exclude>it/jira/JsmTwoStepVerificationResourceTest.java</exclude>
                                <exclude>it/jira/SamlSSORequestTestServiceManagement.java</exclude>
                                <exclude>it/jira/webdriver/JsmProfile2svTest</exclude>
                                <exclude>it/jira/webdriver/JsmEnrollmentCustomizationTest</exclude>
                                <exclude>it/jira/webdriver/ServiceManagementLogoutTest.java</exclude>
                            </excludes>
                        </testGroup>
                        <testGroup>
                            <id>jira-e2e-tests</id>
                            <productIds>
                                <productId>jira-with-apps</productId>
                            </productIds>
                            <includes>
                                <include>it/e2e/common/**/*.java</include>
                                <include>it/e2e/jira/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>conf-e2e-tests</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/e2e/common/**/*.java</include>
                                <include>it/e2e/confluence/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bbs-e2e-tests</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                            <includes>
                                <include>it/e2e/common/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bamboo-e2e-tests</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/e2e/common/**/*.java</include>
                                <include>it/e2e/bamboo/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-e2e-tests</id>
                            <productIds>
                                <productId>crowd</productId>
                            </productIds>
                            <includes>
                                <include>it/e2e/common/**/*.java</include>
                                <include>it/e2e/crowd/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence-dc</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                                <include>it/confluence/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence-server</id>
                            <productIds>
                                <productId>confluence</productId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                                <include>it/confluence/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/confluence/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket-dc</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                            <includes>
                                <include>it/bitbucket/**/*.java</include>
                                <include>it/common/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/bitbucket/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket-server</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                            <includes>
                                <include>it/bitbucket/*</include>
                                <include>it/common/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/bitbucket/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bamboo-dc</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/bamboo/**/*.java</include>
                                <include>it/common/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/bamboo/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bamboo-server</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/bamboo/*</include>
                                <include>it/common/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/bamboo/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-dc</id>
                            <productIds>
                                <productId>crowd</productId>
                            </productIds>
                            <includes>
                                <include>it/crowd/**/*.java</include>
                                <include>it/common/**/*.java</include>
                                <include>it/nonrefapp/**/*.java</include>
                                <include>it/e2e/crowd/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>refapp</id>
                            <productIds>
                                <prouctId>refapp</prouctId>
                            </productIds>
                            <includes>
                                <include>it/common/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-jira</id>
                            <productIds>
                                <productId>jira-with-apps</productId>
                                <productId>crowd-sso</productId>
                            </productIds>
                            <includes>
                                <include>it/crossproduct/jira/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-confluence</id>
                            <productIds>
                                <productId>confluence</productId>
                                <productId>crowd-sso</productId>
                            </productIds>
                            <includes>
                                <include>it/crossproduct/confluence/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-bitbucket</id>
                            <productIds>
                                <productId>bitbucket</productId>
                                <productId>crowd-sso</productId>
                            </productIds>
                            <includes>
                                <include>it/crossproduct/bitbucket/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-bamboo</id>
                            <productIds>
                                <productId>bamboo</productId>
                                <productId>crowd-sso</productId>
                            </productIds>
                            <includes>
                                <include>it/crossproduct/bamboo/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>crowd-crowd</id>
                            <productIds>
                                <productId>crowd</productId>
                                <productId>crowd-sso</productId>
                            </productIds>
                            <includes>
                                <include>it/crossproduct/crowd/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>jira-upgrade</id>
                            <productIds>
                                <productId>jira-pre-upgrade</productId>
                            </productIds>
                            <includes>
                                <include>it/upgrade/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>confluence-upgrade</id>
                            <productIds>
                                <productId>confluence-pre-upgrade</productId>
                            </productIds>
                            <includes>
                                <include>it/upgrade/**/*.java</include>
                            </includes>
                        </testGroup>
                        <testGroup>
                            <id>bitbucket-upgrade</id>
                            <productIds>
                                <productId>bitbucket-pre-upgrade</productId>
                            </productIds>
                            <includes>
                                <include>it/upgrade/**/*.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>

                    <includedFeModuleManifests>
                        <!-- Required to know what is development only & useful for other future projects -->
                        <includedFeModuleManifest>${project.basedir}/package.json</includedFeModuleManifest>
                        <!-- Required so all versions of all transitive dependencies are declared -->
                        <includedFeModuleManifest>${project.basedir}/yarn.lock</includedFeModuleManifest>
                    </includedFeModuleManifests>
                    <feManifestAssociations>
                        <feManifestAssociation>
                            <!-- package name of the frontend package -->
                            <packageName>@atlassian/dc.crowd.atlassian-authentication-plugin</packageName>
                            <manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                                <outputDirectoryFiles>
                                    js/printTimestamp.js,
                                    js/lib/js.cookie.js
                                </outputDirectoryFiles>
                            </manuallyVerifiedEveryFileHasItsDependenciesDeclaredInTheManifest>
                        </feManifestAssociation>
                    </feManifestAssociations>
                </configuration>
                <executions>
                    <execution>
                        <id>js-enforcement</id>
                        <goals>
                            <goal>verify-fe-manifest-associations</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <verifyFeManifestAssociationsInputEntrypoint>
                                ${project.build.directory}/${project.build.finalName}.jar
                            </verifyFeManifestAssociationsInputEntrypoint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install-node-and-yarn</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                        </configuration>
                    </execution>

                    <execution>
                        <id>yarn install</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${yarn.install.command}</arguments>
                        </configuration>
                    </execution>

                    <execution>
                        <id>yarn build</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>run build${yarn.build.profile}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>yarn check:type</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>run check:type</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin> <!-- TODO: remove AMPS filters cluster.properties, which is a part of https://ecosystem.atlassian.net/browse/AMPS-1104 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <executions>
                    <execution>
                        <id>clean-shared-homes</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                        <configuration>
                            <skip>${skip.shared.home.cleanup}</skip>
                            <filesets>
                                <fileset>
                                    <directory>${jira.shared.home}</directory>
                                    <includes>
                                        <include>**</include>
                                    </includes>
                                </fileset>
                                <fileset>
                                    <directory>${confluence.shared.home}</directory>
                                    <includes>
                                        <include>**</include>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-maven-plugin</artifactId>
                <version>${swagger.version}</version>
                <configuration>
                    <resourcePackages>
                        <package>com.atlassian.plugins.authentication.tsv.rest</package>
                        <package>com.atlassian.plugins.authentication.basicauth.rest</package>
                        <package>com.atlassian.plugins.authentication.sso.rest</package>
                    </resourcePackages>
                    <readerClass>com.atlassian.plugins.authentication.swagger.processor.AuthenticationPluginProcessor</readerClass>
                    <outputPath>${project.build.directory}/site</outputPath>
                    <outputFileName>swagger</outputFileName>
                    <outputFormat>JSONANDYAML</outputFormat>
                    <prettyPrint>true</prettyPrint>
                    <sortOutput>true</sortOutput>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.atlassian.plugins.authentication</groupId>
                        <artifactId>authentication-plugin-swagger-processor</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>resolve</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>server</id>
            <properties>
                <license.suffix>-server</license.suffix>
                <jira.shared.home />
                <confluence.shared.home />
                <skip.shared.home.cleanup>true</skip.shared.home.cleanup>
            </properties>
        </profile>
        <profile>
            <id>jira</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira${license.suffix}</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>jira-no-context</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira${license.suffix}</testGroups>
                <product.contextPath>/</product.contextPath>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>confluence</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>confluence${license.suffix}</testGroups>
                <debug.analytics>true</debug.analytics>
                <product>confluence</product>
            </properties>
        </profile>
        <profile>
            <id>bitbucket</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>bitbucket${license.suffix}</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>bamboo</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>bamboo${license.suffix}</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>crowd</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>crowd${license.suffix}</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>refapp</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>refapp</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>nossl</id>
            <properties>
                <product.useHttps>false</product.useHttps>
            </properties>
        </profile>
        <profile>
            <id>openldap</id>
            <properties>
                <docker.openldap.skip>false</docker.openldap.skip>
            </properties>
        </profile>
        <profile>
            <id>docker</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>oidc-e2e-tests</id>
            <properties>
                <docker.keycloak.skip>false</docker.keycloak.skip>
                <skipITs>false</skipITs>
                <debug.analytics>true</debug.analytics>
                <!-- Custom trust store with certificate used by KeyCloak -->
                <jvm.args.custom>-Djavax.net.ssl.trustStore=${project.build.testOutputDirectory}/keycloak/cacerts -Djavax.net.ssl.trustStorePassword=changeit</jvm.args.custom>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>start</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-oidc-e2e-tests</id>
            <properties>
                <testGroups>jira-e2e-tests</testGroups>
            </properties>
        </profile>
        <profile>
            <id>conf-oidc-e2e-tests</id>
            <properties>
                <testGroups>conf-e2e-tests</testGroups>
                <product>confluence</product>
            </properties>
        </profile>
        <profile>
            <id>bbs-oidc-e2e-tests</id>
            <properties>
                <testGroups>bbs-e2e-tests</testGroups>
            </properties>
        </profile>
        <profile>
            <id>crowd-oidc-e2e-tests</id>
            <properties>
                <testGroups>crowd-e2e-tests</testGroups>
            </properties>
        </profile>
        <profile>
            <id>bamboo-oidc-e2e-tests</id>
            <properties>
                <testGroups>bamboo-e2e-tests</testGroups>
            </properties>
        </profile>
        <profile>
            <id>jira-acceptance-tests</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>jira-acceptance-tests</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>jira-crowd-saml</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>crowd-jira</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>confluence-crowd-saml</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>crowd-confluence</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>bitbucket-crowd-saml</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>crowd-bitbucket</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>crowd-crowd-saml</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>crowd-crowd</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>bamboo-crowd-saml</id>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <skipITs>false</skipITs>
                <testGroups>crowd-bamboo</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>jira-upgrade</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>jira-upgrade</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>confluence-upgrade</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>confluence-upgrade</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>bitbucket-upgrade</id>
            <properties>
                <skipITs>false</skipITs>
                <testGroups>bitbucket-upgrade</testGroups>
                <debug.analytics>true</debug.analytics>
            </properties>
        </profile>
        <profile>
            <id>frontend-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>yarn test-bamboo</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>run test:bamboo</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>watch-mode</id>
            <properties>
                <yarn.build.profile>:watch-mode</yarn.build.profile>
            </properties>
        </profile>
        <profile>
            <id>ci</id>
            <properties>
                <yarn.install.command>run ci</yarn.install.command>
            </properties>
        </profile>
        <profile>
            <id>ao-tests</id>
            <properties>
                <skipUTs>true</skipUTs>
                <skipITs>false</skipITs>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <configuration>
                            <extractDependencies>false</extractDependencies>
                            <!--Skip integration test execution via amps, as they are executed directly -->
                            <skipITs>true</skipITs>
                            <jvmArgs>${jvmOpens}</jvmArgs>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                                <configuration>
                                    <includes>
                                        <include>**/sso/config/SsoConfigDaoTest.java</include>
                                    </includes>
                                    <argLine>${jvmOpens}</argLine>
                                    <systemPropertyVariables>
                                        <ao.test.database>${ao.test.database}</ao.test.database>
                                        <db.url>${db.url}</db.url>
                                        <db.username>${db.username}</db.username>
                                        <db.password>${db.password}</db.password>
                                        <db.schema>${db.schema}</db.schema>
                                    </systemPropertyVariables>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>postgres</id>
            <properties>
                <docker.db.postgres.skip>false</docker.db.postgres.skip>
                <db.schema>public</db.schema>
                <ao.test.database>postgres</ao.test.database>
                <db.url>jdbc:postgresql://localhost:${db.port}/${db.name}</db.url>
            </properties>
        </profile>
        <profile>
            <id>mysql</id>
            <properties>
                <docker.db.mysql.skip>false</docker.db.mysql.skip>
                <db.schema>${db.name}</db.schema>
                <ao.test.database>mysql</ao.test.database>
                <db.url>jdbc:mysql://localhost:${db.port}/${db.name}</db.url>
            </properties>
        </profile>
        <profile>
            <id>oracle</id>
            <properties>
                <docker.db.oracle.skip>false</docker.db.oracle.skip>
                <ao.test.database>oracle</ao.test.database>
                <db.name>JIRADB</db.name>
                <db.schema>${db.username}</db.schema>
                <db.url>jdbc:oracle:thin:@localhost:${db.port}/${db.name}?oracle.net.disableOob=true</db.url>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                        <version>1.5</version>

                        <configuration>
                            <username>system</username>
                            <password>oracle</password>
                            <url>${db.url}</url>
                            <driver>oracle.jdbc.OracleDriver</driver>
                        </configuration>

                        <dependencies>
                            <dependency>
                                <groupId>com.oracle</groupId>
                                <artifactId>ojdbc8-atlassian-hosted</artifactId>
                                <version>${oracle.driver.version}</version>
                            </dependency>
                        </dependencies>

                        <executions>
                            <execution>
                                <id>default-cli</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>

                                <configuration>
                                    <autocommit>true</autocommit>
                                    <delimiterType>row</delimiterType>
                                    <delimiter>GO</delimiter>
                                    <enableFiltering>true</enableFiltering>
                                    <srcFiles>
                                        <srcFile>src/test/bin/oracle-setup-db.sql</srcFile>
                                    </srcFiles>
                                    <onError>abort</onError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jvm-opens-activation</id>
            <activation>
                <property>
                    <name>env.JVM_OPENS</name>
                </property>
            </activation>
            <properties>
                <jvmOpens>${env.JVM_OPENS}</jvmOpens>
            </properties>
        </profile>
        <profile>
            <id>java17</id>
            <activation>
                <!-- Activate if we're on Java 17+ -->
                <jdk>[17,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <!--
                            Groovy (via rest-assured) requires deep reflection access to some
                            core classes and makes Java17 unhappy, so we need to open it up.
                            -->
                            <argLine>${jvmOpens}</argLine>
                            <systemPropertyVariables>
                                <webdriver.firefox.profile.preferences>${webdriver.firefox.profile.preferences}</webdriver.firefox.profile.preferences>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                                <excludes>
                                    <exclude>%regex[it[/\\].*]</exclude>
                                    <exclude>**/*$*</exclude>
                                </excludes>
                            <argLine>${jvmOpens}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
