<?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.plugins</groupId>
    <artifactId>confluence-mentions-plugin-parent</artifactId>
    <version>4.2.2</version>
    <packaging>pom</packaging>

    <name>Confluence Mentions Plugin Parent</name>
    <description>This is the parent for the Mentions plugin for Atlassian Confluence.</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>confluence-mentions</module>
        <module>confluence-mentions-integration-test</module>
    </modules>

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

    <properties>
        <confluence.version>7.2.0-CONFSRVDEV-13458-m02</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>

        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>

        <!-- Versions for dependencies that we should inherit from the platform pom but currently don't. START -->
        <confluence-extractor-api-plugin.version>1.0.1</confluence-extractor-api-plugin.version>
        <confluence.notifications.version>9.1.1</confluence.notifications.version>
        <confluence-email-resources.version>5.4.1</confluence-email-resources.version>
        <confluence-previews.version>8.1.4</confluence-previews.version>
        <!-- END -->

        <!-- Versions for Maven plugins START-->
        <amps8.version>8.0.2</amps8.version>
        <containerId>tomcat9x</containerId>
        <webdriver.browser>firefox</webdriver.browser>

        <atlassian.less.version>4.0.0</atlassian.less.version>
        <!-- END -->

        <!--Build-->
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <build.helper.maven.plugin.version>1.8</build.helper.maven.plugin.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>
        <atlassian.dev.mode>false</atlassian.dev.mode>

        <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.0</surefire.version>
        <download.maven.plugin.version>1.3.0</download.maven.plugin.version>

        <maven.jacoco.plugin.version>0.8.3</maven.jacoco.plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <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</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${maven.jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->

                            <dataFile>target/jacoco.exec</dataFile>
                            <!-- Sets the output directory for the code coverage report. -->
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
