<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.mttkay.memento</groupId>
    <artifactId>memento-project</artifactId>
    <version>0.2</version>
    <packaging>pom</packaging>

    <name>Memento</name>
    <description>
        Memento is an annotation processor for Android that gives your activities a memory. It introduces the @Retain
        annotation, which allows you to retain arbitrary fields of an activity across configuration changes in a simple
        and type-safe manner.
    </description>
    <url>https://github.com/mttkay/memento</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Matthias Käppler</name>
            <email>m.kaeppler@gmail.com</email>
            <url>https://mttkay.github.io</url>
            <organization>SoundCloud Ltd.</organization>
            <organizationUrl>http://www.soundcloud.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/mttkay/memento</url>
        <connection>scm:git:git://github.com/mttkay/memento.git</connection>
        <developerConnection>scm:git:git@github.com:mttkay/memento.git</developerConnection>
      <tag>0.2</tag>
  </scm>

    <modules>
        <module>memento-processor</module>
        <module>memento</module>
    </modules>

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

        <!-- Compilation -->
        <java.version>1.6</java.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.android</groupId>
                <artifactId>android</artifactId>
                <version>4.1.1.4</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.android</groupId>
                <artifactId>support-v4</artifactId>
                <version>r13</version>
                <scope>provided</scope>
            </dependency>
            <!-- TESTING -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.4.8</version>
                <extensions>true</extensions>
                <inherited>false</inherited>
                <configuration>
                    <serverId>sonatype-nexus-staging</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <stagingProfileId>f6ddc5bd1e3c9</stagingProfileId>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- We want to deploy the artifact to a staging location for perusal -->
                    <!--           <plugin>
                                <inherited>true</inherited>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-deploy-plugin</artifactId>
                                <configuration>
                                  <updateReleaseInfo>true</updateReleaseInfo>
                                </configuration>
                              </plugin> -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</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.9</version>
                        <configuration>
                            <encoding>${project.build.sourceEncoding}</encoding>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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