<?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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.dwolla</groupId>
    <artifactId>dwolla-java-sdk</artifactId>
    <version>2.0.6</version>
    <packaging>jar</packaging>

    <name>dwolla-java-sdk</name>
    <description>Dwolla's Java and Android SDK</description>
    <url>https://docs.dwolla.com</url>

    <organization>
        <name>Dwolla, Inc.</name>
        <url>https://www.dwolla.com/</url>
    </organization>

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <developerConnection>scm:git:ssh://git@github.com/Dwolla/dwolla-java.git</developerConnection>
        <connection>scm:git:ssh://git@github.com/Dwolla/dwolla-java.git</connection>
        <url>https://github.com/Dwolla/dwolla-java</url>
        <tag>dwolla-java-sdk-2.0.6</tag>
    </scm>

    <developers>
        <developer>
            <id>therockstorm</id>
            <name>Rocky Warren</name>
            <email>rocky@dwolla.com</email>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>dwolla-java-release</id>
            <build>
                <plugins>
                    <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-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Compilation -->
        <java.version>1.6</java.version>

        <!-- Dependencies -->
        <retrofit.version>1.9.0</retrofit.version>
        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
        <slf4j.version>1.7.21</slf4j.version>
        <joda-time.version>2.7</joda-time.version>

        <!-- Test Dependencies -->
        <junit.version>4.12</junit.version>
        <mockito-all.version>1.10.19</mockito-all.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.squareup.retrofit</groupId>
            <artifactId>retrofit</artifactId>
            <version>${retrofit.version}</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>${joda-time.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito-all.version}</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>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </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>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- Don't push pre-deployment SCM changes to upstream repo with maven release plugin; if the
                        release/deploy fails, we're stuck with manually fixing up version numbers, git history, etc -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>-Pdwolla-java-release</arguments>
                        <pushChanges>false</pushChanges>
                        <localCheckout>true</localCheckout>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
