<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.confluence</groupId>
        <artifactId>confluence-project</artifactId>
        <version>8.5.19</version>
        <relativePath>../..</relativePath>
    </parent>

    <artifactId>confluence-webapp</artifactId>
    <packaging>war</packaging>

    <name>Confluence Webapp</name>

    <properties>
        <spotbugs.excludes>src/etc/findbugs-excludes.xml</spotbugs.excludes>
    </properties>

    <dependencies>
        <!-- Spring container dependencies -->
        <!--
        "compile" scope here, but "provided" in confluence-core/confluence
        so that noone picks them up while depending on confluence as "provided"
        -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <!-- END OF Spring container dependencies -->

        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-framework-bundles</artifactId>
            <type>zip</type>
            <classifier>${confluence.project.plugins.spring.classifier}</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-log4j</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.cache</groupId>
            <artifactId>confluence-cache-ehcache</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence.cache</groupId>
            <artifactId>confluence-cache-hazelcast</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-localhost</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.tenancy</groupId>
            <artifactId>atlassian-tenancy-api</artifactId>
        </dependency>

        <!-- Needed until we remove the Axis 1 SOAP plugin -->
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.3</version>
        </dependency>

        <!-- Logging-as-a-Service -->
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-logging</artifactId>
            <version>${atlassian-logging.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j2-stacktrace-origins</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.json</groupId>
            <artifactId>atlassian-json-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
        </dependency>

        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
        </dependency>

        <!-- bundled JDBC drivers -->
        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
        	<groupId>com.microsoft.sqlserver</groupId>
        	<artifactId>mssql-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Platform requirement (must be in system bundle so framework-bundles spring-context can wire to it) -->
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
        </dependency>

        <!-- SAL Api -->
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>

        <!-- AppLinks -->
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.applinks</groupId>
            <artifactId>applinks-host</artifactId>
        </dependency>

        <dependency>
            <groupId>com.atlassian.velocity.htmlsafe</groupId>
            <artifactId>velocity-htmlsafe</artifactId>
        </dependency>

        <!-- Remote API Plugin -->
        <dependency>
            <groupId>com.atlassian.confluence.plugins</groupId>
            <artifactId>confluence-rpc-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>

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

        <!--
        This is the Jakarta Activation implementtion, but it also includes the API JARs.
        So we bundle this in the webapp, and mark the activation-api dependency as provides, so that we don't get two
        copies of the API.
         -->
        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>jakarta.activation</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.activation</groupId>
            <artifactId>jakarta.activation-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-tools</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Tomcat dependencies. Added so that we can use Tomcat library filters in ServletFilters configuration-->
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-catalina</artifactId>
            <version>${tomcat.canonical.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp</artifactId>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- added as we export its packages to plugins and should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- CONFSRVDEV-25945 Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>jakarta-regexp</groupId>
            <artifactId>jakarta-regexp</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- CONFSRVDEV-25946 Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Still exported to plugins, should be removed in Confluence 9.0 -->
        <dependency>
            <groupId>oro</groupId>
            <artifactId>oro</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>confluence</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>confluence-init.properties</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.carrot2.labs</groupId>
                <artifactId>smartsprites-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <rootDirPath>${project.basedir}/src/main/webapp</rootDirPath>
                    <outputDirPath>${project.build.directory}/confluence</outputDirPath>
                </configuration>
                <executions>
                    <execution>
                        <id>spritify</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>spritify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.samaxes.maven</groupId>
                <artifactId>minify-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>minify-core</id>
                        <configuration>
                            <jsSourceIncludes>
                                <jsSourceInclude>**/*.js</jsSourceInclude>
                            </jsSourceIncludes>
                            <jsSourceExcludes>
                                <jsSourceExclude>**/*.min.js</jsSourceExclude>
                                <jsSourceExclude>**/*-min.js</jsSourceExclude>
                            </jsSourceExcludes>
                            <cssSourceIncludes>
                                <cssSourceInclude>**/*.css</cssSourceInclude>
                            </cssSourceIncludes>
                            <cssSourceExcludes>
                                <cssSourceExclude>**/*.min.css</cssSourceExclude>
                                <cssSourceExclude>**/*-min.css</cssSourceExclude>
                            </cssSourceExcludes>
                            <cssSourceDir>.</cssSourceDir>
                            <jsSourceDir>.</jsSourceDir>
                            <webappSourceDir>${basedir}/src/main/webapp/includes</webappSourceDir>
                            <webappTargetDir>${project.build.directory}/confluence/includes</webappTargetDir>
                            <jsEngine>CLOSURE</jsEngine>
                            <suffix>-min</suffix>
                            <skipMerge>true</skipMerge>
                            <closureLanguage>ECMASCRIPT5</closureLanguage>
                        </configuration>
                        <goals>
                            <goal>minify</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-utils</artifactId>
                        <version>3.5.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.atlassian.lesscss</groupId>
                <artifactId>lesscss-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <!--
                         Generates compiled less files using a target suffix of .css
                         This is a legacy hangover from the early phases of lesscss usage in Confluence.
                         It's risky to remove this without knowing for sure that nothing is assuming these .css target
                         files will be present.
                        -->
                        <id>compile-less-legacy-suffix</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <suffix>.css</suffix>
                            <sourceDirectory>${project.basedir}/src/main/webapp</sourceDirectory>
                            <outputDirectory>${project.build.directory}/confluence</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <!--
                         Generates compiled less files with the default target suffix of .less.css
                         The lesscss runtime web resource transformer will pick these up at runtime and use them in
                         preference to recompiling the less files
                        -->
                        <id>compile-less</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/webapp</sourceDirectory>
                            <outputDirectory>${project.build.directory}/confluence</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps8.version}</version>
                <configuration>
                    <includedFeModuleManifests>
                        <includedFeModuleManifest>${project.basedir}/../../confluence-frontend/johnson-page/package.json</includedFeModuleManifest>
                        <includedFeModuleManifest>${project.basedir}/../../confluence-frontend/johnson-page/package-lock.json</includedFeModuleManifest>
                    </includedFeModuleManifests>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy-fe-module-manifests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>ban_unwanted_dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>The web-app should not depend on the Confluence API classes</message>
                                    <excludes>
                                        <exclude>com.atlassian.confluence.plugins:confluence-api</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>Do not put spring-scanner-runtime or annotation in system bundle. They should be deployed as plugins. See CONFDEV-39702, SCANNER-17.</message>
                                    <excludes>
                                        <exclude>com.atlassian.plugin:atlassian-spring-scanner-runtime</exclude>
                                        <exclude>com.atlassian.plugin:atlassian-spring-scanner-annotation</exclude>
                                    </excludes>
                                </bannedDependencies>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>DOm4j 1.x (dom4j:dom4j) has been replaced by Dom4j 2.x (org.dom4j:dom4j)</message>
                                    <excludes>
                                        <exclude>dom4j:dom4j</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce_slf4j_binding_scope</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <searchTransitive>true</searchTransitive>
                                    <message>confluence-webapp must only contain the log4j2.x SLF4J binding</message>
                                    <excludes>
                                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                                        <exclude>org.slf4j:slf4j-nop</exclude>
                                        <exclude>org.slf4j:slf4j-simple</exclude>
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <exclude>ch.qos.logback:logback-classic</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <!-- compression will just slow the process down -->
                        <compress>false</compress>
                    </archive>
                    <!-- Override the filename of the libraries in WEB-INF/lib to include the groupId -->
                    <outputFileNameMapping>@{groupId}@_@{artifactId}@-@{version}@.@{extension}@</outputFileNameMapping>
                    <overlays>
                        <overlay>
                            <groupId>com.atlassian.plugins</groupId>
                            <artifactId>atlassian-plugins-framework-bundles</artifactId>
                            <type>zip</type>
                            <classifier>${confluence.project.plugins.spring.classifier}</classifier>
                            <targetPath>WEB-INF/osgi-framework-bundles</targetPath>
                        </overlay>
                    </overlays>
                    <warSourceExcludes>**/*.jsp</warSourceExcludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <executions>
                    <execution>
                        <id>clean-web-inf-lib</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets>
                                <fileset>
                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib</directory>
                                    <includes>
                                        <include>*</include>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                    <execution>
                        <id>clean-bundled-plugins</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets>
                                <fileset>
                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF/atlassian-bundled-plugins</directory>
                                    <includes>
                                        <include>*</include>
                                    </includes>
                                </fileset>
                                <fileset>
                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF/atlassian-bundled-plugins-setup</directory>
                                    <includes>
                                        <include>*</include>
                                    </includes>
                                </fileset>
                                <fileset>
                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF/osgi-framework-bundles</directory>
                                    <includes>
                                        <include>*</include>
                                    </includes>
                                </fileset>
                                <fileset>
                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF/packages</directory>
                                    <includes>
                                        <include>*</include>
                                    </includes>
                                </fileset>
                                <fileset>
                                    <directory>${project.build.directory}/war/work</directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-packaged-artifacts</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/packages</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian</groupId>
                                    <artifactId>synchrony-standalone</artifactId>
                                    <type>jar</type>
                                    <destFileName>synchrony-standalone.jar</destFileName>
                                    <overWrite>true</overWrite>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Writes the output of the dependency:list goal to a file for later processing -->
                        <id>generate-dependency-report</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>list</goal>
                        </goals>
                        <configuration>
                            <sort>true</sort>
                            <includeScope>runtime</includeScope>
                            <outputFile>${project.build.directory}/dependency-report.txt</outputFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <!--
                        Takes the output of the maven dependency:list goal generated in an earlier phase, and extracts
                        a list of Maven dependency GAVs to be included in the war. This is intended for use by AMPS,
                        which needs to know if H2/HSQL are included in the WAR or not.
                        -->
                        <id>generate-bundled-libs-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <properties>
                                <inputFile>${project.build.directory}/dependency-report.txt</inputFile>
                                <outputFile>${project.build.directory}/confluence/META-INF/maven/bundled-libs.txt</outputFile>
                            </properties>
                            <source>${project.basedir}/src/etc/process-maven-dependency-list.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>jspc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-jsp</id>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/webapp</sourceDirectory>
                            <compilerSourceVM>${maven.compiler.source}</compilerSourceVM>
                            <compilerTargetVM>${maven.compiler.target}</compilerTargetVM>
                        </configuration>
                        <goals>
                            <goal>jspc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>bundled-plugins-libraries</id>
            <activation>
                <property>
                    <name>!skipBundledPluginsLibrary</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.confluence</groupId>
                    <artifactId>confluence-bundled-plugins-setup-library</artifactId>
                    <version>${project.version}</version>
                    <type>war</type>
                </dependency>
                <dependency>
                    <groupId>com.atlassian.confluence</groupId>
                    <artifactId>confluence-bundled-plugins-external-library</artifactId>
                    <version>${project.version}</version>
                    <type>war</type>
                </dependency>
                <dependency>
                    <groupId>com.atlassian.confluence</groupId>
                    <artifactId>confluence-bundled-plugins-library</artifactId>
                    <version>${project.version}</version>
                    <type>war</type>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>third-party-licensing</id>
            <activation>
                <property>
                    <name>enable.third.party.licensing</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-licensing-bom-processor-plugin</artifactId>
                        <version>0.3</version>
                        <executions>
                            <execution>
                                <id>generate-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <configuration>
                                    <bom>${thirdpartylicensing.bom}</bom>
                                    <template>src/main/resources/lgplTemplate.soy</template>
                                    <templateName>Confluence.Build.Generate.licenseTemplates</templateName>
                                    <output>${project.build.directory}/confluence/about/lgpl-libs.vm</output>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>disable-war</id>
            <activation>
                <property>
                    <name>disable.war</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-war-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>default-war</id>
                                    <phase>none</phase>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-install-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>default-install</id>
                                    <phase>none</phase>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>bundle-h2</id>
            <dependencies>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>errorprone</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>jspc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- TODO: CONFSRVDEV-29349 jspc-maven-plugin breaks certain builds -->
                                <id>compile-jsp</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>test-coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>jspc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- TODO: CONFSRVDEV-29349 jspc-maven-plugin breaks certain builds -->
                                <id>compile-jsp</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deprecation-report</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>jspc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- TODO: CONFSRVDEV-29349 jspc-maven-plugin breaks certain builds -->
                                <id>compile-jsp</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>jspc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- TODO: CONFSRVDEV-29349 jspc-maven-plugin breaks certain builds -->
                                <id>compile-jsp</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>restdoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>jspc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <!-- TODO: CONFSRVDEV-29349 jspc-maven-plugin breaks certain builds -->
                                <id>compile-jsp</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
