<?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/ratelimit.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/ratelimit.git</developerConnection>
        <url>https://bitbucket.org/atlassian/ratelimit</url>
    </scm>

    <groupId>com.atlassian</groupId>
    <artifactId>atlassian-ratelimit</artifactId>
    <version>1.0</version>
    <packaging>jar</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>Atlassian Rate Limit</name>
    <description>A generic rate limiting component</description>

    <properties>
        <scala.version.base>2.10</scala.version.base>
        <scala.version>${scala.version.base}.3</scala.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.scala.plugins</groupId>
            <artifactId>scala-${scala.version.base}-provider-plugin</artifactId>
            <version>0.5</version>
            <scope>provided</scope>
        </dependency>
        <!-- Otherwise BND tools uses version 0.1 and it's too old -->
        <dependency>
            <groupId>com.atlassian.util.concurrent</groupId>
            <artifactId>atlassian-util-concurrent</artifactId>
            <version>2.2.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Needed by Scala -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.joda</groupId>
            <artifactId>joda-convert</artifactId>
            <version>1.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.specs2</groupId>
            <artifactId>specs2_${scala.version.base}</artifactId>
            <version>2.3.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalacheck</groupId>
            <artifactId>scalacheck_${scala.version.base}</artifactId>
            <version>1.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xmx512m -Dfile.encoding=ISO-8859-1 -Duser.language=en -Duser.region=AU</argLine>
                    <excludes>
                        <exclude>**/*$*</exclude>
                        <exclude>it/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>

        <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>
                    <!-- use local checkout with Git -->
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <localCheckout>true</localCheckout>
                    </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>

</project>

