<?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.stash</groupId>
        <artifactId>stash-parent</artifactId>
        <!-- This is the _minimum_ version of Stash required to work with this plugin -->
        <version>3.5.0</version>
    </parent>

    <artifactId>stash-dev-summary-parent</artifactId>
    <name>Stash Dev Summary Parent</name>
    <version>2.3.6</version>
    <packaging>pom</packaging>

    <properties>
        <applinks.version>4.3.5</applinks.version>
        <devstatus.plugin.version>2.5.2</devstatus.plugin.version>
        <remote.events.version>1.0.4</remote.events.version>
        <fusion.schema.version>1.7</fusion.schema.version>
        <nav.links.version>3.3.12</nav.links.version>
        <remote.link.aggregator>2.0.11</remote.link.aggregator>
        <scala.version>${scala.version.base}.3</scala.version>
        <scala.version.base>2.10</scala.version.base>
        <soy.version>3.1.3</soy.version>
        <specs2.version>2.2.3</specs2.version>
        <!-- Make sure you change the stash-parent version above as well -->
        <stash.version>3.5.0</stash.version>
        <stp.version>3.5.24</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-release-plugin</artifactId>
                    <version>2.4.2</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>1.9</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <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>3.1.6</version>
                    <!--
                        http://stackoverflow.com/questions/336144/building-a-scala-app-with-maven-that-has-java-source-mixed-in
                    -->
                    <executions>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                            <phase>test-compile</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.specs2</groupId>
                <artifactId>specs2_${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>${applinks.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>

    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>net.alchim31.maven</groupId>
                            <artifactId>scala-maven-plugin</artifactId>
                            <version>3.1.6</version>
                            <executions>
                                <execution>
                                    <id>compile</id>
                                    <configuration>
                                        <args>
                                            <args>-usejavacp</args>
                                            <args>-P:scct:projectId:${project.name}</args>
                                            <args>-P:scct:basedir:${project.basedir}</args>
                                        </args>
                                        <compilerPlugins>
                                            <compilerPlugin>
                                                <groupId>reaktor</groupId>
                                                <artifactId>scct_${scala.version.base}</artifactId>
                                                <version>0.2-SNAPSHOT</version>
                                            </compilerPlugin>
                                        </compilerPlugins>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <systemPropertyVariables>
                                    <scct.project.name>${project.name}</scct.project.name>
                                    <scct.coverage.file>${project.build.outputDirectory}/coverage.data</scct.coverage.file>
                                    <scct.report.dir>${project.build.directory}/coverage-report</scct.report.dir>
                                    <scct.source.dir>${project.build.sourceDirectory}</scct.source.dir>
                                </systemPropertyVariables>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>3.2</version>
                        <configuration>
                            <reportPlugins>
                                <plugin>
                                    <groupId>reaktor.scct</groupId>
                                    <artifactId>maven-scct-multiproject-report</artifactId>
                                    <version>2.0-SNAPSHOT</version>
                                </plugin>
                            </reportPlugins>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>reaktor</groupId>
                    <artifactId>scct_${scala.version.base}</artifactId>
                    <version>0.2-SNAPSHOT</version>
                </dependency>
            </dependencies>
            <repositories>
                <repository>
                    <id>scct-repo</id>
                    <url>http://mtkopone.github.com/scct/maven-repo</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>scct-plugin-repo</id>
                    <url>http://mtkopone.github.com/scct/maven-repo</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/STASH/stash-dev-summary-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/STASH/stash-dev-summary-plugin.git</developerConnection>
        <url>https://stash.dev.internal.atlassian.com/projects/STASH/repos/stash-dev-summary-plugin</url>
        <tag>stash-dev-summary-parent-2.3.6</tag>
    </scm>
</project>
