<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright 2013-2016 Grzegorz Slowikowski (gslowikowski at gmail dot com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<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>
    <groupId>com.dipuce</groupId>
    <artifactId>iron-cache-play2_${scala.package.version}</artifactId>
    <version>2.0.0</version>
    <packaging>play2</packaging>

    <name>Iron Cache Play2 Plugin</name>
    <description>A play framework Cache plugin for Iron Cache from Iron.io</description>
    <url>https://github.com/dipuce/iron-cache-play2</url>

    <issueManagement>
        <url>https://github.com/dipuce/iron-cache-play2/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/dipuce/iron-cache-play2</url>
        <connection>scm:git:git://github.com/dipuce/iron-cache-play2.git</connection>
        <developerConnection>scm:git:git@github.com:dipuce/iron-cache-play2.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <email>mike@dipuce.com</email>
            <name>Mike Garrett</name>
            <url>https://github.com/tmwtmp100</url>
            <id>tmwtmp100</id>
        </developer>
    </developers>

    <organization>
        <name>Dipuce LLC</name>
        <url>http://www.dipuce.com</url>
    </organization>

    <repositories>
        <repository>
            <id>typesafe</id>
            <name>Typesafe - releases</name>
            <url>https://dl.bintray.com/typesafe/maven-releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <play2.version>2.1.5</play2.version>
        <scala.version>2.10.4</scala.version>

        <jar.plugin.version>2.6</jar.plugin.version>
        <surefire.plugin.version>2.19.1</surefire.plugin.version>

        <play2.plugin.version>1.0.0-beta4</play2.plugin.version>
        <sbt-compiler.plugin.version>1.0.0-beta7</sbt-compiler.plugin.version>
        <scala.package.version>2.10</scala.package.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <dependency>
            <groupId>play</groupId>
            <artifactId>play_${scala.package.version}</artifactId>
            <version>${play2.version}</version>
        </dependency>

        <dependency>
            <groupId>play</groupId>
            <artifactId>play-test_${scala.package.version}</artifactId>
            <version>${play2.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.package.version}</artifactId>
            <version>2.2.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <sourceDirectory>${basedir}/app</sourceDirectory>
        <testSourceDirectory>${basedir}/test</testSourceDirectory>
        <resources>
            <resource>
                <directory>${basedir}/conf</directory>
            </resource>
            <resource>
                <directory>${basedir}/public</directory>
                <targetPath>public</targetPath>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>com.google.code.play2-maven-plugin</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>${play2.plugin.version}</version>
                <extensions>true</extensions>
            </plugin>

            <plugin>
                <groupId>com.google.code.sbt-compiler-maven-plugin</groupId>
                <artifactId>sbt-compiler-maven-plugin</artifactId>
                <version>${sbt-compiler.plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*Spec.java</include>
                    </includes>
                    <excludes>
                        <!--<exclude>test/IntegrationSpec.java</exclude>-->
                        <exclude>test/IronSpec.scala</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>

        <profile>
            <id>it</id> <!-- run integration tests -->

            <dependencies>
                <dependency>
                    <groupId>commons-codec</groupId>
                    <artifactId>commons-codec</artifactId>
                    <version>1.6</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                    <version>4.1.3</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                    <version>4.1.2</version>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>x</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>