<?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>closedsource-pom</artifactId>
        <version>6.0.7</version>
    </parent>

    <groupId>com.atlassian.confluence.plugins</groupId>
    <artifactId>confluence-files-parent</artifactId>
    <version>3.0.8</version>
    <packaging>pom</packaging>

    <name>Confluence Files</name>
    <description>Provide the new file api support for confluence upload</description>
    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>
    <licenses>
        <license>
            <name>Atlassian 3.0 End User License Agreement</name>
            <url>http://www.atlassian.com/end-user-agreement/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>plugin</module>
        <module>integration-tests</module>
    </modules>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-files.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-files.git</developerConnection>
        <url>https://stash.atlassian.com/projects/CONFSERVER/repos/confluence-files</url>
        <tag>confluence-files-parent-3.0.8</tag>
    </scm>

    <properties>
        <confluence.version>6.13.18</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <xvfb.enable>false</xvfb.enable>
        <xvfb.display>:0</xvfb.display>
        <http.port>1990</http.port>
        <http.confluence.port>${http.port}</http.confluence.port>
        <context.confluence.path>confluence</context.confluence.path>
        <baseurl.confluence>http://localhost:${http.confluence.port}/${context.confluence.path}</baseurl.confluence>

        <failOnMilestoneOrReleaseCandidateDeps>true</failOnMilestoneOrReleaseCandidateDeps>

        <amps8.version>8.2.1</amps8.version>

        <atlassian.spring.scanner.version>2.1.10</atlassian.spring.scanner.version>

        <confluence.document.conversion.library.version>4.0.5</confluence.document.conversion.library.version>
        <confluence.mentions.version>3.1.14</confluence.mentions.version>
        <containerId>tomcat9x</containerId>
        <document.conversion.library.version>2.0.9</document.conversion.library.version>

        <mockito.version>2.28.2</mockito.version>
        <byte-buddy.version>1.9.13</byte-buddy.version>

        <jvm.args.custom /> <!-- Allows to specify custom arguments in build scripts -->
        <jvm.args.xmx>1024m</jvm.args.xmx>
        <jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom}</jvm.args>

        <!-- For the flaky test reporter profile. -->
        <!-- override the versions of the listed plugins in amps -->
        <version.override.set>maven-failsafe-plugin</version.override.set>
        <!-- failsafe 2.20.1 or newer required for rerun support. Double check the version from the parent-pom -->
        <surefire.version>2.22.2</surefire.version>
        <download.maven.plugin.version>1.3.0</download.maven.plugin.version>

        <javadoc.plugin.version>3.1.1</javadoc.plugin.version>
    </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-files</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-files</artifactId>
                <version>${project.version}</version>
                <classifier>test</classifier>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <!-- TODO remove version override when on Confluence 7.0.1 or higher -->
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-agent</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-dep</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-document-conversion-library</artifactId>
                <version>${confluence.document.conversion.library.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>document-conversion-library</artifactId>
                <version>${document.conversion.library.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-mentions-plugin</artifactId>
                <version>${confluence.mentions.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${javadoc.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <verbose>false</verbose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>confluence-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${confluence.version}</productVersion>
                    <productDataVersion>${confluence.data.version}</productDataVersion>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Export-Package>
                            com.atlassian.confluence.plugins.files.api,
                            com.atlassian.confluence.plugins.files.api.services,
                            com.atlassian.confluence.plugins.files.entities,
                            com.atlassian.confluence.plugins.files.event,
                            com.atlassian.confluence.plugins.files.manager
                        </Export-Package>
                        <Import-Package>
                            *
                        </Import-Package>
                    </instructions>
                    <skipManifestValidation>true</skipManifestValidation>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
