<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- basic info -->
    <groupId>com.ubirch</groupId>
    <artifactId>event-log-util</artifactId>
    <version>1.2.1</version>
    <name>${project.artifactId}</name>
    <description>Event logger util for the Ubirch Platform</description>
    <url>https://ubirch.com</url>
    <inceptionYear>2018</inceptionYear>

    <organization>
        <name>ubirch GmbH</name>
        <url>https://ubirch.com/</url>
    </organization>
    <developers>
        <developer>
            <name>Carlos Sánchez</name>
            <email>carlos.sanchez@ubirch.com</email>
            <organization>ubirch GmbH</organization>
            <organizationUrl>https://ubirch.com/</organizationUrl>
        </developer>
        <developer>
            <name>Michael Merz</name>
            <email>michael.merz@ubirch.com</email>
            <organization>ubirch GmbH</organization>
            <organizationUrl>https://ubirch.com/</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/ubirch/ubirch-event-log.git</connection>
        <developerConnection>scm:git:git@github.com:ubirch/ubirch-event-log.git</developerConnection>
        <url>https://github.com/ubirch/ubirch-event-log</url>
        <tag>event-log-util-1.2.1</tag>
    </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>

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

    <properties>
        <scala.version>2.12.6</scala.version>
        <scala.compat.version>2.12</scala.compat.version>
        <scalatest.version>3.0.5</scalatest.version>

        <!-- versions -->

        <io.monix.version>2.3.2</io.monix.version>

        <!-- plugins -->
        <scala-maven-plugin.version>3.3.2</scala-maven-plugin.version>
        <maven-surefire-plugin.version>2.7</maven-surefire-plugin.version>
        <scalatest-maven-plugin.version>1.0</scalatest-maven-plugin.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <json4s-native.version>3.6.0</json4s-native.version>
        <json4s-jackson.version>3.6.1</json4s-jackson.version>
        <json4s-ext>3.6.0</json4s-ext>
        <!-- plugins -->

        <!-- versions -->

    </properties>

    <dependencies>

        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>1.3.2</version>
        </dependency>

        <dependency>
            <groupId>io.monix</groupId>
            <artifactId>monix_${scala.compat.version}</artifactId>
            <version>${io.monix.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.json4s</groupId>
            <artifactId>json4s-native_${scala.compat.version}</artifactId>
            <version>${json4s-native.version}</version>
        </dependency>

        <dependency>
            <groupId>org.json4s</groupId>
            <artifactId>json4s-jackson_${scala.compat.version}</artifactId>
            <version>${json4s-jackson.version}</version>
        </dependency>

        <dependency>
            <groupId>org.json4s</groupId>
            <artifactId>json4s-ext_${scala.compat.version}</artifactId>
            <version>${json4s-ext}</version>
        </dependency>

        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.compat.version}</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <plugins>

            <plugin>
                <!-- see http://davidb.github.com/scala-maven-plugin -->
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                            <goal>add-source</goal>
                            <goal>doc-jar</goal>
                        </goals>
                        <configuration>
                            <args>
                                <arg>-dependencyfile</arg>
                                <arg>${project.build.directory}/.scala_dependencies</arg>
                            </args>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- enable scalatest -->
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>${scalatest-maven-plugin.version}</version>
                <configuration>
                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                    <junitxml>.</junitxml>
                    <filereports>WDF TestSuite.txt</filereports>
                </configuration>
                <executions>
                    <execution>
                        <id>test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- build source and documentation and gpg signing only for release -->
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</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>2.9.1</version>
                        <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>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyname>7a672196888951a7cccdc200810233050cd1c9f0</keyname>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
