<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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>it.agilelab</groupId>
    <artifactId>gis.lib</artifactId>
    <version>1.2.0</version>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>Gis Library</description>
    <packaging>jar</packaging>
    <url>https://github.com/agile-lab-dev/GIS.Lib</url>

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

    <repositories>
        <repository>
            <id>geo</id>
            <url>https://repo.osgeo.org/repository/release/</url>
        </repository>
        <repository>
            <id>Central Maven repository</id>
            <name>Central Maven repository https</name>
            <url>https://repo.maven.apache.org/maven2</url>
        </repository>
        <repository>
            <id>Restlet Releases</id>
            <name>Restlet Releases Repository</name>
            <url>http://maven.restlet.com/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:git:github.com:agile-lab-dev/GIS.Lib.git</connection>
        <developerConnection>scm:git:git:github.com:agile-lab-dev/GIS.Lib.git</developerConnection>
        <url>https://github.com/agile-lab-dev/GIS.Lib</url>
    </scm>

    <developers>

        <developer>
            <name>Paolo Platter</name>
            <email>paolo.platter@agilelab.it</email>
            <organization>Agile Lab s.r.l.</organization>
            <organizationUrl>http://www.agilelab.it/</organizationUrl>
        </developer>

        <developer>
            <name>Andrea Latella</name>
            <email>andrea.latella@agilelab.it</email>
            <organization>Agile Lab s.r.l.</organization>
            <organizationUrl>http://www.agilelab.it/</organizationUrl>
        </developer>

        <developer>
            <name>Stefano Samele</name>
            <email>stefano.samele@agilelab.it</email>
            <organization>Agile Lab s.r.l.</organization>
            <organizationUrl>http://www.agilelab.it/</organizationUrl>
        </developer>

    </developers>

    <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>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <scala.version>2.11.2</scala.version>
        <scala.version.major>2.11</scala.version.major>
        <org.slf4j.api.version>1.7.26</org.slf4j.api.version>
        <org.rogach.scallop.version>3.5.1</org.rogach.scallop.version>
        <com.typesafe.config.version>1.2.1</com.typesafe.config.version>
        <org.scalaz.core.version>7.3.2</org.scalaz.core.version>
        <com.github.pureconfig.version>0.12.1</com.github.pureconfig.version>
        <org.datasyslab.jtsplus.version>0.1.0</org.datasyslab.jtsplus.version>
        <org.geotools.shapefile.version>17.2</org.geotools.shapefile.version>
        <org.wololo.jts2geojson.version>0.7.0</org.wololo.jts2geojson.version>
        <com.graphhopper.core.version>0.11.0</com.graphhopper.core.version>
        <com.graphhopper.reader.version>0.11.0</com.graphhopper.reader.version>
        <com.graphhopper.mapmatching.version>0.11.0-4</com.graphhopper.mapmatching.version>
        <com.github.scala-incubator.io.version>0.4.3-1</com.github.scala-incubator.io.version>
        <org.scalatest.version>3.0.4</org.scalatest.version>
        <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
        <maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
        <maven.javadoc.plugin.version>2.9.1</maven.javadoc.plugin.version>
        <nexus.staging.maven.plugin.version>1.6.7</nexus.staging.maven.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j.api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${org.slf4j.api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.rogach</groupId>
            <artifactId>scallop_2.11</artifactId>
            <version>${org.rogach.scallop.version}</version>
        </dependency>

        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${com.typesafe.config.version}</version>
        </dependency>

        <dependency>
            <groupId>org.scalaz</groupId>
            <artifactId>scalaz-core_2.11</artifactId>
            <version>${org.scalaz.core.version}</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/com.github.pureconfig/pureconfig -->
        <dependency>
            <groupId>com.github.pureconfig</groupId>
            <artifactId>pureconfig_2.11</artifactId>
            <version>${com.github.pureconfig.version}</version>
        </dependency>

        <dependency>
            <groupId>org.datasyslab</groupId>
            <artifactId>JTSplus</artifactId>
            <version>${org.datasyslab.jtsplus.version}</version>
        </dependency>

        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-shapefile</artifactId>
            <version>${org.geotools.shapefile.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.vividsolutions</groupId>
                    <artifactId>jts</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.wololo</groupId>
            <artifactId>jts2geojson</artifactId>
            <version>${org.wololo.jts2geojson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.vividsolutions</groupId>
                    <artifactId>jts</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- GraphHopper dependencies -->

        <dependency>
            <groupId>com.graphhopper</groupId>
            <artifactId>graphhopper-core</artifactId>
            <version>${com.graphhopper.core.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.vividsolutions</groupId>
                    <artifactId>jts-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.graphhopper</groupId>
            <artifactId>graphhopper-reader-osm</artifactId>
            <version>${com.graphhopper.reader.version}</version>
        </dependency>

        <dependency>
            <groupId>com.graphhopper</groupId>
            <artifactId>graphhopper-map-matching-core</artifactId>
            <version>${com.graphhopper.mapmatching.version}</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.github.scala-incubator.io/scala-io-file_2.11 -->
        <dependency>
            <groupId>com.github.scala-incubator.io</groupId>
            <artifactId>scala-io-file_2.11</artifactId>
            <version>${com.github.scala-incubator.io.version}</version>
        </dependency>


        <!-- Scala Test -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.11</artifactId>
            <version>${org.scalatest.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>

        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>4.4.0</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-scaladocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>doc-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- To get Javadoc and Source jar files generated, you have to configure the javadoc and source Maven plugins.-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- scalafmt -->
            <plugin>
                <groupId>org.antipathy</groupId>
                <artifactId>mvn-scalafmt_${scala.version.major}</artifactId>
                <version>1.0.1619963427.2a09daa</version>
                <configuration>
                    <configLocation>${project.basedir}/.scalafmt.conf</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- The Maven GPG plugin is used to sign the components with the following configuration. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</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>${nexus.staging.maven.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

        </plugins>

        <resources>
            <resource>
                <directory>src/resource</directory>
            </resource>
        </resources>
    </build>
</project>
  