<?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.business.insights</groupId>
        <artifactId>atlassian-business-insights</artifactId>
        <version>2.1.6</version>
    </parent>

    <artifactId>integration-tests</artifactId>

    <properties>
        <!-- This property ensures consistency between the key in atlassian-plugin.xml and the OSGi bundle's key. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <testkit.version>8.1.21</testkit.version>

        <!-- In the interim, DC license is pre-installed with an expiry of:
         software: 30/Dec/2020
         service-desk: 12/Dec/2020
         -->
        <jira.license.jsw>${basedir}/src/test/resources/data/generated-test-resources-dc-license-jsw.zip</jira.license.jsw>
        <jira.license.jsm>${basedir}/src/test/resources/data/generated-test-resources-dc-license-jsd.zip</jira.license.jsm>
        <jira.license.jsw-jsm>${basedir}/src/test/resources/data/generated-test-resources-dc-license-jsw-jsd.zip</jira.license.jsw-jsm>
        <!-- Amps SNDC support allows licenses to be installed as part of deploy.
                This is a short-lived license with 120h expiry time and 100 licensed users -->
        <bitbucket.dc.license>
            AAABtQ0ODAoPeNqVkstu2zAQRff8CgLdGaAsK6mTGBDQRGLTFLFk2HKAvhYUPbZYS6TAh1L/fWlLbtMUXR
            QgNzNzZ85c8k1ROTxnGk+ucXg5u5jOJlN8Py9wFEYTlLmmBJ1v1wa0id+GIUqUtIzbjDUQl1C5
            pq00HMw7ZmtmjGAy4KpBxjJTBY+CgzRQHFo41af0iT7mC7pEC6d5xQykzELsJ4UkvPEH/VsxZO
            iPVujDSbaYROGHMw+dM1H/D9CL1ivQHeiHNL6jV5Rcpp8jMs0/XpH7i5vrQegHsgSkBR1b7QCt
            XGm4Fq0VSvaR0WiU5QV5ny/JYpmn66R4yDOyXlGfiBMNnniDywO2FeABA1PJ1QY0brX6DtziL5
            W17dfZeLxTwR/447pXEOgV3wKcKiyVxRthrBals+A7C4OtwtwZqxr/XgHypnhmyST/27h+MW+d
            6ODXCsmS3hY0JXefjth8r3ilOrMXZ/u9SWu5l+pZohXNYn/J8VPkesekMOxkx+2ZHJ3W9qHXrz
            xs8+QZj4IIpfDbzQKMxUMF3irvTu12QuINdFCr1msQ7Vjt+mFbVhtAPwGEsPITMCwCFHgRkQAn
            C3S2RLn9nEfUK6nzjS+sAhRVEz/r08UwhQ5ibG8NpdLgxhwt1Q==X02l1
        </bitbucket.dc.license>
        <bitbucket.jvmArgs>-Dplugin.data.pipeline.bitbucket.export.build.statuses=true</bitbucket.jvmArgs>

        <jvmHeap>-Xmx2000m -Xms512m -XX:ReservedCodeCacheSize=256m -XX:MaxMetaspaceSize=512m</jvmHeap>

        <!-- For Cypress -->
        <frontend.working.directory>${project.basedir}</frontend.working.directory>
    </properties>

    <dependencies>
        <!-- Atlassian dependencies, sorted by scope and alphabetically -->
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>confluence-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>jira-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>core-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>bitbucket-plugin</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>atlassian-business-insights-core-test</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>it-backdoor</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
            <version>${osgi.javaconfig.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira.plugins</groupId>
            <artifactId>jira-greenhopper-api</artifactId>
            <version>${jira.software.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-api</artifactId>
            <version>${jira.servicedesk.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk</artifactId>
            <version>${jira.servicedesk.internal.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${jira.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Other production dependencies, sorted by scope and alphabetically -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <version>${felix.framework.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${h2db.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.8</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-test-utils</artifactId>
            <version>${confluence-test-utils.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>json-path</artifactId>
            <version>${rest-assured.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.business.insights</groupId>
            <artifactId>test-utils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>confluence</id>
            <properties>
                <product>confluence</product>
                <integrationTests>
                    it/**/confluence/**/*IT.java,
                    it/**/core/frontend/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    <!-- Forces file encoding, particularly for Windows -->
                    -Dfile.encoding=${project.build.sourceEncoding}
                    -Dsun.jnu.encoding=${project.build.sourceEncoding}
                    -XX:+UseG1GC -Datlassian.darkfeature.confluence.onboarding.bypass=true
                    -Datlassian.darkfeature.confluence.pulp=true
                    -Dtroubleshooting.dev.mode=true
                    ${jvmHeap}
                </jvmArgs>
                <productVersion>${confluence.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>confluence-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <startupTimeout>900000</startupTimeout>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                    <output>${project.build.directory}/confluence/home/logs/application.log</output>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <server>localhost</server>
                            <productVersion>${confluence.version}</productVersion>
                            <productDataVersion>${confluence.version}</productDataVersion>
                            <enableQuickReload>true</enableQuickReload>
                            <extractDependencies>false</extractDependencies>
                            <allowGoogleTracking>false</allowGoogleTracking>
                            <systemPropertyVariables>
                                <synchrony.btf.disabled>false</synchrony.btf.disabled>
                            </systemPropertyVariables>
                            <jvmArgs>
                                <!-- Forces file encoding, particularly for Windows -->
                                -Dfile.encoding=${project.build.sourceEncoding}
                                -Dsun.jnu.encoding=${project.build.sourceEncoding}
                                -XX:+UseG1GC -Datlassian.darkfeature.confluence.onboarding.bypass=true
                                -Datlassian.darkfeature.confluence.pulp=true
                                -Dtroubleshooting.dev.mode=true ${jvmHeap}
                                -Dbaseurl=http://localhost:1990/confluence
                                -Dconfluence.home=${project.parent.basedir}/confluence-plugin/target/confluence/home
                            </jvmArgs>
                            <instructions>
                                <!-- Plugin Configuration-->
                                <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>

                                <!-- Add package import here -->
                                <Import-Package>
                                    org.springframework.osgi.*;resolution:="optional",
                                    org.eclipse.gemini.blueprint.*;resolution:="optional",
                                    *
                                </Import-Package>
                                <Export-Package>
                                    com.atlassian.business.insights.api.*,
                                </Export-Package>
                                <!-- Ensure plugin is spring powered -->
                                <Spring-Context>*</Spring-Context>
                            </instructions>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>confluence-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>analytics</artifactId>
                                    <version>${confluence.afc.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.confluence.plugins</groupId>
                                    <artifactId>confluence-functest-rest-plugin</artifactId>
                                    <version>${confluence.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>confluence-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira</id>
            <properties>
                <product>jira</product>
                <integrationTests>
                    it/**/jira/**/*IT.java,
                    it/**/core/frontend/**/*IT.java,
                    !it/**/jira/**/exportable/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    -XX:+UseG1GC -Datlassian.darkfeature.jira.onboarding.feature.disabled=true
                    -Datlassian.darkfeature.data.pipeline.feature.jira.schema.version.2.enabled=true
                    -Datlassian.mail.senddisabled=false -Djira.startup.warnings.disable=true
                    -Dtroubleshooting.dev.mode=true ${jvmHeap} ${jacoco.agent.it.argLine}
                </jvmArgs>
                <productVersion>${jira.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.version}</version>
                                </application>
                                <application>
                                    <applicationKey>jira-servicedesk</applicationKey>
                                    <version>${jira.servicedesk.version}</version>
                                </application>
                            </applications>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.servicedesk</groupId>
                                    <artifactId>servicedesk-testutils-plugin</artifactId>
                                    <version>${jira.servicedesk.internal.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-jsw</id>
            <properties>
                <product>jira</product>
                <integrationTests>
                    it/**/jira/**/core/**/*IT.java,
                    it/**/jira/**/jsw/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    -XX:+UseG1GC -Datlassian.darkfeature.jira.onboarding.feature.disabled=true
                    -Datlassian.darkfeature.data.pipeline.feature.jira.schema.version.2.enabled=true
                    -Datlassian.mail.senddisabled=false -Djira.startup.warnings.disable=true
                    -Dtroubleshooting.dev.mode=true ${jvmHeap} ${jacoco.agent.it.argLine}
                </jvmArgs>
                <productVersion>${jira.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.version}</version>
                                </application>
                            </applications>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.servicedesk</groupId>
                                    <artifactId>servicedesk-testutils-plugin</artifactId>
                                    <version>${jira.servicedesk.internal.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-jsm</id>
            <properties>
                <product>jira</product>
                <integrationTests>
                    it/**/jira/**/core/**/*IT.java,
                    it/**/jira/**/jsm/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    -XX:+UseG1GC -Datlassian.darkfeature.jira.onboarding.feature.disabled=true
                    -Datlassian.darkfeature.data.pipeline.feature.jira.schema.version.2.enabled=true
                    -Datlassian.mail.senddisabled=false -Djira.startup.warnings.disable=true
                    -Dtroubleshooting.dev.mode=true ${jvmHeap} ${jacoco.agent.it.argLine}
                </jvmArgs>
                <productVersion>${jira.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <applications>
                                <application>
                                    <applicationKey>jira-servicedesk</applicationKey>
                                    <version>${jira.servicedesk.version}</version>
                                </application>
                            </applications>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.servicedesk</groupId>
                                    <artifactId>servicedesk-testutils-plugin</artifactId>
                                    <version>${jira.servicedesk.internal.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-exportable</id>
            <properties>
                <product>jira</product>
                <integrationTests>
                    it/**/jira/**/exportable/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    -XX:+UseG1GC -Datlassian.darkfeature.jira.onboarding.feature.disabled=true
                    -Datlassian.darkfeature.data.pipeline.feature.jira.schema.version.2.enabled=true
                    -Datlassian.mail.senddisabled=false -Djira.startup.warnings.disable=true
                    -Dtroubleshooting.dev.mode=true ${jvmHeap} ${jacoco.agent.it.argLine}
                </jvmArgs>
                <productVersion>${jira.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.servicedesk</groupId>
                                    <artifactId>servicedesk-testutils-plugin</artifactId>
                                    <version>${jira.servicedesk.internal.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-core</id>
            <properties>
                <product>jira</product>
                <integrationTests>
                    it/**/jira/**/core/**/*IT.java
                </integrationTests>
                <jvmArgs>
                    -XX:+UseG1GC -Datlassian.darkfeature.jira.onboarding.feature.disabled=true
                    -Datlassian.darkfeature.data.pipeline.feature.jira.schema.version.2.enabled=true
                    -Datlassian.mail.senddisabled=false -Djira.startup.warnings.disable=true
                    -Dtroubleshooting.dev.mode=true ${jvmHeap} ${jacoco.agent.it.argLine}
                </jvmArgs>
                <productVersion>${jira.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>jira-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira.tests</groupId>
                                    <artifactId>jira-testkit-plugin</artifactId>
                                    <version>${testkit.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs</groupId>
                                    <artifactId>rest-api-browser</artifactId>
                                    <version>${rest.api.browser.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.servicedesk</groupId>
                                    <artifactId>servicedesk-testutils-plugin</artifactId>
                                    <version>${jira.servicedesk.internal.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.jira</groupId>
                                    <artifactId>jira-func-test-plugin</artifactId>
                                    <version>${jira.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>refapp</id>
            <properties>
                <product>refapp</product>
                <integrationTests>
                    it/**/refapp/**/*IT.java,
                </integrationTests>
                <jvmArgs>
                    ${jvmHeap}
                </jvmArgs>
                <productVersion>${refapp.version}</productVersion>
                <productSetup>**/setup/Refapp*.java</productSetup>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>atlassian-business-insights-core-test</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bitbucket</id>
            <properties>
                <product>bitbucket</product>
                <integrationTests>
                    it/**/bitbucket/**/*IT.java,
                    it/**/core/frontend/**/*IT.java
                </integrationTests>
                <jvmArgs>${jvmHeap} ${bitbucket.jvmArgs}</jvmArgs>
                <productVersion>${bitbucket.version}</productVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>amps-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>run-amps</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>debug</goal>
                                </goals>
                                <configuration>
                                    <wait>false</wait>
                                    <jvmArgs>${jvmArgs}</jvmArgs>
                                    <product>${product}</product>
                                    <productLicense>${bitbucket.dc.license}</productLicense>
                                    <productVersion>${productVersion}</productVersion>
                                    <!-- To skip prompts to use other amps version-->
                                    <skipAllPrompts>true</skipAllPrompts>
                                    <skipAmpsPomCheck>true</skipAmpsPomCheck>
                                </configuration>
                            </execution>
                            <execution>
                                <id>stop-amps</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>bitbucket-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>com.atlassian.platform</groupId>
                                    <artifactId>license-backdoor-plugin</artifactId>
                                    <version>1.0.1</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                            <bundledArtifacts>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>bitbucket-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>core-plugin</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                                <bundledArtifact>
                                    <groupId>com.atlassian.business.insights</groupId>
                                    <artifactId>it-backdoor</artifactId>
                                    <version>${project.version}</version>
                                </bundledArtifact>
                            </bundledArtifacts>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>it</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.22.0</version>
                        <configuration>
                            <forkedProcessExitTimeoutInSeconds>500</forkedProcessExitTimeoutInSeconds>
                            <reuseForks>true</reuseForks>
                        </configuration>
                        <executions>
                            <execution>
                                <id>run-integration-tests</id>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <phase>integration-test</phase>
                                <configuration>
                                    <skipITs>false</skipITs>
                                    <includes>
                                        <include>${integrationTests}</include>
                                    </includes>
                                    <systemProperties>
                                        <product>${product}</product>
                                        <xvfb.enable>true</xvfb.enable>
                                        <xvfb.options>-listen,tcp,-once</xvfb.options>
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>install node and yarn</id>
                                <goals>
                                    <goal>install-node-and-yarn</goal>
                                </goals>
                                <phase>process-resources</phase>
                            </execution>
                            <execution>
                                <id>install-node-dependencies</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>${frontend.cmd.install} --frozen-lockfile</arguments>
                                </configuration>
                                <phase>process-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jira-fe</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>install node and yarn</id>
                                <goals>
                                    <goal>install-node-and-yarn</goal>
                                </goals>
                                <phase>process-resources</phase>
                            </execution>
                            <execution>
                                <id>install-node-dependencies</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>install --frozen-lockfile</arguments>
                                </configuration>
                                <phase>process-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>run-frontend-integration-tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>ci:cy:jira</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>confluence-fe</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>install node and yarn</id>
                                <goals>
                                    <goal>install-node-and-yarn</goal>
                                </goals>
                                <phase>process-resources</phase>
                            </execution>
                            <execution>
                                <id>install-node-dependencies</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>install --frozen-lockfile</arguments>
                                </configuration>
                                <phase>process-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>run-frontend-integration-tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>ci:cy:confluence</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bitbucket-fe</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>install node and yarn</id>
                                <goals>
                                    <goal>install-node-and-yarn</goal>
                                </goals>
                                <phase>process-resources</phase>
                            </execution>
                            <execution>
                                <id>install-node-dependencies</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>install --frozen-lockfile</arguments>
                                </configuration>
                                <phase>process-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <nodeVersion>${node.version}</nodeVersion>
                            <yarnVersion>${yarn.version}</yarnVersion>
                            <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                            <workingDirectory>${frontend.working.directory}</workingDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>run-frontend-integration-tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>ci:cy:bitbucket</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
