<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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.osmdroid</groupId>
    <artifactId>osmdroid-parent</artifactId>
    <version>4.2</version>
    <packaging>pom</packaging>

    <name>OSMdroid parent</name>
    <description>An Android library to display OpenStreetMap views.</description>
    <url>https://github.com/osmdroid/osmdroid</url>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:osmdroid/osmdroid.git</connection>
        <url>scm:git:git@github.com:osmdroid/osmdroid.git</url>
        <developerConnection>scm:git:git@github.com:osmdroid/osmdroid.git</developerConnection>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/osmdroid/osmdroid/issues</url>
    </issueManagement>

    <developers>
        <!-- TODO -->
        <developer>
            <id>id</id>
            <name>name</name>
            <roles>
                <role>developer</role>
                <role>contributor</role>
                <role>...</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Android included libraries -->
            <dependency>
                <groupId>android</groupId>
                <artifactId>android</artifactId>
                <version>4.3_r2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>android.support</groupId>
                <artifactId>compatibility-v4</artifactId>
                <version>19.1.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.android.maps</groupId>
                <artifactId>maps</artifactId>
                <version>18_r3</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.android.gms</groupId>
                <artifactId>google-play-services</artifactId>
                <type>apklib</type>
                <version>16.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.android.gms</groupId>
                <artifactId>google-play-services</artifactId>
                <type>jar</type>
                <version>16.0.0</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20070829</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>4.0.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.james</groupId>
                <artifactId>apache-mime4j</artifactId>
                <version>0.6</version>
                <scope>provided</scope>
            </dependency>

            <!--  -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-android</artifactId>
                <version>1.6.1-RC1</version>
            </dependency>

            <!-- test dependencies -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.6.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.8.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <sdk>
                            <platform>16</platform>
                        </sdk>
                    </configuration>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.2</version>
                      <executions>
                        <execution>
                          <id>attach-sources</id>
                          <phase>package</phase>
                          <goals><goal>jar-no-fork</goal></goals>
                        </execution>
                      </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.8</version>
                      <executions>
                        <execution>
                          <id>attach-javadocs</id>
                          <phase>package</phase>
                          <goals><goal>jar</goal></goals>
                        </execution>
                      </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jarsigner-plugin</artifactId>
                    <version>1.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <modules>
        <module>osmdroid-android</module>
        <module>osmdroid-android-it</module>
        <module>osmdroid-third-party</module>
        <module>OpenStreetMapViewer</module>
        <module>GoogleWrapperSample</module>
        <module>OSMMapTilePackager</module>
    </modules>

    <profiles>
        <profile>
            <!--  this profile is activated when using 'mvn release:perform' -->
            <!--  it signs artifacts before staging to Sonatype -->
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <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>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jarsigner-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>signing</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>package</phase>
                                <inherited>true</inherited>
                                <configuration>
                                    <archiveDirectory />
                                    <includes>
                                        <include>target/*.apk</include>
                                    </includes>
                                    <keystore>${sign.keystore}</keystore>
                                    <storepass>${sign.storepass}</storepass>
                                    <keypass>${sign.keypass}</keypass>
                                    <alias>${sign.alias}</alias>
                                    <arguments>
                                      <argument>-sigalg</argument><argument>MD5withRSA</argument>
                                      <argument>-digestalg</argument><argument>SHA1</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                        <artifactId>android-maven-plugin</artifactId>
                        <inherited>true</inherited>
                        <executions>
                          <execution>
                            <id>alignApk</id>
                            <phase>install</phase>
                            <goals>
                              <goal>zipalign</goal>
                            </goals>
                          </execution>
                        </executions>
                        <configuration>
                            <zipalign>
                                <verbose>true</verbose>
                                <skip>false</skip>
                            </zipalign>
                            <sign>
                                <debug>false</debug>
                            </sign>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>
</project>
