<?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.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>5.0.21</version>
    </parent>

    <groupId>com.atlassian.troubleshooting</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>1.25.0</version>
    <modules>
        <module>api</module>
        <module>common</module>
        <module>common-healthchecks</module>
        <module>plugin-jira</module>
        <module>plugin-confluence</module>
        <module>plugin-bamboo</module>
        <module>plugin-crowd</module>
        <module>plugin-bitbucket</module>
        <module>plugin-fecru</module>
        <module>external-resource-repository-updaters</module>
    </modules>
    <properties>
        <confluence.test.version>7.0.1-m110</confluence.test.version>
        <!-- Writing new code using 7.12.3 is dangerous, as there have been API changes and changes to core JIRA classes
            used by ATST since 7.4.3 - we build with both versions in our CI testing, but it is useful to be able to
            check before committing -->
        <!--
        After changing jira.test.version remember to synchronize <id>jira-testkit-for-8.3</id> profile activation in plugin-jira maven module.
        Proper testkit.version is needed for jira func-test-plugin.
        -->
        <jira.test.version>8.3.0</jira.test.version>
        <bamboo.test.version>6.6.2</bamboo.test.version>
        <bitbucket.test.version>5.16.0</bitbucket.test.version>
        <fecru.test.version>4.5.0-20170908094439</fecru.test.version>
        <crowd.test.version>3.7.0</crowd.test.version>

        <!-- Allows us to compile integration tests on diff versions to what we run against -->
        <confluence.compile.version>${confluence.test.version}</confluence.compile.version>
        <jira.compile.version>${jira.test.version}</jira.compile.version>
        <bamboo.compile.version>${bamboo.test.version}</bamboo.compile.version>
        <bitbucket.compile.version>${bitbucket.test.version}</bitbucket.compile.version>
        <fecru.compile.version>${fecru.test.version}</fecru.compile.version>
        <crowd.compile.version>${crowd.test.version}</crowd.compile.version>

        <maven-javadoc-plugin.version>3.1.0</maven-javadoc-plugin.version>
        <maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
        <surefire.version>2.22.0</surefire.version>

        <spring-scanner.version>1.2.13</spring-scanner.version>
        <spring-scanner.scope>compile</spring-scanner.scope>
        <spring-scanner-runtime.scope>runtime</spring-scanner-runtime.scope>
        <jdk.version>1.8</jdk.version>

        <apache.httpclient.version>4.5.5</apache.httpclient.version>
        <com.fugue.version>2.7.0</com.fugue.version>
        <!-- Compile against the version used by the oldest supported version of each product -->
        <io.fugue.version>4.5.0</io.fugue.version>
        <activeobjects.version>3.0.0-22a6ef4</activeobjects.version>
        <atlassian.healthcheck.version>3.0.1</atlassian.healthcheck.version>
        <atlassian.xwork.version>1.11</atlassian.xwork.version>
        <atlassian.mail.version>2.5.19</atlassian.mail.version>
        <atlassian.scheduler.version>1.0</atlassian.scheduler.version>
        <atlassian.pageobjects.version>2.5.0</atlassian.pageobjects.version>
        <atlassian.webdriver.version>2.5.0</atlassian.webdriver.version>
        <atlassian.core.version>4.6.17</atlassian.core.version>
        <atlassian.cache.version>2.0</atlassian.cache.version>
        <atlassian.plugins.version>4.4.9</atlassian.plugins.version>
        <atlassian.aui.pageobjects.version>0.0.1</atlassian.aui.pageobjects.version>
        <beehive.version>1.3.0</beehive.version>
        <marketplace.client.version>2.0.15</marketplace.client.version>
        <sal.api.version>4.0.0-ccaebc10</sal.api.version>
        <!-- we have changed the name of this property so that it does not get overridden by bundled plugin builds (which
        wouldn't work because the plugin artifactId has changed. Once all the apps are using AMPS 8.x we can change bthis back -->
        <amps8.version>8.0.4</amps8.version>
        <!-- Tell amps to use maven plugin versions defined in pluginManagement -->
        <version.override.set>maven-surefire-plugin,maven-failsafe-plugin</version.override.set>

        <slf4j.version>1.7.25</slf4j.version>
        <spring.version>4.3.3.RELEASE</spring.version>
        <analytics.version>5.6.1</analytics.version>
        <applinks.version>5.3.2</applinks.version>
        <aspectj.version>1.7.4</aspectj.version>
        <allure.version>1.5.0</allure.version>
        <gson.version>2.3.1</gson.version> <!-- later versions break the MPAC client used by common-healthchecks -->
        <mockito.version>2.28.2</mockito.version>
        <testcontainers.version>1.4.1</testcontainers.version>
        <commons.io.version>2.4</commons.io.version>
        <org.codehaus.jackson.version>1.9.13-atlassian-2</org.codehaus.jackson.version>
        <aws.sdk.version>2.10.35</aws.sdk.version>
        <includeITsPattern>com/atlassian/troubleshooting/stp/it/util/IntegrationTestsBatches.java</includeITsPattern>

        <!-- SonarQube properties (these are inherited for each module) -->
        <sonar.projectName>Atlassian Troubleshooting and Support Tools</sonar.projectName>
        <sonar.projectKey>${project.groupId}:${project.artifactId}</sonar.projectKey>
        <!-- checkstyle report path (optional) only if you want to do checkstyle in sonar -->
        <sonar.java.checkstyle.reportPaths>target/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
        <!-- sonar maven plugin version -->
        <sonar.version>3.7.0.1746</sonar.version>

        <troubleshooting.pluginKey>${project.groupId}.${project.artifactId}</troubleshooting.pluginKey>
        <troubleshooting.name>Atlassian Troubleshooting and Support Tools</troubleshooting.name>
        <common.module>false</common.module>
        <mockserver.version>5.1.1</mockserver.version>
        <amps.jvm.args />
        <skipUTs>false</skipUTs>
        <skipITs>false</skipITs>

        <!-- Node -->
        <nodeVersion>v8.11.1</nodeVersion>
        <npmVersion>5.8.0</npmVersion>

        <!-- flaky test report version-->
        <flaky.test.reporter.version>3.2.0</flaky.test.reporter.version>
        <plugin.listener.allure>ru.yandex.qatools.allure.junit.AllureRunListener</plugin.listener.allure>
        <plugin.listener.value>com.atlassian.troubleshooting.stp.it.util.ItListener</plugin.listener.value>

        <!-- Thanks to bugs like https://bugs.openjdk.java.net/browse/JDK-8130754 we need to disable Java 8 doclint -->
        <doclint>none</doclint>

        <!-- jacoco version -->
        <jacoco.version>0.8.4</jacoco.version>
        <jacoco.it.exec>jacoco-it.exec</jacoco.it.exec>
        <jacoco.it.argLine />
        <!-- only needed for plugins, changed through a profile -->
        <common-healthcheck.outputDirectory>${project.build.directory}/tmp</common-healthcheck.outputDirectory>
    </properties>
    <organization>
        <name>Atlassian</name>
        <url>https://atlassian.com</url>
    </organization>
    <name>Atlassian Troubleshooting and Support Tools</name>
    <description>This is the Troubleshooting and Support Tools plugin, developed to help Atlassian customers with our
        products.
    </description>
    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/dcst/project-ironfist.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/dcst/project-ironfist.git</developerConnection>
        <url>https://stash.atlassian.com/projects/DCST/repos/project-ironfist</url>
        <tag>v1.25.0</tag>
    </scm>
    <issueManagement>
        <system>jira</system>
        <url>https://bulldog.internal.atlassian.com/projects/XPLN</url>
    </issueManagement>
    <ciManagement>
        <system>bamboo</system>
        <url>https://server-syd-bamboo.internal.atlassian.com/browse/ATST</url>
    </ciManagement>

    <!-- This is where all our product-agnostic test dependencies go. If you want something to apply to all products -->
    <!-- put it here. Set the version inside the dependencyManagement section also.  -->
    <dependencies>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>ru.yandex.qatools.ashot</groupId>
            <artifactId>ashot</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>

        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-junit-adaptor</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-pageobjects-elements</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>test-batching</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-test</artifactId>
            <version>${activeobjects.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.selenium</groupId>
            <artifactId>atlassian-webdriver-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <artifactId>selenium-firefox-driver</artifactId>
            <groupId>org.seleniumhq.selenium</groupId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mysql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-ext</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>jdbc</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-ext</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.xeustechnologies</groupId>
            <artifactId>jcl-core</artifactId>
            <version>2.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>flaky-test-reporter</artifactId>
            <version>${flaky.test.reporter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <version>${project.version}</version>
                <artifactId>api</artifactId>
            </dependency>

            <dependency>
                <groupId>${project.groupId}</groupId>
                <version>${project.version}</version>
                <artifactId>common</artifactId>
            </dependency>

            <dependency>
                <groupId>${project.groupId}</groupId>
                <version>${project.version}</version>
                <artifactId>common-healthchecks</artifactId>
            </dependency>

            <dependency>
                <!-- Only for managing transitive dependencies; code to io.fugue instead -->
                <groupId>com.atlassian.fugue</groupId>
                <artifactId>fugue</artifactId>
                <version>${com.fugue.version}</version>
            </dependency>
            <dependency>
                <groupId>io.atlassian.fugue</groupId>
                <artifactId>fugue</artifactId>
                <version>${io.fugue.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${apache.httpclient.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.marketplace</groupId>
                <artifactId>marketplace-client-java</artifactId>
                <version>${marketplace.client.version}</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.marketplace</groupId>
                <artifactId>marketplace-client-java</artifactId>
                <classifier>dependencies</classifier>
                <version>${marketplace.client.version}</version>
            </dependency>

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

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

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

            <dependency>
                <groupId>com.atlassian.application</groupId>
                <artifactId>atlassian-application-api</artifactId>
                <version>1.2</version>
            </dependency>

            <dependency>
                <!-- Only here to manage transitive deps; code against commons-lang3 instead -->
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.6</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <!-- Minimum version provided by oldest supported product versions -->
                <version>3.3.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.10</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-api</artifactId>
                <version>1.0.5</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>${spring.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-runtime</artifactId>
                <version>${spring-scanner.version}</version>
                <scope>${spring-scanner-runtime.scope}</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-annotation</artifactId>
                <version>${spring-scanner.version}</version>
                <scope>${spring-scanner.scope}</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-core</artifactId>
                <version>${atlassian.plugins.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>google-collections</artifactId>
                        <groupId>com.google.collections</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource-common</artifactId>
                <version>${atlassian.plugins.version}</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins.rest</groupId>
                <artifactId>atlassian-rest-common</artifactId>
                <version>3.4.6</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.atlassian.sal</groupId>
                        <artifactId>sal-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.atlassian.sal</groupId>
                        <artifactId>sal-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- This version is supported by the majority of our products -->
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-core-asl</artifactId>
                <version>${org.codehaus.jackson.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${org.codehaus.jackson.version}</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>com.atlassian.annotations</groupId>
                <artifactId>atlassian-annotations</artifactId>
                <version>0.16</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-api</artifactId>
                <version>${atlassian.plugins.version}</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.beehive</groupId>
                <artifactId>beehive-api</artifactId>
                <version>${beehive.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.beehive</groupId>
                <artifactId>beehive-core</artifactId>
                <version>${beehive.version}</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-main</artifactId>
                <version>${atlassian.plugins.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>google-collections</artifactId>
                        <groupId>com.google.collections</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi</artifactId>
                <version>${atlassian.plugins.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-servlet</artifactId>
                <version>${atlassian.plugins.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.sal</groupId>
                <artifactId>sal-api</artifactId>
                <version>${sal.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.scheduler</groupId>
                <artifactId>atlassian-scheduler-api</artifactId>
                <version>${atlassian.scheduler.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.mail</groupId>
                <artifactId>atlassian-mail</artifactId>
                <version>${atlassian.mail.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>commons-beanutils</artifactId>
                        <groupId>commons-beanutils</groupId>
                    </exclusion>
                    <exclusion>
                        <groupId>xml-apis</groupId>
                        <artifactId>xml-apis</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.atlassian.support</groupId>
                <artifactId>sisyphus-scanner-tools</artifactId>
                <version>7.0.1</version>
                <optional>true</optional>
                <exclusions>
                    <exclusion>
                        <groupId>commons-lang</groupId>
                        <artifactId>commons-lang</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Needed for sisyphus. Compile scoped because not all products have xpp3 so we can't bring it in via OSGi -->
            <!-- NOTE :- xpp3 brings in an incomplete javax.xml.stream package. As the scope is compiled, OSGI does not look for other valid implementations in the classloader. To resolve this, we explicitly add an Import-Package statement for javax.xml.namespace that will be imported from the system bundle. -->
            <dependency>
                <groupId>xpp3</groupId>
                <artifactId>xpp3</artifactId>
                <version>1.1.4c</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.crowd</groupId>
                <artifactId>embedded-crowd-api</artifactId>
                <version>${crowd.compile.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.crowd</groupId>
                <artifactId>embedded-crowd-core</artifactId>
                <version>${crowd.compile.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.atlassian.velocity</groupId>
                <artifactId>atlassian-velocity</artifactId>
                <version>1.3</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.velocity.htmlsafe</groupId>
                <artifactId>velocity-htmlsafe</artifactId>
                <version>1.2.3</version>
                <scope>provided</scope>
            </dependency>

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

            <dependency>
                <version>${analytics.version}</version>
                <groupId>com.atlassian.analytics</groupId>
                <artifactId>analytics-client-lib</artifactId>
                <scope>provided</scope>
            </dependency>

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

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.8.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.xwork</groupId>
                <artifactId>atlassian-xwork-10</artifactId>
                <version>${atlassian.xwork.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>commons-validator</groupId>
                <artifactId>commons-validator</artifactId>
                <version>1.3.1</version>
                <optional>true</optional>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-beanutils</artifactId>
                        <groupId>commons-beanutils</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.atlassian.extras</groupId>
                <version>3.3.0</version>
                <artifactId>atlassian-extras-api</artifactId>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <version>3.5.36</version>
                <artifactId>atlassian-plugins-webresource</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <version>3.0.7</version>
                <artifactId>atlassian-plugins-webfragment</artifactId>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-api</artifactId>
                <version>4.1.3</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.sun.mail</groupId>
                <artifactId>javax.mail</artifactId>
                <version>1.6.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <version>26.0-jre</version>
                <artifactId>guava</artifactId>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.framework</artifactId>
                <version>3.0.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.core</groupId>
                <artifactId>atlassian-core</artifactId>
                <version>${atlassian.core.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.icegreen</groupId>
                <artifactId>greenmail</artifactId>
                <version>1.5.2</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.mail</groupId>
                        <artifactId>javax.mail</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.2</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>javax.activation</groupId>
                <artifactId>activation</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
            </dependency>

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

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>ru.yandex.qatools.ashot</groupId>
                <artifactId>ashot</artifactId>
                <version>1.5.4</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.seleniumhq.selenium</groupId>
                        <artifactId>selenium-remote-driver</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>


            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>2.1</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>common</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>common-healthchecks</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <artifactId>selenium-firefox-driver</artifactId>
                <groupId>org.seleniumhq.selenium</groupId>
                <version>2.51.0</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-junit-adaptor</artifactId>
                <version>${allure.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-pageobjects-elements</artifactId>
                <version>${atlassian.pageobjects.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>google-collections</artifactId>
                        <groupId>com.google.collections</groupId>
                    </exclusion>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit-dep</artifactId>
                    </exclusion>
                </exclusions>
            </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>com.atlassian.bundles</groupId>
                        <artifactId>jsr305</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-lang</groupId>
                        <artifactId>commons-lang</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.atlassian.browsers</groupId>
                        <artifactId>chrome</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.atlassian.browsers</groupId>
                        <artifactId>chrome-profile</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.aui</groupId>
                <artifactId>aui-pageobjects</artifactId>
                <version>${atlassian.aui.pageobjects.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20080701</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian</groupId>
                <artifactId>test-batching</artifactId>
                <version>4.0.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.jayway.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>1.7.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian</groupId>
                <artifactId>flaky-test-reporter</artifactId>
                <version>${flaky.test.reporter.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.xml.bind</groupId>
                        <artifactId>jaxb-impl</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>${sonar.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <goals>deploy -DskipTests=true</goals>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.5</version>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M1</version>
                <executions>
                    <execution>
                        <id>enforce-build-environment</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.8</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[3.2.5,)</version>
                                </requireMavenVersion>
                                <requirePluginVersions>
                                    <message>Best Practice is to always define plugin versions!</message>
                                </requirePluginVersions>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ban-milestones-and-release-candidates</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banVersionDeps implementation="com.atlassian.maven.enforcer.BanVersionDeps">
                                    <message>Milestone and Release Candidate dependencies are not allowed in releases.
                                    </message>
                                    <bannedDependencyVersionRegexp>(?i)^.*-(rc|m)-?[0-9]+(-.+)?$
                                    </bannedDependencyVersionRegexp>
                                    <noFailReactorVersionRegexp>(?i)^.*-m-?[0-9]+(-.+)?$</noFailReactorVersionRegexp>
                                    <noFailSnapshots>true</noFailSnapshots>
                                    <searchTransitive>false</searchTransitive>
                                    <ignoreTest>true</ignoreTest>
                                </banVersionDeps>
                            </rules>
                            <fail>false</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.sylvainlaurent.maven</groupId>
                <artifactId>yaml-json-validator-maven-plugin</artifactId>
                <version>1.0.3</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                        <configuration>
                            <validationSets>
                                <validationSet>
                                    <includes>
                                        <include>src/main/resources/**/*.json</include>
                                    </includes>
                                    <excludes>
                                        <exclude>src/main/resources/do-not-validate*.json</exclude>
                                        <!-- <exclude> is optional, others may be added -->
                                    </excludes>
                                </validationSet>
                                <validationSet>
                                    <!-- no jsonSchema is specified, check only that file are well formed -->
                                    <includes>
                                        <include>src/main/resources/**/*.yml</include>
                                    </includes>
                                </validationSet>
                            </validationSets>
                            <!-- Duplicate keys detection is turned on by default. -->
                            <detectDuplicateKeys>false</detectDuplicateKeys>
                            <allowEmptyFiles>false</allowEmptyFiles>
                            <!-- Allow comments in json files is turned off by default -->
                            <allowJsonComments>true</allowJsonComments>
                            <skip>false</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.0.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.19</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <configLocation>checkstyle.xml</configLocation>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.plugin</groupId>
                    <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                    <version>${spring-scanner.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>atlassian-spring-scanner</goal>
                            </goals>
                            <phase>process-classes</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <scannedDependencies>
                            <dependency>
                                <groupId>com.atlassian.troubleshooting</groupId>
                                <artifactId>common</artifactId>
                            </dependency>
                            <dependency>
                                <groupId>com.atlassian.troubleshooting</groupId>
                                <artifactId>common-healthchecks</artifactId>
                            </dependency>
                        </scannedDependencies>
                        <!-- Enable this to get build-time logging of annotations atlassian-spring-scanner-maven-plugin has noticed -->
                        <verbose>false</verbose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <executions>
                        <!-- Overwrite Spring XML coming from common module with the product-specific one (if exists).
                             To be able to use different versions of SpringScanner per product. -->
                        <execution>
                            <id>copy-spring-res</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${basedir}/target/classes/META-INF/spring</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${basedir}/src/main/resources/META-INF/spring</directory>
                                        <includes>
                                            <include>**/*.xml</include>
                                        </includes>
                                    </resource>
                                </resources>
                                <overwrite>true</overwrite>
                            </configuration>
                        </execution>
                        <!-- Overwrite inherited version of atlassian-plugin.xml (from common module) with the original one -->
                        <execution>
                            <id>copy-atlassian-res</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/classes/META-INF/atlassian</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.basedir}/../common/src/main/resources/META-INF/atlassian
                                        </directory>
                                        <includes>
                                            <include>**/*.xml</include>
                                        </includes>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                                <overwrite>true</overwrite>
                            </configuration>
                        </execution>
                        <!-- get the healthchecks-atlassian-plugin.xml from common-healtchecks module -->
                        <execution>
                            <id>copy-common-healthchecks-res</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${common-healthcheck.outputDirectory}</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>
                                            ${project.basedir}/../common-healthchecks/src/main/resources/META-INF/atlassian
                                        </directory>
                                        <includes>
                                            <include>healthchecks-atlassian-plugin.xml</include>
                                        </includes>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                                <overwrite>true</overwrite>
                            </configuration>
                        </execution>
                        <!-- Populate some plugin-specific properties with their actual values to be used at runtime -->
                        <execution>
                            <id>copy-properties-res</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <skip>${common.module}</skip>
                                <outputDirectory>${project.build.directory}/classes</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.basedir}/../common/src/main/resources</directory>
                                        <includes>
                                            <include>*.properties</include>
                                        </includes>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                                <overwrite>true</overwrite>
                            </configuration>
                        </execution>
                        <!--This is the default execution for the plugin, and we want to skip copying this properties file. It is explicitly copied in copy-properties-res above-->
                        <execution>
                            <id>default-resources</id>
                            <goals>
                                <goal>resources</goal>
                            </goals>
                            <configuration>
                                <resources>
                                    <resource>
                                        <directory>src/main/resources</directory>
                                        <excludes>
                                            <exclude>troubleshooting-plugin.properties</exclude>
                                            <exclude>META-INF/atlassian/healthchecks-atlassian-plugin.xml</exclude>
                                        </excludes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <jvmArgs>-Dtroubleshooting.dev.mode=true -Xmx1536m ${amps.jvm.args} ${jacoco.it.argLine}
                        </jvmArgs>
                        <allowGoogleTracking>false</allowGoogleTracking>
                        <skipITs>true</skipITs>
                        <skipUTs>true</skipUTs>
                        <skipAllPrompts>true</skipAllPrompts>
                        <skipAmpsPomCheck>true</skipAmpsPomCheck>
                        <enableQuickReload>true</enableQuickReload>
                        <instructions>
                            <Atlassian-Scan-Folders>META-INF/atlassian</Atlassian-Scan-Folders>
                            <Atlassian-Plugin-Key>${troubleshooting.pluginKey}</Atlassian-Plugin-Key>
                            <Spring-Context>*</Spring-Context>
                            <Import-Package>
                                org.springframework.osgi.*;resolution:="optional",
                                org.eclipse.gemini.blueprint.*;resolution:="optional",
                                com.atlassian.plugin.osgi.bridge.external,
                                javax.xml.namespace,
                                *;resolution:=optional
                            </Import-Package>
                            <Export-Package>
                                com.atlassian.troubleshooting.api.*
                            </Export-Package>
                        </instructions>
                        <products>
                            <product>
                                <id>confluence</id>
                                <version>${confluence.test.version}</version>
                                <productDataVersion>${confluence.test.version}</productDataVersion>
                                <log4jProperties>
                                    ${project.basedir}/../common/src/test/resources/log4j/confluence.properties
                                </log4jProperties>
                            </product>
                            <product>
                                <id>jira</id>
                                <version>${jira.test.version}</version>
                                <productDataVersion>${jira.test.version}</productDataVersion>
                            </product>
                            <product>
                                <id>bamboo</id>
                                <version>${bamboo.test.version}</version>
                                <productDataVersion>${bamboo.test.version}</productDataVersion>
                            </product>
                            <product>
                                <id>bitbucket</id>
                                <version>${bitbucket.test.version}</version>
                                <productDataVersion>${bitbucket.test.version}</productDataVersion>
                            </product>
                            <product>
                                <id>fecru</id>
                                <version>${fecru.test.version}</version>
                                <productDataVersion>${fecru.test.version}</productDataVersion>
                                <log4jProperties>${project.basedir}/../common/src/test/resources/log4j/fecru.xml
                                </log4jProperties>
                            </product>
                            <product>
                                <id>crowd</id>
                                <version>${crowd.test.version}</version>
                                <productDataVersion>${crowd.test.version}</productDataVersion>
                            </product>
                        </products>

                        <compressResources>false</compressResources>
                        <quickReloadVersion>2.0.1</quickReloadVersion>
                        <systemPropertyVariables>
                            <!--
                                We need to tell AMPS to stop looking at our source now, otherwise
                                if we run `atlas-run` or `atlas-debug` to check our plugin, it will
                                load our code out of src/main/resources, which would be very confusing!
                            -->
                            <plugin.resource.directories>${project.build.outputDirectory}</plugin.resource.directories>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <executions>
                        <execution>
                            <id>run-unit-tests</id>
                            <phase>test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <configuration>
                                <skip>${skipUTs}</skip>
                                <includes>
                                    <include>**/*Test.java</include>
                                </includes>
                                <excludes>
                                    <exclude>**/AllMinorVersionsPresentTest.java</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>true</skip>
                        <testFailureIgnore>false</testFailureIgnore>
                        <argLine>${jacoco.ut.argLine}</argLine>
                        <systemProperties>
                            <product>${product}</product>
                        </systemProperties>
                        <properties>
                            <property>
                                <name>listener</name>
                                <value>${plugin.listener.allure}</value>
                            </property>
                        </properties>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <includes>
                            <include>${includeITsPattern}</include>
                        </includes>
                        <properties>
                            <property>
                                <name>listener</name>
                                <value>
                                    ${plugin.listener.allure},${plugin.listener.value}
                                </value>
                            </property>
                        </properties>
                        <skipITs>${skipITs}</skipITs>
                        <argLine>${jacoco.it.argLine}</argLine>
                        <systemProperties>
                            <product>${product}</product>
                        </systemProperties>
                        <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                        <dependenciesToScan>
                            <dependency>${project.groupId}:common</dependency>
                        </dependenciesToScan>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>ru.yandex.qatools.allure</groupId>
                    <artifactId>allure-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.6</version>
                    <configuration>
                        <reportPlugins>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-javadoc-plugin</artifactId>
                                <version>${maven-javadoc-plugin.version}</version>
                            </plugin>
                        </reportPlugins>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>active-in-plugins</id>
            <activation>
                <file>
                    <exists>src/main/resources/atlassian-plugin.xml</exists>
                </file>
            </activation>
            <properties>
                <common-healthcheck.outputDirectory>${project.build.outputDirectory}/META-INF/atlassian
                </common-healthcheck.outputDirectory>
            </properties>
        </profile>
        <profile>
            <id>jacoco</id>
            <properties>
                <!-- set jacoco it argLine with JaCoCo runtime agent -->
                <jacoco.it.argLine>
                    -javaagent:${project.build.directory}/jacoco.agent-runtime.jar=destfile=${project.build.directory}/${jacoco.it.exec},includes=com/atlassian/**/*
                </jacoco.it.argLine>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>copy-jacoco-runtime-jar</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>copy</goal>
                                    </goals>
                                    <configuration>
                                        <artifactItems>
                                            <artifactItem>
                                                <groupId>org.jacoco</groupId>
                                                <artifactId>org.jacoco.agent</artifactId>
                                                <classifier>runtime</classifier>
                                                <version>${jacoco.version}</version>
                                                <destFileName>jacoco.agent-runtime.jar</destFileName>
                                                <outputDirectory>${project.build.directory}</outputDirectory>
                                            </artifactItem>
                                        </artifactItems>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                            <version>${jacoco.version}</version>
                            <configuration>
                                <includes>
                                    <include>com/atlassian/**/*</include>
                                </includes>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>pre-unit-test</id>
                                    <goals>
                                        <goal>prepare-agent</goal>
                                    </goals>
                                    <configuration>
                                        <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
                                        <propertyName>jacoco.ut.argLine</propertyName>
                                    </configuration>
                                </execution>
                                <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
                                <execution>
                                    <id>post-unit-test</id>
                                    <phase>test</phase>
                                    <goals>
                                        <goal>report</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>post-integration-test</id>
                                    <phase>install</phase>
                                    <goals>
                                        <goal>report-integration</goal>
                                    </goals>
                                    <configuration>
                                        <!-- Sets the path to the file which contains the execution data. -->
                                        <dataFile>${project.build.directory}/${jacoco.it.exec}</dataFile>
                                        <!-- Sets the output directory for the code coverage report. -->
                                        <outputDirectory>${project.reporting.outputDirectory}/jacoco-it
                                        </outputDirectory>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- enables tracking flaky tests in JIRA -->
            <id>track-flaky-tests</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>unpack-flaky-reporter-config</id>
                                    <phase>generate-test-sources</phase>
                                    <goals>
                                        <goal>unpack</goal>
                                    </goals>
                                    <configuration>
                                        <artifactItems>
                                            <artifactItem>
                                                <groupId>${project.groupId}</groupId>
                                                <artifactId>common</artifactId>
                                                <version>${project.version}</version>
                                                <classifier>tests</classifier>
                                                <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                                                <includes>**/issuecreator_config.json</includes>
                                            </artifactItem>
                                        </artifactItems>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <version>${surefire.version}</version>
                            <configuration>
                                <properties>
                                    <property>
                                        <name>listener</name>
                                        <value>
                                            ${plugin.listener.allure},${plugin.listener.value},com.atlassian.test.reporting.JUnitFlakyTestListener
                                        </value>
                                    </property>
                                </properties>
                                <rerunFailingTestsCount>5</rerunFailingTestsCount>
                                <systemPropertyVariables>
                                    <product>${product}</product>
                                    <junitflakylistener.runnerId>${runner.id}</junitflakylistener.runnerId>
                                    <junitflakylistener.branchName>${branch.name}</junitflakylistener.branchName>
                                    <junitflakylistener.trackFlakyTest>true</junitflakylistener.trackFlakyTest>
                                    <junitflakylistener.trackFlakyTestOnBranchesRegExp>master
                                    </junitflakylistener.trackFlakyTestOnBranchesRegExp>
                                    <junitflakylistener.deprecatedVerboseTestLogging>true
                                    </junitflakylistener.deprecatedVerboseTestLogging>
                                    <junitflakylistener.jiraUserName>${jira.username}</junitflakylistener.jiraUserName>
                                    <junitflakylistener.jiraPassword>${jira.password}</junitflakylistener.jiraPassword>
                                    <junitflakylistener.jiraProjectConfigPath>issuecreator_config.json
                                    </junitflakylistener.jiraProjectConfigPath>
                                </systemPropertyVariables>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- This profile is used for running the tests in the external resource repository updaters -->
            <id>validate-data</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <version>${surefire.version}</version>
                            <configuration>
                                <!-- This is required since the code tested by some of the tests expect c
                                ertain files to be certain locations relative to the root of the ATST project -->
                                <workingDirectory>${project.parent.basedir}</workingDirectory>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>run-unit-tests</id>
                                    <phase>test</phase>
                                    <goals>
                                        <goal>test</goal>
                                    </goals>
                                    <configuration>
                                        <skip>${skipUTs}</skip>
                                        <includes>
                                            <!-- Add new tests as they are added to the external-resource-repository-updaters module -->
                                            <include>**/AllMinorVersionsPresentTest.java,
                                                **/ReleaseDateFetcherTest.java
                                            </include>
                                        </includes>
                                        <!-- we want an empty 'excludes' tag so to remove the parent excludes contents
                                             we need to override the default merge behaviour -->
                                        <excludes combine.self="override" />
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>skip-tests</id>
            <activation>
                <property>
                    <name>skipTests</name>
                </property>
            </activation>
            <properties>
                <skipUTs>true</skipUTs>
                <skipITs>true</skipITs>
            </properties>
        </profile>
        <profile>
            <id>integration-tests</id>
            <activation>
                <property>
                    <name>!skipTests</name>
                </property>
            </activation>
            <build>
                <testResources>
                    <testResource>
                        <directory>${project.basedir}/../common/src/test/resources</directory>
                        <targetPath>${project.build.testOutputDirectory}</targetPath>
                    </testResource>
                    <testResource>
                        <directory>${project.basedir}/src/test/resources</directory>
                        <targetPath>${project.build.testOutputDirectory}</targetPath>
                    </testResource>
                </testResources>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.atlassian.maven.plugins</groupId>
                            <artifactId>amps-maven-plugin</artifactId>
                            <version>${amps8.version}</version>
                            <extensions>true</extensions>
                            <executions>
                                <execution>
                                    <id>run-amps</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <configuration>
                                        <wait>false</wait>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>stop-amps</id>
                                    <phase>post-integration-test</phase>
                                    <goals>
                                        <goal>stop</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>run-integration-tests</id>
                                    <goals>
                                        <goal>integration-test</goal>
                                        <goal>verify</goal>
                                    </goals>
                                    <phase>integration-test</phase>
                                    <configuration>
                                        <skip>${skipITs}</skip>
                                        <includes>
                                            <include>${includeITsPattern}</include>
                                        </includes>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>no-amps-run</id>
            <activation>
                <property>
                    <name>megawatt</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- Override parent's executions with empty to not trigger amps run -->
                        <plugin>
                            <groupId>com.atlassian.maven.plugins</groupId>
                            <artifactId>amps-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>run-amps</id>
                                    <phase>none</phase>
                                </execution>
                                <execution>
                                    <id>stop-amps</id>
                                    <phase>none</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>java-11</id>
            <activation>
                <jdk>11</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <dependenciesToScan>
                                <dependency>${project.groupId}:common</dependency>
                                <dependency>${project.groupId}:common-healthchecks</dependency>
                            </dependenciesToScan>
                            <!-- allows reflection access for third party libraries -->
                            <argLine>
                                ${jacoco.it.argLine} --illegal-access=permit
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <!-- Used by checkstyle report generation-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.5</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <!-- select non-aggregate reports -->
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.5</version>
            </plugin>
        </plugins>
    </reporting>
</project>
