<?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>io.honeycomb.libhoney</groupId>
    <artifactId>libhoney-java-parent</artifactId>
    <version>1.3.1</version>
    <packaging>pom</packaging>
    <name>libhoney-java (Parent)</name>
    <description>The Java client for sending events to Honeycomb (parent module)</description>
    <url>https://github.com/honeycombio/libhoney-java</url>
    <inceptionYear>2018</inceptionYear>
    <organization>
        <name>Honeycomb</name>
        <url>https://honeycomb.io</url>
    </organization>
    <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>

    <scm>
        <url>https://github.com/honeycombio/libhoney-java</url>
        <connection>scm:git:git@github.com:honeycombio/libhoney-java.git</connection>
        <developerConnection>scm:git:git@github.com:honeycombio/libhoney-java.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/honeycombio/libhoney-java/issues</url>
    </issueManagement>

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

    <developers>
        <developer>
            <name>Honeycomb</name>
            <email>support@honeycomb.io</email>
            <organization>Honeycomb</organization>
            <organizationUrl>https://honeycomb.io</organizationUrl>
        </developer>
    </developers>

    <properties>
        <dependency.locations.enabled>false</dependency.locations.enabled>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <jdkVersion>1.7</jdkVersion>

        <!-- COMPILE dependency versions -->
        <apacheClientVersion>4.1.3</apacheClientVersion>
        <jacksonCoreVersion>2.9.9</jacksonCoreVersion>
        <jacksonDatabindVersion>2.9.9.2</jacksonDatabindVersion>
        <slf4jVersion>1.7.25</slf4jVersion>

        <!-- TEST dependency versions -->
        <junitVersion>4.12</junitVersion>
        <mockitoVersion>2.18.0</mockitoVersion>
        <assertjVersion>2.9.0</assertjVersion>
        <wiremockVersion>2.17.0</wiremockVersion>

        <!-- Maven plugin versions -->
        <compilerPluginVersion>3.7.0</compilerPluginVersion>
        <reportsPluginVersion>2.9</reportsPluginVersion>
        <mavenSourcePluginVersion>3.0.1</mavenSourcePluginVersion>
        <mavenJarPluginVersion>3.2.0</mavenJarPluginVersion>
        <javadocPluginVersion>3.1.0</javadocPluginVersion>
        <xrefPluginVersion>2.5</xrefPluginVersion>
        <mavenWrapperPluginVersion>0.6.0</mavenWrapperPluginVersion>
        <pmdPluginVersion>3.9.0</pmdPluginVersion>
        <pmdCoreVersion>6.3.0</pmdCoreVersion>
        <findbugsVersion>3.0.5</findbugsVersion>
        <shadeVersion>3.1.0</shadeVersion>
        <surefireVersion>2.22.1</surefireVersion>
    </properties>

    <modules>
        <module>libhoney</module>
     </modules>

    <profiles>
        <!-- Activate using the release property: mvn clean install -Prelease -->
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <!-- To release to Maven central -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</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>1.5</version>
                        <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-javadoc-plugin</artifactId>
                        <version>${javadocPluginVersion}</version>
                        <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>${mavenSourcePluginVersion}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadocPluginVersion}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compilerPluginVersion}</version>
                <configuration>
                    <source>${jdkVersion}</source>
                    <target>${jdkVersion}</target>
                </configuration>
            </plugin>

            <!-- mvn -N io.takari:maven:wrapper -Dmaven=3.3.9 -->
            <plugin>
                <groupId>io.takari</groupId>
                <artifactId>maven</artifactId>
                <version>${mavenWrapperPluginVersion}</version>
            </plugin>

        </plugins>
    </build>
</project>
