<?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.pom</groupId>
        <artifactId>atlassian-closedsource-pom</artifactId>
        <version>41</version>
    </parent>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/remote-link-aggregator.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/remote-link-aggregator.git</developerConnection>
        <url>https://bitbucket.org/atlassian/remote-link-aggregator</url>
      <tag>remote-link-aggregator-2.0.14</tag>
  </scm>

    <groupId>com.atlassian.plugins</groupId>
    <artifactId>remote-link-aggregator</artifactId>
    <version>2.0.14</version>
    <packaging>pom</packaging>
    <licenses>
        <license>
            <name>Atlassian End User License</name>
            <url>https://www.atlassian.com/end-user-agreement/</url>
            <comments>Atlassian 3.0 End User License Agreement</comments>
        </license>
    </licenses>

    <name>Remote Link Aggregator</name>
    <description>Aggregates counts of outbound links to a given external entity.</description>

    <modules>
        <module>remote-link-aggregator-api</module>
        <module>remote-link-aggregator-plugin</module>
        <module>jira-remote-link-aggregator-plugin</module>
    </modules>

    <properties>
        <jira.version>6.1.4</jira.version>
        <rest.version>2.8.0-m8</rest.version>
        <amps.version>5.0.14</amps.version>
        <atlassian-plugin.description>${project.description}</atlassian-plugin.description>
        <slf4j.version>1.6.4</slf4j.version>
        <atlassian.json.version>0.9</atlassian.json.version>
        <atlassian.util.concurrent>2.4.1</atlassian.util.concurrent>
        <plugins.version>3.0.5</plugins.version>
        <sal.version>2.10.2</sal.version>
        <jsr305.version>1.3.9</jsr305.version>
        <guava.version>11.0.2</guava.version>
        <atlassian.applinks.version>4.0.2</atlassian.applinks.version>
        <atlassian-nav-links.version>3.2.18</atlassian-nav-links.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-dispatcher-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-jira-plugin</artifactId>
                    <version>${amps.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <!-- sensible defaults -->
                        <productVersion>${jira.version}</productVersion>
                        <productDataVersion>${jira.version}</productDataVersion>
                        <extractDependencies>false</extractDependencies>

                        <!-- disable AMPS bloat -->
                        <skipAllPrompts>true</skipAllPrompts>
                        <enableFastdev>false</enableFastdev>
                        <enableDevToolbox>false</enableDevToolbox>
                    </configuration>
                </plugin>
                <plugin>
                    <!-- use local checkout with Git -->
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <localCheckout>true</localCheckout>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.plugins.rest</groupId>
                <artifactId>atlassian-rest-module</artifactId>
                <version>${rest.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${jsr305.version}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile> <!-- Used for snapshots so we don't have caching problems and know which git revision was used -->
            <id>stamp</id>
            <activation>
                <property>
                    <name>!skipCommitIdStamp</name>
                </property>
            </activation>
            <properties>
                <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
                <!-- place the revision and build date in the plugin description -->
                <atlassian-plugin.description>${project.description} (rev: ${git.commit.id.short}, date: ${maven.build.timestamp})</atlassian-plugin.description>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <version>1.2</version>
                        <executions>
                            <execution>
                                <id>get-commit-id</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>create</goal>
                                    <goal>create-timestamp</goal>
                                </goals>
                                <configuration>
                                    <buildNumberPropertyName>git.commit.id.long</buildNumberPropertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>get-short-commit-id</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>create</goal>
                                </goals>
                                <configuration>
                                    <buildNumberPropertyName>git.commit.id.short</buildNumberPropertyName>
                                    <shortRevisionLength>7</shortRevisionLength>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <!-- set the Git commit id -->
                            <revisionOnScmFailure>unknown</revisionOnScmFailure>
                            <getRevisionOnlyOnce>true</getRevisionOnlyOnce>

                            <!-- also set the build timestamp -->
                            <timestampFormat>yyyy-MM-dd'T'HH:mm:ssZ</timestampFormat>
                            <timestampPropertyName>maven.build.timestamp</timestampPropertyName>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.4</version>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Atlassian-Commit-Id>${git.commit.id.long}</Atlassian-Commit-Id>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
