<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-private-pom</artifactId>
        <version>7.0.15</version>
    </parent>
    <groupId>com.atlassian.confluence.plugins</groupId>
    <artifactId>confluence-frontend-plugins</artifactId>
    <version>20.2.27</version>
    <packaging>pom</packaging>
    <name>Confluence Frontend Plugins</name>
    <description>Confluence Frontend Plugins</description>
    <organization>
        <name>Atlassian</name>
        <url>https://www.atlassian.com/</url>
    </organization>
    <modules>
        <module>clientside-extensions-discovery</module>
        <module>confluence-backup-and-restore-ui</module>
        <module>confluence-copy-space</module>
        <module>confluence-dashboard</module>
        <module>confluence-denormalised-permissions</module>
        <module>confluence-fixed-headers</module>
        <module>confluence-frontend</module>
        <module>confluence-highlight-actions</module>
        <module>confluence-license-banner</module>
        <module>confluence-mobile-web</module>
        <module>confluence-onboarding</module>
        <module>confluence-page-banner</module>
        <module>confluence-page-hierarchy-plugin</module>
        <module>confluence-post-upgrade-landing-page-plugin</module>
        <module>confluence-rebuild-index</module>
        <module>confluence-request-access-plugin</module>
        <module>confluence-retention-rules</module>
        <module>confluence-share-page-plugin</module>
        <module>confluence-space-ia</module>
        <module>confluence-sticky-table-headers-plugin</module>
        <module>confluence-super-batch</module>
        <module>confluence-ui-components</module>
        <module>confluence-user-profile-plugin</module>
        <module>confluence-view-storage-format</module>
        <module>confluence-watch-button</module>
        <module>confluence-webhooks</module>
        <module>confluence-whats-new</module>
        <module>recently-viewed-plugin</module>
    </modules>
    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-frontend-plugins.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-frontend-plugins.git</developerConnection>
        <tag>confluence-frontend-plugins-20.2.27</tag>
        <url>https://stash.atlassian.com/projects/CONFSERVER/repos/confluence-frontend-plugins/browse</url>
    </scm>
    <properties>
        <aggregate.report.dir>integration-tests/target/site/jacoco-aggregate/</aggregate.report.dir>
        <amps8.version>9.4.0</amps8.version>
        <atlassian-jstest-runner.version>0.40.1</atlassian-jstest-runner.version>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <atlassian.osgi.javaconfig.version>0.6.0</atlassian.osgi.javaconfig.version>
        <atlassian.pdk.server.password>admin</atlassian.pdk.server.password>
        <atlassian.pdk.server.url>http://localhost:${http.port}/confluence</atlassian.pdk.server.url>
        <atlassian.pdk.server.username>admin</atlassian.pdk.server.username>
        <atlassian.spring.scanner.version>3.0.4</atlassian.spring.scanner.version>
        <aui.version>9.2.2</aui.version>
        <baseurl.confluence>http://localhost:${http.confluence.port}/${context.confluence.path}</baseurl.confluence>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <confluence.maven-enforcer-rules.version>1.0.5</confluence.maven-enforcer-rules.version>
        <!-- renovate: depName=com.atlassian.confluence:confluence-plugins-platform-pom -->
        <confluence.version>10.2.4-CONFSRVDEV-51104-m01</confluence.version>
        <containerId>tomcat10x</containerId>
        <context.confluence.path>confluence</context.confluence.path>
        <download.maven.plugin.version>1.7.1</download.maven.plugin.version>
        <exec-maven-plugin.version>3.1.1</exec-maven-plugin.version>
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
        <flaky-test-reporter.version>5.0.3</flaky-test-reporter.version>
        <hamcrest.version>2.2</hamcrest.version>
        <http.confluence.port>${http.port}</http.confluence.port>
        <http.port>1990</http.port>
        <incremental-build-plugin.version>0.359</incremental-build-plugin.version>
        <incrementalbuild.enabled>true</incrementalbuild.enabled>
        <jacoco.agent.it.argLine />
        <jacoco.report.name>jacoco.xml</jacoco.report.name>
        <jacocoItDestinationFile>${project.build.directory}/jacoco-it.exec</jacocoItDestinationFile>
        <jsoup.version>1.15.4</jsoup.version>
        <jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom} ${jacoco.agent.it.argLine}</jvm.args>
        <jvm.args.custom />
        <jvm.args.xmx>2g</jvm.args.xmx>
        <karma.command>${basedir}/node_modules/.bin/karma</karma.command>
        <maven-dependency.version>3.6.1</maven-dependency.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <maven.compiler.release>21</maven.compiler.release>
        <maven.profiling.product>CONFLUENCE_FRONTEND_PLUGINS</maven.profiling.product>
        <npm.cmd>${scriptsdir}/nvm.sh</npm.cmd>
        <platform.version>8.0.0-m17</platform.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <quick.reload.version>5.0.8</quick.reload.version>
        <rest.assured.version>3.0.7</rest.assured.version>
        <rest.doc.generation.skip>true</rest.doc.generation.skip>
        <restrict-imports-enforcer-rule.version>2.6.1</restrict-imports-enforcer-rule.version>
        <scriptsdir>${maven.multiModuleProjectDirectory}/scripts</scriptsdir>
        <skip.formatting.check>true</skip.formatting.check>
        <skipCopyCodeStyle>true</skipCopyCodeStyle>
        <skipCopyLicense>false</skipCopyLicense>
        <skipJacocoReport>true</skipJacocoReport>
        <slf4j-simple.version>1.7.36</slf4j-simple.version>
        <snappy-java.version>1.1.10.7</snappy-java.version>
        <sonar.exclusions>**/*.test.*,
            **/__tests__/**,
            **/*.stories.*,
            **/__stories__/**,
            **/*.spec.*,
            **/mocks/**,
            **/__mocks__/**,
            **/*-tests.js*,
            **/shim/**</sonar.exclusions>
        <spotless-maven-plugin.version>2.44.4</spotless-maven-plugin.version>
        <!-- failsafe 2.20.1 or newer required for rerun support. Double check the version from the parent-pom -->
        <surefire.version>3.5.3</surefire.version>
        <test-coverage.integration-test-directory>../integration-tests</test-coverage.integration-test-directory>
        <test-coverage.skip-copy-integration-test-report>true</test-coverage.skip-copy-integration-test-report>
        <usercompatibility-confluence.version>2.1.4</usercompatibility-confluence.version>
        <!-- For the flaky test reporter profile. -->
        <!-- override the versions of the listed plugins in amps -->
        <version.override.set>maven-failsafe-plugin</version.override.set>
        <webdriver.browser>firefox</webdriver.browser>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-api</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.usercompatibility</groupId>
                <artifactId>usercompatibility-confluence</artifactId>
                <version>${usercompatibility-confluence.version}</version>
            </dependency>
            <!-- confluence plugins -->
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-fixed-headers</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>recently-viewed-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-onboarding</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-space-ia-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-space-ia</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-user-profile</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>share-page</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-edge-index</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-soy</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-inline-comments</artifactId>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-frontend-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-super-batch</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- confluence test dependencies -->
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-rest-serialization-jackson2</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-testutils</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-functestrpc-plugin</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-functest-rest-plugin</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-scriptsfinished-plugin</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <!-- test dependencies -->
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>${rest.assured.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins.jstestrunner</groupId>
                <artifactId>atlassian-jstest-runner-pageobjects</artifactId>
                <version>${atlassian-jstest-runner.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.aui</groupId>
                <artifactId>auiplugin</artifactId>
                <version>${aui.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.aui</groupId>
                <artifactId>aui-soy</artifactId>
                <version>${aui.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.aui</groupId>
                <artifactId>aui-flat-pack</artifactId>
                <version>${aui.version}</version>
                <type>zip</type>
            </dependency>
            <!-- confluence-stateless-test-runner 8.0.3+ is dependent on confluence-test-utils 9.9.0+ .
            IntelliJ gets confused and pulls in the version of confluence-test-utils from confluence which breaks running tests -->
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>${jsoup.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian</groupId>
                <artifactId>flaky-test-reporter</artifactId>
                <version>${flaky-test-reporter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.xerial.snappy</groupId>
                <artifactId>snappy-java</artifactId>
                <version>${snappy-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-restv2-server-api</artifactId>
                <version>${confluence.version}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.extensions</groupId>
                    <artifactId>incremental-build-plugin</artifactId>
                    <version>${incremental-build-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <productVersion>${confluence.version}</productVersion>
                        <productDataVersion>${confluence.data.version}</productDataVersion>
                        <containerId>${containerId}</containerId>
                        <jvmArgs>${jvm.args}</jvmArgs>
                        <server>localhost</server>
                        <output>${project.build.directory}/output.log</output>
                        <!-- Disable the various bits of dev junk that AMPS activates by default -->
                        <enableAchoo>false</enableAchoo>
                        <enableDevToolbox>false</enableDevToolbox>
                        <enablePde>false</enablePde>
                        <quickReloadVersion>1.30.2</quickReloadVersion>
                        <enableQuickReload>${atlassian.dev.mode}</enableQuickReload>
                        <enablePluginViewer>false</enablePluginViewer>
                        <enableWebConsole>false</enableWebConsole>
                        <platformVersion>${platform.version}</platformVersion>
                        <systemProperties>
                            <confluence.version>${confluence.version}</confluence.version>
                            <http.port>${http.confluence.port}</http.port>
                            <http.confluence.port>${http.confluence.port}</http.confluence.port>
                            <baseurl.confluence>${baseurl.confluence}</baseurl.confluence>
                            <context.path>${context.confluence.path}</context.path>
                            <context.confluence.path>${context.confluence.path}</context.confluence.path>
                            <webdriver.browser>${webdriver.browser}</webdriver.browser>
                        </systemProperties>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency.version}</version>
                    <configuration>
                        <ignoredUnusedDeclaredDependencies combine.children="append">
                            <!-- We use sfl4j-simple for our logging backend in tests -->
                            <ignoredUnusedDeclaredDependency>org.slf4j:*</ignoredUnusedDeclaredDependency>
                        </ignoredUnusedDeclaredDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <!-- When using atlassian-public-pom as parent POM we need this configuration to skip tests, -->
                        <!-- as command line arguments are ignored. -->
                        <arguments>-Prelease -DskipTests</arguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>com.atlassian.confluence.maven-enforcer-rules</groupId>
                            <artifactId>confluence-maven-enforcer-rules</artifactId>
                            <version>${confluence.maven-enforcer-rules.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>de.skuzzle.enforcer</groupId>
                            <artifactId>restrict-imports-enforcer-rule</artifactId>
                            <version>${restrict-imports-enforcer-rule.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-banned-import-class</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <rules>
                                    <RestrictImports>
                                        <!-- Define an explanatory reason why these imports are prohibited -->
                                        <reason>Use org.assertj.core.api.Assertions#assertThat from assertj instead</reason>
                                        <!-- Specify a single pattern to be banned -->
                                        <bannedImports>
                                            <bannedImport>junit.framework.Assert.**</bannedImport>
                                            <bannedImport>junit.framework.Assert</bannedImport>
                                            <bannedImport>org.hamcrest.Matcher</bannedImport>
                                            <bannedImport>org.hamcrest.MatcherAssert.**</bannedImport>
                                            <bannedImport>org.hamcrest.MatcherAssert</bannedImport>
                                            <bannedImport>org.junit.Assert.**</bannedImport>
                                            <bannedImport>org.junit.Assert</bannedImport>
                                            <bannedImport>org.junit.jupiter.api.Assertions.**</bannedImport>
                                            <bannedImport>org.junit.jupiter.api.Assertions</bannedImport>
                                            <bannedImport>org.mockito.hamcrest.MockitoHamcrest.**</bannedImport>
                                            <bannedImport>org.mockito.hamcrest.MockitoHamcrest</bannedImport>
                                        </bannedImports>
                                    </RestrictImports>
                                    <RestrictImports>
                                        <!-- Define an explanatory reason why these imports are prohibited -->
                                        <reason>Use org.assertj.core.api.Assertions#assertThat from assertj instead</reason>
                                        <!-- Specify a single pattern to be banned -->
                                        <bannedImports>
                                            <bannedImport>org.assertj.core.api.AssertionsForClassTypes.assertThat</bannedImport>
                                        </bannedImports>
                                    </RestrictImports>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                    <extensions>false</extensions>
                    <executions>
                        <execution>
                            <id>js-enforcement</id>
                            <goals>
                                <goal>verify-fe-manifest-associations</goal>
                            </goals>
                            <phase>verify</phase>
                            <configuration>
                                <verifyFeManifestAssociationsInputEntrypoint>${project.build.directory}/${project.build.finalName}.jar</verifyFeManifestAssociationsInputEntrypoint>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.plugin</groupId>
                    <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                    <version>${atlassian.spring.scanner.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>copy-license</id>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <skip>${skipCopyLicense}</skip>
                                <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>copy-checkstyle-suppressions</id>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <phase>process-resources</phase>
                            <configuration>
                                <skip>${skipCopyCodeStyle}</skip>
                                <outputDirectory>${project.basedir}/target/codestyle</outputDirectory>
                                <overwrite>true</overwrite>
                                <resources>
                                    <resource>
                                        <directory>src/codestyle</directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.atlassian.codestyle</groupId>
                            <artifactId>confluence-codestyle</artifactId>
                            <version>${atlassian.codestyle.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <!-- Spotless Plugin with integrated SortPom -->
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>${spotless-maven-plugin.version}</version>
                    <configuration>
                        <pom>
                            <sortPom>
                                <nrOfIndentSpace>4</nrOfIndentSpace>
                                <sortModules>true</sortModules>
                                <expandEmptyElements>false</expandEmptyElements>
                                <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                                <sortDependencies>scope</sortDependencies>
                                <sortDependencyManagement>scope</sortDependencyManagement>
                                <sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
                                <sortProperties>true</sortProperties>
                            </sortPom>
                        </pom>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <!-- pre-install the required versions of node and npm, before any child modules need it -->
                    <!-- avoids partial installs being used and breaking multi-threaded builds -->
                    <execution>
                        <id>node-install</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <skip>${npm.install.skip}</skip>
                            <executable>${npm.cmd}</executable>
                            <arguments>
                                <!-- just a dummy command to ensure npm is installed -->
                                <argument>--version</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>parse-jacoco-it-report</id>
                        <goals>
                            <goal>report-integration</goal>
                        </goals>
                        <phase>none</phase>
                        <configuration>
                            <skip>${skipJacocoReport}</skip>
                            <includes>
                                <include>com/atlassian/confluence/**</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>parse-jacoco-aggregated-report</id>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                        <phase>none</phase>
                        <configuration>
                            <skip>${skipJacocoReport}</skip>
                            <!-- as we are going to run in only for the plugin, then we have to include the current project -->
                            <includeCurrentProject>true</includeCurrentProject>
                            <includes>
                                <include>com/atlassian/confluence/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <!--
                        Forces the evaluation of testBatchRunner parameters, so they are visible to Maven build cache extension.
                        This prevents different test batches from overwriting other batches in the cache.
                        -->
                        <id>evaluate-test-batch-runner-parameters</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>pre-integration-test</phase>
                        <configuration>
                            <target>
                                <echo message="Test batch runner batch ${testBatchRunner.currentBatchNumber} of ${testBatchRunner.numberOfBatches}" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <configuration>
                    <skip>${skip.formatting.check}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>spotless-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <profile>
            <id>ban_platform_dependencies_version_override</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>ban_platform_dependencies_version_override</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <rules>
                                        <myCustomRule implementation="com.atlassian.confluence.maven.enforcer.rules.PlatformDependencyVersionEnforcerRule">
                                            <platformGroupId>com.atlassian.platform</platformGroupId>
                                            <platformArtifactId>dc-platform</platformArtifactId>
                                            <version>${platform.version}</version>
                                            <modules>
                                                <module>platform-system-classpath</module>
                                                <module>platform-framework-bundles</module>
                                                <module>platform-bundled-plugins</module>
                                                <module>platform-internal-api</module>
                                                <module>platform-deprecated-public-api</module>
                                                <module>platform-public-api</module>
                                                <module>platform-test-resources</module>
                                                <module>platform-spring-bundle</module>
                                            </modules>
                                            <excludes>
                                                <exclude>opensymphony:propertyset</exclude>
                                            </excludes>
                                        </myCustomRule>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>windows</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <properties>
                <karma.command>${basedir}/node_modules/.bin/karma.cmd</karma.command>
                <npm.cmd>${scriptsdir}/npm.cmd</npm.cmd>
                <npm.prefix.args />
            </properties>
        </profile>
        <profile>
            <id>flaky</id>
            <properties>
                <ci.tests.rerunFailingTestsCount>0</ci.tests.rerunFailingTestsCount>
                <ci.tests.skipAfterFailureCount>10</ci.tests.skipAfterFailureCount>
                <junitflakylistener.branchName>${env.bamboo_planRepository_1_branchName}</junitflakylistener.branchName>
                <junitflakylistener.failAnyBranchOnAnyFlake>false</junitflakylistener.failAnyBranchOnAnyFlake>
                <junitflakylistener.failBranchWithNewFlakes>false</junitflakylistener.failBranchWithNewFlakes>
                <junitflakylistener.flakyTestFilePath>target/failsafe-reports/flakey-tests.txt</junitflakylistener.flakyTestFilePath>
                <junitflakylistener.jiraPassword>${env.bamboo_confsrv_flakytst_bot_token}</junitflakylistener.jiraPassword>
                <junitflakylistener.jiraProjectConfigPath>issuecreator_plugins_config.json</junitflakylistener.jiraProjectConfigPath>
                <junitflakylistener.jiraUserName>${env.bamboo_confsrv_flakytst_bot_username}</junitflakylistener.jiraUserName>
                <junitflakylistener.jiraUsesTokenAuth>true</junitflakylistener.jiraUsesTokenAuth>
                <junitflakylistener.reportAllFailures>true</junitflakylistener.reportAllFailures>
                <junitflakylistener.runnerId>${env.bamboo_buildResultKey}</junitflakylistener.runnerId>
                <junitflakylistener.trackFlakyTest>true</junitflakylistener.trackFlakyTest>
                <junitflakylistener.trackFlakyTestOnBranchesRegExp>master|release/.*</junitflakylistener.trackFlakyTestOnBranchesRegExp>
                <junitflakylistener.updateIssueOnBranches>false</junitflakylistener.updateIssueOnBranches>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.atlassian</groupId>
                    <artifactId>flaky-test-reporter</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                    <version>${slf4j-simple.version}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter-engine</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.googlecode.maven-download-plugin</groupId>
                        <artifactId>download-maven-plugin</artifactId>
                        <version>${download.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>download-flaky-configuration</id>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <phase>process-test-resources</phase>
                                <configuration>
                                    <url>https://s3-ap-southeast-2.amazonaws.com/confluence-server/bamboo/issuecreator_plugins_config.json</url>
                                    <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                                    <overwrite>true</overwrite>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <trimStackTrace>false</trimStackTrace>
                            <!--suppress MavenModelInspection -->
                            <skipAfterFailureCount>${ci.tests.skipAfterFailureCount}</skipAfterFailureCount>
                            <!--suppress MavenModelInspection -->
                            <rerunFailingTestsCount>${ci.tests.rerunFailingTestsCount}</rerunFailingTestsCount>
                            <properties>
                                <property>
                                    <name>listener</name>
                                    <value>com.atlassian.test.reporting.JUnitFlakyTestListener</value>
                                </property>
                            </properties>
                            <systemPropertyVariables>
                                <junitflakylistener.runnerId>${junitflakylistener.runnerId}</junitflakylistener.runnerId>
                                <junitflakylistener.branchName>${junitflakylistener.branchName}</junitflakylistener.branchName>
                                <!-- issue creation kill switch; by default, issues will be created on branch builds as well -->
                                <junitflakylistener.trackFlakyTest>${junitflakylistener.trackFlakyTest}</junitflakylistener.trackFlakyTest>
                                <!-- A test cannot be officially "flaky" with reruns = 0, so we could report all failures -->
                                <junitflakylistener.reportAllFailures>${junitflakylistener.reportAllFailures}</junitflakylistener.reportAllFailures>
                                <junitflakylistener.trackFlakyTestOnBranchesRegExp>${junitflakylistener.trackFlakyTestOnBranchesRegExp}</junitflakylistener.trackFlakyTestOnBranchesRegExp>
                                <!-- Fail the build when we see a flake for any branches (a failure followed by a successful re-run) -->
                                <junitflakylistener.failAnyBranchOnAnyFlake>${junitflakylistener.failAnyBranchOnAnyFlake}</junitflakylistener.failAnyBranchOnAnyFlake>
                                <!-- Comment on existing Jira ticket with flakes for other branches (branches not matching the regex in trackFlakyTestOnBranchesRegExp)  -->
                                <junitflakylistener.updateIssueOnBranches>${junitflakylistener.updateIssueOnBranches}</junitflakylistener.updateIssueOnBranches>
                                <!--
                                This property is much older than failAnyBranchOnAnyFlake, but it only applies to branches
                                not matching the regex in trackFlakyTestOnBranchesRegExp, so we use failAnyBranchOnAnyFlake instead.
                                -->
                                <junitflakylistener.failBranchWithNewFlakes>${junitflakylistener.failBranchWithNewFlakes}</junitflakylistener.failBranchWithNewFlakes>
                                <junitflakylistener.flakyTestFilePath>${junitflakylistener.flakyTestFilePath}</junitflakylistener.flakyTestFilePath>
                                <junitflakylistener.jiraProjectConfigPath>${junitflakylistener.jiraProjectConfigPath}</junitflakylistener.jiraProjectConfigPath>
                                <junitflakylistener.jiraUserName>${junitflakylistener.jiraUserName}</junitflakylistener.jiraUserName>
                                <junitflakylistener.jiraPassword>${junitflakylistener.jiraPassword}</junitflakylistener.jiraPassword>
                                <junitflakylistener.jiraUsesTokenAuth>${junitflakylistener.jiraUsesTokenAuth}</junitflakylistener.jiraUsesTokenAuth>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jacoco</id>
            <properties>
                <jacoco.agent.it.argLine>-javaagent:${project.build.directory}/jacoco.agent-runtime.jar=includes=com/atlassian/**/*,output=tcpserver</jacoco.agent.it.argLine>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>confluence-maven-plugin</artifactId>
                        <configuration>
                            <testCoverage>
                                <enabled>true</enabled>
                                <destFile>${jacocoItDestinationFile}</destFile>
                            </testCoverage>
                        </configuration>
                    </plugin>
                    <!-- Code coverage -->
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>agent-for-ut</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.agent.argLine</propertyName>
                                    <includes>
                                        <include>com/atlassian/confluence/**</include>
                                    </includes>
                                </configuration>
                            </execution>
                            <execution>
                                <id>parse-jacoco-ut-report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <phase>initialize</phase>
                                <configuration>
                                    <propertyName>jacoco.agent.it.argLine</propertyName>
                                    <includes>
                                        <include>com/atlassian/confluence/**</include>
                                    </includes>
                                    <destFile>${jacocoItDestinationFile}</destFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jacoco</id>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <phase>pre-integration-test</phase>
                                <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>com.atlassian.drs</groupId>
                        <artifactId>dependency-report-maven-plugin</artifactId>
                        <version>2.0.9</version>
                        <configuration>
                            <projectId>b908792b-3d22-4e0e-a908-ec1ed00a68b6</projectId>
                            <unitTestCodeCoveragePaths>${project.build.directory}/jacoco.exec</unitTestCodeCoveragePaths>
                            <integrationTestCodeCoveragePaths>${project.build.directory}/jacoco-it.exec</integrationTestCodeCoveragePaths>
                            <gracefulFailure>true</gracefulFailure>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>upload</goal>
                                </goals>
                                <phase>post-integration-test</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- Copy an integration test code coverage report from integration test module to current module -->
                                <id>copy-jacoco-it-report</id>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <phase>none</phase>
                                <configuration>
                                    <skip>${test-coverage.skip-copy-integration-test-report}</skip>
                                    <outputDirectory>${project.basedir}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${test-coverage.integration-test-directory}</directory>
                                            <includes>
                                                <include>target/jacoco-it.exec</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>@{jacoco.agent.argLine}</argLine>
                            <!-- Ignoring integration tests on test phase so they just run in integration-test phase.-->
                            <!-- This configuration is necessary when using AMPS together with a parent POM.-->
                            <excludes>
                                <exclude>it/**</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>configure-githooks</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
                <property>
                    <name>!env.CONF_GIT_HOOKS_DISABLE</name>
                </property>
                <file>
                    <missing>.git/hooks/post-checkout</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>${exec-maven-plugin.version}</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>install-git-hooks</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <phase>initialize</phase>
                                <configuration>
                                    <executable>${project.basedir}/scripts/install-githooks.sh</executable>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>checkstyle</id>
            <properties>
                <atlassian.codestyle>confluence-codestyle:${atlassian.codestyle.version}</atlassian.codestyle>
                <atlassian.codestyle.version>4.0.2</atlassian.codestyle.version>
                <checkstyle.version>10.26.1</checkstyle.version>
                <skipCopyCodeStyle>false</skipCopyCodeStyle>
            </properties>
        </profile>
        <!-- Mac-specific formatting profile -->
        <profile>
            <id>formatting-on-mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <properties>
                <skip.formatting.check>false</skip.formatting.check>
            </properties>
        </profile>
    </profiles>
</project>
