<?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.ehc.tools</groupId>
    <artifactId>DroidCommons</artifactId>
    <version>1.2.2</version>
    <packaging>jar</packaging>
    <name>DroidCommons</name>
    <description>This is a common library project of EHC organization.</description>
    <url>http://eggheadcreative.com</url>
    <licenses>
        <license>
            <name>DroidCommons</name>
            <url>https://github.com/ehc/DroidCommons/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/ehc/DroidCommons</url>
        <connection>scm:git:https://github.com/ehc/DroidCommons.git</connection>
    </scm>
    <developers>
        <developer>
            <id>ehc</id>
            <name>The EggHead Creative</name>
            <email>developers@eggheadcreative.com</email>
        </developer>
    </developers>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Plugins -->
        <android-maven-plugin.version>3.6.0</android-maven-plugin.version>
        <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
        <api.platform>17</api.platform>

        <!-- Dependencies -->
        <androidannotations.version>4.1.1.4</androidannotations.version>
        <android.version>4.2.2_r2</android.version>
        <androidsupport.version>r7</androidsupport.version>
    </properties>
    <dependencies>

        <dependency>
            <groupId>android</groupId>
            <artifactId>android</artifactId>
            <scope>provided</scope>
            <version>${android.version}</version>
        </dependency>

        <dependency>
            <groupId>android.support</groupId>
            <artifactId>compatibility-v13</artifactId>
            <version>18</version>
        </dependency>

        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>annotations</artifactId>
            <version>${androidannotations.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.bugsnag</groupId>
            <artifactId>bugsnag-android</artifactId>
            <version>2.1.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.android.analytics</groupId>
            <artifactId>analytics</artifactId>
            <version>3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>emma</groupId>
            <artifactId>emma</artifactId>
            <version>2.1.5320</version>
        </dependency>

        <dependency>
            <groupId>org.robolectric</groupId>
            <artifactId>robolectric</artifactId>
            <version>2.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.ocpsoft.prettytime</groupId>
            <artifactId>prettytime</artifactId>
            <version>3.0.2.Final</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>${android-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <sdk>
                        <platform>${api.platform}</platform>
                    </sdk>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <id>copy-string-resources</id>
                        <phase>validate</phase>
                        <!-- when to execute copy operation -->
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>environment/${environment}/</directory>
                                    <includes>
                                        <include>environment.xml</include>
                                        <filtering>true</filtering>
                                    </includes>
                                </resource>
                            </resources>
                            <overwrite>true</overwrite>
                            <outputDirectory>${basedir}/res/values/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>fully.qualified.MainClass</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <!-- this is used for inheritance merges -->
                        <phase>package</phase>
                        <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <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>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--<plugin>-->
            <!--<groupId>org.apache.maven.plugins</groupId>-->
            <!--<artifactId>maven-gpg-plugin</artifactId>-->
            <!--<executions>-->
            <!--<execution>-->
            <!--<id>sign-artifacts</id>-->
            <!--<phase>verify</phase>-->
            <!--<goals>-->
            <!--<goal>sign</goal>-->
            <!--</goals>-->
            <!--</execution>-->
            <!--</executions>-->
            <!--</plugin>-->
        </plugins>
    </build>
    <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>
