<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>7.0.0</version>
    </parent>
    <groupId>com.atlassian.plugins</groupId>
    <artifactId>atlassian-plugins-webresource-parent</artifactId>
    <version>8.0.3</version>
    <packaging>pom</packaging>
    <name>Atlassian Plugins - Web Resources - Parent</name>
    <licenses>
        <license>
            <name>BSD</name>
            <url>http://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <modules>
        <module>atlassian-plugins-webresource</module>
        <module>atlassian-plugins-webresource-api</module>
        <module>atlassian-plugins-webresource-plugin</module>
        <module>atlassian-plugins-webresource-rest</module>
        <module>atlassian-plugins-webresource-spi</module>
        <module>atlassian-plugins-webresource-tests</module>
    </modules>
    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/dc-platform.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/dc-platform.git</developerConnection>
        <tag>atlassian-plugins-webresource-8.0.3</tag>
        <url>https://bitbucket.org/atlassian/dc-platform</url>
    </scm>
    <issueManagement>
        <system>JIRA</system>
        <url>https://ecosystem.atlassian.net/browse/PLUGWEB</url>
    </issueManagement>
    <ciManagement>
        <system>Bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/PLUGWEBR</url>
    </ciManagement>
    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <amps.version>9.7.0</amps.version>
        <frontend.install.cmd>install --frozen-lockfile</frontend.install.cmd>
        <frontend.maven.plugin.version>1.15.1-atlassian-6</frontend.maven.plugin.version>
        <hamcrest.version>2.2</hamcrest.version>
        <jacoco.it.argLine />
        <jacoco.report.file>sonar-aggregator/target/site/jacoco-aggregate/jacoco.xml</jacoco.report.file>
        <jacoco.ut.argLine />
        <jacoco.version>0.8.12</jacoco.version>
        <jgrapht.version>1.4.0</jgrapht.version>
        <junit.version>4.13.2</junit.version>
        <maven.javadoc.plugin.version>3.6.3</maven.javadoc.plugin.version>
        <mockito.version>2.28.2</mockito.version>
        <node.path>${project.basedir}/.node</node.path>
        <platform.version>8.1.13</platform.version>
        <skipTests>false</skipTests>
        <skipUTs>${skipTests}</skipUTs>
        <sla.api.osgi.version>4.0.0</sla.api.osgi.version>
        <sonar.coverage.exclusions>atlassian-plugins-webresource-tests/**</sonar.coverage.exclusions>
        <sourcemap.version>2.0.0</sourcemap.version>
        <swagger.version>2.2.27</swagger.version>
        <urlrewritefilter.version>5.1.3</urlrewritefilter.version>
        <wrm.api.compat.version>3.0</wrm.api.compat.version>
        <yarn.version>v1.22.15</yarn.version>
        <atlassian.security.headers>7.0.0-m001</atlassian.security.headers>
        <!-- we want to catch enforcement issues in dev loop
        otherwise will only know about them on release
        when SNAPSHOT suffix is removed for the release -->
        <banVersionDeps.noFailSnapshots>false</banVersionDeps.noFailSnapshots>
        <container.tomcat.version>tomcat10x</container.tomcat.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-deprecated-public-api</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-internal-api</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-public-api</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-test-resources</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
            <!-- Needs -webfragment for Conditions. Ideally, conditions should be
                 moved into plugins core as they are not webfragment-specific -->
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-webresource-rest</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-library</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jgrapht</groupId>
                <artifactId>jgrapht-core</artifactId>
                <version>${jgrapht.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jgrapht</groupId>
                <artifactId>jgrapht-io</artifactId>
                <version>${jgrapht.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.tuckey</groupId>
                <artifactId>urlrewritefilter</artifactId>
                <version>${urlrewritefilter.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${frontend.maven.plugin.version}</version>
                    <configuration>
                        <yarnVersion>${yarn.version}</yarnVersion>
                        <installDirectory>${node.path}</installDirectory>
                        <npmInheritsProxyConfigFromMaven>true</npmInheritsProxyConfigFromMaven>
                        <serverId>maven-atlassian-com</serverId>
                        <yarnDownloadRoot>https://packages.atlassian.com/artifactory/yarn-dist/</yarnDownloadRoot>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <tagNameFormat>atlassian-plugins-webresource-@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>01-install-binaries</id>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                        <phase>initialize</phase>
                        <inherited>false</inherited>
                    </execution>
                    <execution>
                        <id>02-install-deps</id>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <phase>initialize</phase>
                        <inherited>false</inherited>
                        <configuration>
                            <arguments>${frontend.install.cmd}</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.atlassian.maven.enforcer</groupId>
                        <artifactId>maven-enforcer-rules</artifactId>
                        <version>1.5.20</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>ban-milestones-and-release-candidates</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banVersionDeps>
                                    <!-- Ensure we can release, even if our provided dependencies are milestones. -->
                                    <!-- This works around the issue of circular dependencies we have in Platform. -->
                                    <ignoreProvided>true</ignoreProvided>
                                </banVersionDeps>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <skipTests>${skipTests}</skipTests>
                    <skipITs>${skipITs}</skipITs>
                </configuration>
                <executions>
                    <execution>
                        <id>run-integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                        <phase>integration-test</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>project.version</name>
                            <value>${project.version}</value>
                        </property>
                    </systemProperties>
                    <argLine>@{jacoco.ut.argLine}  --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED</argLine>
                    <skipTests>${skipUTs}</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.43.0</version>
                <configuration>
                    <java>
                        <palantirJavaFormat>
                            <version>2.74.0</version>
                        </palantirJavaFormat>
                        <importOrder>
                            <wildcardsLast>true</wildcardsLast>
                            <order>java|javax|jakarta,lombok,org.spring|org|com|io,,com.atlassian,com.atlassian.beacon|\#,\#com.atlassian</order>
                        </importOrder>
                        <removeUnusedImports />
                    </java>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <profile>
            <!-- I defined them here so they're separate from other properties and don't get lost in the alphabetical sort. -->
            <id>all-product-versions</id>
            <activation>
                <property>
                    <name>!refapp.version</name>
                </property>
            </activation>
            <properties>
                <bamboo.version>12.0.0-m126</bamboo.version>
                <bitbucket.version>10.0.0-m8</bitbucket.version>
                <confluence.version>10.0.0-CONFSRVDEV-38975-m003</confluence.version>
                <crowd.version>7.0.0-platform-7-QR20250725084530</crowd.version>
                <jira.version>11.0.0-QR-20250526092936</jira.version>
                <refapp.version>${platform.version}</refapp.version>
            </properties>
        </profile>
        <profile>
            <id>jacoco</id>
            <properties>
                <jacoco.include.pattern>com/atlassian/**</jacoco.include.pattern>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <argLine>@{jacoco.it.argLine}</argLine>
                            <trimStackTrace>false</trimStackTrace>
                        </configuration>
                    </plugin>
                    <!-- Code coverage -->
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco.version}</version>
                        <executions>
                            <execution>
                                <id>agent-for-ut</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.ut.argLine</propertyName>
                                    <includes>
                                        <include>${jacoco.include.pattern}</include>
                                    </includes>
                                </configuration>
                            </execution>
                            <execution>
                                <id>agent-for-it</id>
                                <goals>
                                    <goal>prepare-agent-integration</goal>
                                </goals>
                                <phase>initialize</phase>
                                <configuration>
                                    <propertyName>jacoco.it.argLine</propertyName>
                                    <includes>
                                        <include>${jacoco.include.pattern}</include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>