<?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>co.steeleye</groupId>
    <artifactId>steeleye-sdk-java</artifactId>
    <version>1.0.0</version>
    <name>SteelEye SDK Java</name>

    <description>Java client library for SteelEye SDK</description>
    <url>https://github.com/steeleye/steeleye-sdk-java</url>
    <inceptionYear>2017</inceptionYear>
    <organization>
        <name>SteelEye Limited</name>
        <url>https://www.steel-eye.com/</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>
    <developers>
        <developer>
            <id>shankar</id>
            <name>Shankar Vasudevan</name>
            <email>shankar [at] steel-eye [dot] com</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/steeleye/steeleye-sdk-java</url>
        <developerConnection>scm:git:git@github.com:steeleye/steeleye-sdk-java.git</developerConnection>
        <tag>v1.0.0</tag>
    </scm>
    <issueManagement>
        <system>GitHub Issue Management</system>
        <url>https://github.com/steeleye/steeleye-sdk-java/issues</url>
    </issueManagement>
    <repositories>
        <repository>
            <id>sonatype-repository</id>
            <name>Sonatype Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus Staging</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <javac.src.version>1.8</javac.src.version>
        <javac.target.version>1.8</javac.target.version>
        <implementation.build>${maven.build.timestamp}</implementation.build>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format>
        <!-- deps -->
        <lombok.version>1.16.16</lombok.version>
        <commonscodec.version>1.10</commonscodec.version>
        <guava.version>22.0</guava.version>
        <lombok.version>1.16.16</lombok.version>
        <slf4j.version>1.7.25</slf4j.version>
        <jackson.version>2.9.0.pr4</jackson.version>
        <httpclient.version>4.5.3</httpclient.version>
        <httpcore.version>4.4.6</httpcore.version>
        <httpasync.version>4.1.3</httpasync.version>
        <base64.version>2.3.9</base64.version>
        <jasypt.version>1.9.2</jasypt.version>
        <typesafe.version>1.3.1</typesafe.version>
        <elasticsearch.version>5.4.2</elasticsearch.version>
        <applauncher.version>2.3.0</applauncher.version>
        <logback.version>1.2.3</logback.version>
        <hamcrest.version>1.3</hamcrest.version>
        <mockito.version>2.8.47</mockito.version>
        <jcommander.version>1.72</jcommander.version>
        <testng.version>6.11</testng.version>
        <wiremock.version>2.6.0</wiremock.version>
        <!-- plugin deps -->
        <enforcer.plugin.version>1.4.1</enforcer.plugin.version>
        <clean.plugin.version>3.0.0</clean.plugin.version>
        <dependency.plugin.version>3.0.1</dependency.plugin.version>
        <resources.plugin.version>3.0.2</resources.plugin.version>
        <site.plugin.version>3.6</site.plugin.version>
        <compiler.plugin.version>3.6.1</compiler.plugin.version>
        <surefire.plugin.version>2.20</surefire.plugin.version>
        <failsafe.plugin.version>2.20</failsafe.plugin.version>
        <assembly.plugin.version>3.0.0</assembly.plugin.version>
        <plexus.utils.version>3.0.24</plexus.utils.version>
        <jar.plugin.version>3.0.2</jar.plugin.version>
        <install.plugin.version>2.5.2</install.plugin.version>
        <deploy.plugin.version>2.8.2</deploy.plugin.version>
        <release.plugin.version>2.5.3</release.plugin.version>
        <antrun.plugin.version>1.8</antrun.plugin.version>
        <gitexe.plugin.version>1.9.5</gitexe.plugin.version>
        <plexus.plugin.version>1.9.5</plexus.plugin.version>
        <source.plugin.version>3.0.1</source.plugin.version>
        <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
        <gpg.plugin.version>1.6</gpg.plugin.version>
        <jacoco.plugin.version>0.7.9</jacoco.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commonscodec.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.findbugs</groupId>
                    <artifactId>jsr305</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.j2objc</groupId>
                    <artifactId>j2objc-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-guava</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${httpcore.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-codec</groupId>
                    <artifactId>commons-codec</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${typesafe.version}</version>
        </dependency>
        <dependency>
            <groupId>net.iharder</groupId>
            <artifactId>base64</artifactId>
            <version>${base64.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
            <version>${jasypt.version}</version>
        </dependency>
        <dependency>
            <groupId>io.polyglotted</groupId>
            <artifactId>app-launcher</artifactId>
            <version>${applauncher.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
            <version>${jcommander.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.beanshell</groupId>
                    <artifactId>bsh</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant-launcher</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.beust</groupId>
                    <artifactId>jcommander</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.skyscreamer</groupId>
                    <artifactId>jsonassert</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xmlunit</groupId>
                    <artifactId>xmlunit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.jayway.jsonpath</groupId>
                    <artifactId>json-path</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.sf.jopt-simple</groupId>
                    <artifactId>jopt-simple</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[1.8,)</version>
                                    <message>[ERROR] The currently supported version of Java is 1.8 or higher</message>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[3.0,)</version>
                                    <message>[ERROR] The currently supported version of Maven is 3.0 or higher</message>
                                </requireMavenVersion>
                                <requirePluginVersions>
                                    <banLatest>true</banLatest>
                                    <banRelease>true</banRelease>
                                    <banSnapshots>true</banSnapshots>
                                    <phases>clean,deploy</phases>
                                    <message>[ERROR] Best Practice is to always define plugin versions!</message>
                                </requirePluginVersions>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${clean.plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${dependency.plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${resources.plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>${site.plugin.version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler.plugin.version}</version>
                <configuration>
                    <source>${javac.src.version}</source>
                    <target>${javac.target.version}</target>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                    <optimize>true</optimize>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.plugin.version}</version>
                <configuration>
                    <parallel>methods</parallel>
                    <threadCount>10</threadCount>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${assembly.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-utils</artifactId>
                        <version>${plexus.utils.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Build>${implementation.build}</Implementation-Build>
                            <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                            <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>${install.plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${deploy.plugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${release.plugin.version}</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-DskipTests</arguments>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>releasable</releaseProfiles>
                    <scmCommentPrefix>[mvn-release][ci skip]:</scmCommentPrefix>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>${gitexe.plugin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.versioneye</groupId>
                <artifactId>versioneye-maven-plugin</artifactId>
                <version>3.11.4</version>
                <configuration>
                    <apiKey>${VERSIONEYE_KEY}</apiKey>
                    <organisation>steeleye</organisation>
                    <team>Owners</team>
                </configuration>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>${gitexe.plugin.version}</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>${plexus.plugin.version}</version>
            </extension>
        </extensions>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>releasable</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${source.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                                <configuration>
                                    <archive>
                                        <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                        </manifest>
                                        <manifestEntries>
                                            <Implementation-Build>${implementation.build}</Implementation-Build>
                                            <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                                            <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                                        </manifestEntries>
                                    </archive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${javadoc.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <quiet>true</quiet>
                                    <archive>
                                        <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                        </manifest>
                                        <manifestEntries>
                                            <Implementation-Build>${implementation.build}</Implementation-Build>
                                            <X-Compile-Source-JDK>${javac.src.version}</X-Compile-Source-JDK>
                                            <X-Compile-Target-JDK>${javac.target.version}</X-Compile-Target-JDK>
                                        </manifestEntries>
                                    </archive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>${antrun.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>copy-gpgs</id>
                                <phase>package</phase>
                                <configuration>
                                    <target>
                                        <get dest="${project.build.directory}/gpglocal">
                                            <url url="http://maven.steel-eye.com/private/pubring.gpg" />
                                            <url url="http://maven.steel-eye.com/private/secring.gpg" />
                                            <url url="http://maven.steel-eye.com/private/trustdb.gpg" />
                                        </get>
                                        <chmod dir="${project.build.directory}/gpglocal" perm="700" />
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <configuration> <!-- hack for ci tools -->
                                    <defaultKeyring>false</defaultKeyring>
                                    <homedir>${project.build.directory}/gpglocal</homedir>
                                </configuration>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>emma-coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco.plugin.version}</version>
                        <configuration>
                            <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
                            <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
                        </configuration>
                        <executions>
                            <execution>
                                <id>jacoco-initialize</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>jacoco-site</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
