<?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>5.0.29</version>
    </parent>

    <groupId>com.atlassian.confluence.extra</groupId>
    <artifactId>confluence-flyingpdf-plugin-parent</artifactId>
    <version>7.0.7</version>
    <packaging>pom</packaging>

    <name>Confluence PDF Export Parent POM</name>

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

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-pdf-export-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-pdf-export-plugin.git</developerConnection>
        <url>https://stash.atlassian.com/projects/CONFSERVER/repos/confluence-pdf-export-plugin</url>
        <tag>confluence-flyingpdf-plugin-parent-7.0.7</tag>
    </scm>

    <properties>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <atlassian.plugin.key>com.atlassian.confluence.extra.flyingpdf</atlassian.plugin.key>
        <confluence.version>7.5.0-m55</confluence.version>
        <atlassian.product.version>${confluence.version}</atlassian.product.version>
        <atlassian.product.data.version>${atlassian.product.version}</atlassian.product.data.version>
        <flying.saucer.version>9.1.18</flying.saucer.version>
        <openpdf.version>1.2.21</openpdf.version>
        <javax.annotation.version>1.3.2</javax.annotation.version>
        <confluence.plugin.bundled>true</confluence.plugin.bundled>
        <confluence.plugin.install>true</confluence.plugin.install>
        <confluence.jars.to.remove.regex.list>${basedir}/src/test/resources/jar-files-to-remove-from-bundle.txt</confluence.jars.to.remove.regex.list>
        <plugin.testrunner.version>1.1.1</plugin.testrunner.version>
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
        <xvfb.enable>false</xvfb.enable>
        <xvfb.display>:0</xvfb.display>
        <http.port>8080</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>
        <jvm.args.custom />
        <jvm.args.xmx>1g</jvm.args.xmx>
        <jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom}</jvm.args>
        <version.override.set>maven-surefire-plugin,maven-failsafe-plugin</version.override.set>
        <surefire.version>2.22.2</surefire.version>
        <sandbox.disable>false</sandbox.disable>
        <atlassian.spring.scanner.version>2.1.10</atlassian.spring.scanner.version>
        <amps8.version>8.1.0</amps8.version>
        <containerId>tomcat9x</containerId>
        <!-- Must bind to the velocity used by MacroUtils in Confluence core -->
        <velocity.osgi.version>(1.6.4,1.7)</velocity.osgi.version>
        <spring.context.version>5.0.10.RELEASE</spring.context.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${atlassian.product.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.xhtmlrenderer</groupId>
                <artifactId>flying-saucer-core</artifactId>
                <version>${flying.saucer.version}</version>
            </dependency>
            <dependency>
                <groupId>org.xhtmlrenderer</groupId>
                <artifactId>flying-saucer-pdf-openpdf</artifactId>
                <version>${flying.saucer.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.librepdf</groupId>
                <artifactId>openpdf</artifactId>
                <version>${openpdf.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>${javax.annotation.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <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>
                    <!-- Same version as surefire -->
                </plugin>
                <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>
                    <version>${amps8.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>test-with-sandbox</id>
            <properties>
                <sandbox.disable>false</sandbox.disable>
            </properties>
        </profile>
        <profile>
            <id>test-without-sandbox</id>
            <properties>
                <sandbox.disable>true</sandbox.disable>
            </properties>
        </profile>
    </profiles>
</project>
