<?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.graphhopper</groupId>
    <artifactId>graphhopper-parent</artifactId>
    <name>GraphHopper Parent Project</name>
    <version>0.13.0-pre2</version>
    <packaging>pom</packaging>
    <url>https://www.graphhopper.com</url>
    <inceptionYear>2012</inceptionYear>
    <description>Super pom of GraphHopper, the fast and flexible routing engine</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <slf4j.version>1.7.25</slf4j.version>
        <log4j.version>1.2.17</log4j.version>
        <commons-compress.version>1.15</commons-compress.version>
        <jackson.version>2.9.6</jackson.version>
        <dropwizard.version>1.3.5</dropwizard.version>
        <directions-api-client.version>0.10.1-3</directions-api-client.version>
        <maven.compiler.target>1.8</maven.compiler.target>

        <org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
        <org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>
        <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>8</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>
        <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>100</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>
        <org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
        <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantIfBraces>LEAVE_ALONE</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantIfBraces>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocExceptionDescriptions>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocExceptionDescriptions>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocParameterDescriptions>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocParameterDescriptions>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader>0</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapCommentText>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapCommentText>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapOneLineComment>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapOneLineComment>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineFor>
        <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineTryResources>
    </properties>

    <scm>
        <connection>scm:git:git@github.com:graphhopper/graphhopper.git</connection>
        <developerConnection>scm:git:git@github.com:graphhopper/graphhopper.git</developerConnection>
        <url>git@github.com:graphhopper/graphhopper.git</url>
    </scm>

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

    <developers>
        <developer>
            <id>karussell</id>
            <name>Peter Karich</name>
            <email>my.name@graphhopper.com</email>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>GraphHopper</name>
            <subscribe>https://discuss.graphhopper.com/</subscribe>
            <archive>https://discuss.graphhopper.com/</archive>
        </mailingList>
    </mailingLists>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/graphhopper/graphhopper/issues</url>
    </issueManagement>

    <modules>
        <module>core</module>
        <module>reader-osm</module>
        <module>isochrone</module>
        <module>reader-gtfs</module>
        <module>tools</module>
        <module>web-bundle</module>
        <module>api</module>
        <module>web-api</module>
        <module>web</module>
        <module>client-hc</module>
    </modules>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <!--
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                    <compilerArgument>-Xlint:deprecation</compilerArgument>
                    -->

                    <!-- suppress warning about Unsafe functionality -->
                    <compilerArgument>-XDignore.symbol.file</compilerArgument>
                    <fork>true</fork>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <!-- to run single tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.1</version>
                <configuration>
                    <argLine>-Xmx100m -Xms100m</argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <!-- example https://github.com/tananaev/traccar/blob/master/checkstyle.xml -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <configLocation>${user.dir}/core/files/checkstyle.xml</configLocation>
                    <failsOnError>true</failsOnError>
                    <consoleOutput>true</consoleOutput>
                    <linkXRef>false</linkXRef>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.11</version>
                <configuration>
                    <maxRank>4</maxRank>
                    <failOnError>true</failOnError>
                    <excludeFilterFile>core/files/spotbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.7</version>
                <!-- e.g. under core/target/site/pmd.html
                <configuration>
                    <format>html</format>
                </configuration>
                -->
            </plugin>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
                <version>2.6</version>
                <configuration>
                    <!--
                      if the used Java version is too new,
                      don't fail, just do nothing:
                    -->
                    <failOnUnsupportedJava>false</failOnUnsupportedJava>
                    <bundledSignatures>
                        <!--
                          This will automatically choose the right
                          signatures based on 'maven.compiler.target':
                        -->
                        <bundledSignature>jdk-unsafe</bundledSignature>
                        <bundledSignature>jdk-deprecated</bundledSignature>
                        <!-- disallow undocumented classes like sun.misc.Unsafe: -->
                        <bundledSignature>jdk-non-portable</bundledSignature>
                    </bundledSignatures>
                    <excludes>
                        <exclude>
                            com/graphhopper/storage/UnsafeDataAccess.class
                        </exclude>
                        <!-- Has a couple of issues with the FileWriter -->
                        <exclude>
                            com/graphhopper/tools/Measurement.class
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <!-- mvn clean deploy -P release -->
    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</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-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <configuration>
                          <quiet>true</quiet>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>include-android</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <modules>
                <module>android/app</module>
            </modules>
        </profile>

    </profiles>

</project>
