<?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>no.kodeworks</groupId>
    <artifactId>kvarg</artifactId>
    <version>0.6</version>
    <name>kvarg</name>
    <inceptionYear>2016</inceptionYear>
    <description>Kvarg</description>
    <url>https://gitlab.com/kodeworks/kvarg</url>
    <packaging>pom</packaging>

    <properties>
        <akka-http.version>10.1.5</akka-http.version>
        <akka-http-circe.version>1.17.0</akka-http-circe.version>
        <akka.version>2.5.17</akka.version>
        <circe.version>0.10.1</circe.version>
        <commons-lang3.version>3.8.1</commons-lang3.version>
        <commons-codec.version>1.11</commons-codec.version>
        <config.version>1.3.1</config.version>
        <fastparse.version>2.0.5</fastparse.version>
        <h2.version>1.4.197</h2.version>
        <junit.version>4.12</junit.version>
        <kittens.version>1.2.0</kittens.version>
        <ldapsdk.version>4.0.8</ldapsdk.version>
        <logback.version>1.2.3</logback.version>
        <maven-assembly-plugin.version>3.0.0</maven-assembly-plugin.version>
        <maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
        <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <mouse.version>0.19</mouse.version>
        <mysql-connector-java.version>5.1.38</mysql-connector-java.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <scala.version.major>2.12</scala.version.major>
        <scala.version>${scala.version.major}.6</scala.version>
        <scala.typelevel.version>${scala.version}-bin-typelevel-4</scala.typelevel.version>
        <scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
        <scalamacros.version>2.1.1</scalamacros.version>
        <scalatest.version>3.2.0-SNAP10</scalatest.version>
        <shapeless.version>2.3.3</shapeless.version>
        <slf4j.version>1.7.25</slf4j.version>
        <slick.version>3.2.3</slick.version>
        <slickless.version>0.3.3</slickless.version>
        <sourcecode.version>0.1.5</sourcecode.version>
        <env>dev</env>
    </properties>

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

    <developers>
        <developer>
            <name>Eirik Larsen</name>
            <email>eirik.larsen@kodeworks.com</email>
            <organization>Kodeworks</organization>
            <organizationUrl>http://kodeworks.no</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:ssh://gitlab.com/kodeworks/kvarg.git</connection>
        <developerConnection>scm:git:ssh://gitlab.com/kodeworks/kvarg</developerConnection>
        <url>https://gitlab.com/kodeworks/kvarg</url>
    </scm>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compile</goal>
                            <goal>add-source</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>doc-jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!--<scalaOrganization>org.typelevel</scalaOrganization>-->
                    <!--<scalaVersion>${scala.typelevel.version}</scalaVersion>-->
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <!--<arg>-Xlog-implicits</arg>-->
                        <arg>-language:experimental.macros</arg>
                        <!--<arg>-feature</arg>-->
                        <!--<arg>-Yinduction-heuristics</arg>-->
                        <!--<arg>-Ywarn-extra-implicit</arg>-->
                        <!--<arg>-Ywarn-inaccessible</arg>-->
                        <!--<arg>-Ywarn-infer-any</arg>-->
                        <!--<arg>-Ywarn-nullary-override</arg>-->
                        <!--<arg>-Ywarn-nullary-unit</arg>-->
                        <!--<arg>-Ywarn-numeric-widen</arg>-->
                        <!--<arg>-Ywarn-unused:implicits</arg>-->
                        <!--<arg>-Ywarn-unused:imports</arg>-->
                        <!--<arg>-Ywarn-unused:locals</arg>-->
                        <!--<arg>-Ywarn-unused:params</arg>-->
                        <!--<arg>-Ywarn-unused:patvars</arg>-->
                        <!--<arg>-Ywarn-unused:privates</arg>-->
                        <!--<arg>-Ywarn-value-discard</arg>-->
                    </args>
                    <jvmArgs>
                        <jvmArg>-Xss512m</jvmArg>
                        <jvmArg>-Xms256m</jvmArg>
                        <jvmArg>-Xmx4096m</jvmArg>
                    </jvmArgs>
                    <compilerPlugins>
                        <compilerPlugin>
                            <groupId>org.scalamacros</groupId>
                            <artifactId>paradise_${scala.version}</artifactId>
                            <version>${scalamacros.version}</version>
                        </compilerPlugin>
                    </compilerPlugins>
                </configuration>
            </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-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>circe</module>
        <module>cors</module>
        <module>macros</module>
        <module>session</module>
        <module>spnego</module>
        <module>test</module>
        <module>util</module>
    </modules>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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>
                    <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>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
