<?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.3</version>
    </parent>
    <groupId>com.atlassian.templaterenderer</groupId>
    <artifactId>atlassian-template-renderer</artifactId>
    <version>7.0.2-b8e9bed5b6b</version>
    <packaging>pom</packaging>
    <name>Atlassian Template Renderer</name>
    <description>API and plugins for easily rendering content from different template engines.</description>
    <licenses>
        <license>
            <name>BSD License</name>
            <url>https://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <modules>
        <module>api</module>
        <module>velocity-common</module>
        <module>velocity-tests</module>
        <module>velocity1.6</module>
        <module>integration-tests</module>
        <module>velocity-scannable</module>
        <module>velocity-allowlist</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>
        <url>https://bitbucket.org/atlassian/dc-platform</url>
        <tag>atlassian-template-renderer-7.0.2-b8e9bed5b6b</tag>
    </scm>
    <issueManagement>
        <system>Jira</system>
        <url>https://ecosystem.atlassian.net/browse/ATR</url>
    </issueManagement>
    <ciManagement>
        <system>Bamboo</system>
        <url>https://ecosystem-bamboo.internal.atlassian.com/browse/ATR</url>
    </ciManagement>
    <properties>
        <maven.compiler.release>21</maven.compiler.release>
        <platform.version>8.0.0-jakarta-m029</platform.version>
        <amps.version>9.3.1</amps.version>
        <refapp.version>${platform.version}</refapp.version>
        <!--    The vanilla version number only to be used for security scanning     -->
        <!--    https://bitbucket.org/atlassian/atlassian-template-renderer/pull-requests/48    -->
        <velocity16.version>1.6.4</velocity16.version>
        <!-- We override the platform versions, but the platform and this should aim for latest -->
        <!-- Maybe one day this will provide a BOM which is then included in Platform.... we can dream -->
        <velocity16.fork.version>1.6.4-atlassian-37</velocity16.fork.version>
        <!-- These should stay roughly in sync with what the Velocity engine uses -->
        <commons-collections.version>3.2.2</commons-collections.version>
        <commons.logging.version>1.3.4</commons.logging.version>
        <commons.pool.version>1.6</commons.pool.version>
        <!-- One day the platform POMs will specify this for us -->
        <felix.osgi.version>1.2.0</felix.osgi.version>
        <!-- Test libs -->
        <system.rules.version>1.19.0</system.rules.version>
        <hamcrest.version>3.0</hamcrest.version>
        <junit.version>4.13.2</junit.version>
        <mockito.version>5.14.0</mockito.version>
        <plugin.testrunner.version>4.0.0-jakarta-m001</plugin.testrunner.version>
        <!-- AMPS still uses 4.12 which doesn't support assertThrows -->
        <junit.servicemix.version>4.13.2_1</junit.servicemix.version>
        <osgi.javaconfig.version>0.6.0</osgi.javaconfig.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <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-internal-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.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-integration-tests</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-velocity-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-velocity16-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-test-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-velocity-tests</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>atlassian-template-renderer-test-runner</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.templaterenderer</groupId>
                <artifactId>velocity-allowlist</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>${velocity16.fork.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
                <version>${osgi.javaconfig.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>${commons-collections.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons.logging.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-pool</groupId>
                <artifactId>commons-pool</artifactId>
                <version>${commons.pool.version}</version>
            </dependency>
            <!-- Test-only dependencies -->
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
                <version>${plugin.testrunner.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-rules</artifactId>
                <version>${system.rules.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>
                <artifactId>org.apache.servicemix.bundles.junit</artifactId>
                <version>${junit.servicemix.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <!-- This only causes problems - particularly when QuickReloading -->
                        <extractDependencies>false</extractDependencies>
                        <!-- We use Swagger in Plat 7 -->
                        <skipRestDocGeneration>true</skipRestDocGeneration>
                        <versionOverrides>
                            <versionOverride>org.apache.servicemix.bundles.junit</versionOverride>
                        </versionOverrides>
                    </configuration>
                </plugin>
                <!-- No, this isn't a plugin, but it's the way someone thought this should work to override in AMPS -->
                <plugin>
                    <groupId>org.apache.servicemix.bundles</groupId>
                    <artifactId>org.apache.servicemix.bundles.junit</artifactId>
                    <version>${junit.servicemix.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <!-- needed for osgi-testrunner -->
                    <configuration>
                        <argLine>--add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <!-- Without this it freezes/hangs -->
                        <detectOfflineLinks>false</detectOfflineLinks>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <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>
                        <!-- TODO remove once parent pom defines this or newer version -->
                        <version>1.5.19</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>ban-milestones-and-release-candidates</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banVersionDeps>
                                    <ignoreProvided>true</ignoreProvided>
                                </banVersionDeps>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </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|jakarta,lombok,org.spring|org|com|io,,com.atlassian,com.atlassian.beacon|\#,\#com.atlassian</order>
                        </importOrder>
                        <removeUnusedImports />
                    </java>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
