<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.bitbucket.server</groupId>
        <artifactId>bitbucket-parent</artifactId>
        <!-- This is the _minimum_ version of Bitbucket Server required to work with this plugin -->
        <!-- Make sure you change the bitbucket.version below as well -->
        <version>4.14.5</version>
    </parent>

    <artifactId>bitbucket-jira-development-integration-parent</artifactId>
    <name>Bitbucket Server - JIRA Development Integration Parent</name>
    <version>3.0.14</version>
    <packaging>pom</packaging>

    <scm>
        <connection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/stash/bitbucket-jira-development-integration-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/stash/bitbucket-jira-development-integration-plugin.git</developerConnection>
        <url>https://stash.dev.internal.atlassian.com/projects/STASH/repos/bitbucket-jira-development-integration-plugin</url>
        <tag>bitbucket-jira-development-integration-parent-3.0.14</tag>
    </scm>

    <properties>
        <!-- Make sure you change the bitbucket-parent version above as well.
             You can't use ${project.parent.version} because sub projects will replace it with *this* project's version -->
        <bitbucket.version>4.14.5</bitbucket.version>
        <!-- This override ensures we can launch the Bitbucket 5.0 Spring Boot based application -->
        <amps.libversion>6.3.0</amps.libversion>
        <!-- This overrides the 2.x version set in the parent, since the tests in this plugin are not
             Mockito 2.x compatible -->
        <mockito.libversion>1.10.19</mockito.libversion>
        <atlassian.dev.status.api.version>2.5.9</atlassian.dev.status.api.version>
        <fusion.schema.version>1.15</fusion.schema.version>
        <nav.links.version>3.3.12</nav.links.version>
        <remote.events.version>1.0.4</remote.events.version>
        <remote.link.aggregator>2.0.11</remote.link.aggregator>
        <scala.plugin.version>3.2.2</scala.plugin.version>
        <scala.version>${scala.version.base}.6</scala.version>
        <scala.version.base>2.11</scala.version.base>
        <scoverage.plugin.version>1.1.1</scoverage.plugin.version>
        <soy.version>3.3.2</soy.version>
        <specs2.version>3.6.3</specs2.version>
        <stp.version>3.5.26</stp.version>
    </properties>

    <modules>
        <module>dao-test</module>
        <module>func-test</module>
        <module>func-test-runner</module>
        <module>func-test-utils</module>
        <module>plugin</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <includes>
                            <include>**/*Test.*</include>
                            <include>**/*Spec.*</include>
                        </includes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala.plugin.version}</version>
                    <executions>
                        <!-- http://davidb.github.io/scala-maven-plugin/example_java.html -->
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>ban-milestones-and-release-candidates</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banVersionDeps>
                                        <excludes>
                                            <exclude>com.atlassian.bitbucket.server:*</exclude>
                                            <exclude>com.atlassian.integration.jira:*</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <executions>
                        <!-- http://davidb.github.io/scala-maven-plugin/example_java.html -->
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.scoverage</groupId>
                    <artifactId>scoverage-maven-plugin</artifactId>
                    <version>${scoverage.plugin.version}</version>
                    <configuration>
                        <!--
                            Scoverage only instruments code when generating a report: `clean scoverage:report -pl plugin`

                            The report isn't configured in the pom because running `mvn site` runs all Bitbucket
                            Server's reports, too, which fail because they aren't configured correctly to run here
                        -->
                        <aggregate>true</aggregate>
                        <highlighting>true</highlighting>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.specs2</groupId>
                <artifactId>specs2-core_${scala.version.base}</artifactId>
                <version>${specs2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.specs2</groupId>
                <artifactId>specs2-mock_${scala.version.base}</artifactId>
                <version>${specs2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.specs2</groupId>
                <artifactId>specs2-junit_${scala.version.base}</artifactId>
                <version>${specs2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.specs2</groupId>
                <artifactId>specs2-scalacheck_${scala.version.base}</artifactId>
                <version>${specs2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.soy</groupId>
                <artifactId>soy-template-plugin</artifactId>
                <version>${soy.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.soy</groupId>
                <artifactId>soy-template-renderer-api</artifactId>
                <version>${soy.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-api</artifactId>
                <version>${ual.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-host</artifactId>
                <version>${ual.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-nav-links-api</artifactId>
                <version>${nav.links.version}</version>
            </dependency>
            <!-- Required for atlassian-nav-links-api to work in Scala -->
            <dependency>
                <groupId>org.joda</groupId>
                <artifactId>joda-convert</artifactId>
                <version>1.7</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
