<?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.confluence</groupId>
        <artifactId>confluence-plugins</artifactId>
        <version>9.5.4</version>
    </parent>

    <artifactId>confluence-plugins-platform-pom</artifactId>
    <packaging>pom</packaging>

    <name>Confluence Plugins Platform POM</name>
    <description>
    This pom is intended to be used by plugins which are built outside of the scope of the main Confluence project.
        It acts as a way of managing the dependencies of those plugins so that they match the Confluence version.

        It means that the plugins no longer have to manually specify the version of stuff like atlassian-rest-common
        so that it matches the Confluence version, they can just inherit the managed version.

        e.g.<![CDATA[
        <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>
            </dependencies>
        </dependencyManagement>
        ]]></description>

    <dependencyManagement>
        <dependencies>
            <!-- Workaround for plugins depending on JTA 1.1 with the old artifactId. They would otherwise break now
             that core only uses javax.transaction:javax.transaction-api:1.2+ -->
            <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>jta</artifactId>
                <version>1.1</version>
            </dependency>
            <!-- Workaround for plugins that rely on Confluence exporting a junit-dep version. These would otherwise
             break now that core only uses junit:junit:4.12+ -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit-dep</artifactId>
                <version>4.10</version>
            </dependency>
            <!-- Workaround for plugins that rely on Confluence exporting a hamcrest version. These would otherwise
             break now that core only uses org.hamcrest:hamcrest:2.2+ -->
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
            </dependency>
            <!-- Pin the mockito version to allow confluence core to upgrade to later versions without breaking plugins -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>3.12.4</version>
            </dependency>
            <dependency>
                <!-- So not to break plugins which still use the old coordinate and have not migrated to org.osgi:osgi.core -->
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>6.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>${tomcat.artifactId}</artifactId>
                <version>${tomcat.artifact.version}</version>
                <classifier>windows-x64</classifier>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${jakarta.servlet-api.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
