<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to Cloudera, Inc. under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  Cloudera, Inc. licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->
<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>com.cloudera.livy</groupId>
    <artifactId>livy-main</artifactId>
    <version>0.2.0</version>
    <packaging>pom</packaging>

    <name>livy-main</name>
    <description>livy-main</description>
    <url>http://livy.io</url>

    <developers>
            <developer>
                <name>Marcelo Vanzin</name>
                <email>vanzin@cloudera.com</email>
                <organization>Cloudera</organization>
                <organizationUrl>http://www.cloudera.com</organizationUrl>
            </developer>
            <developer>
                <name>Jeff Zhang</name>
                <email>zjffdu@apache.org</email>
                <organization>Hortonworks</organization>
                <organizationUrl>http://www.hortonworks.com</organizationUrl>
            </developer>
    </developers>

    <scm>
        <connection>https://github.com/cloudera/livy.git</connection>
        <developerConnection>https://github.com/cloudera/livy.git</developerConnection>
        <url>https://github.com/cloudera/livy</url>
    </scm>

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

    <organization>
        <name>Cloudera Inc</name>
        <url>http://www.cloudera.com</url>
    </organization>

    <properties>
        <hadoop.version>2.6.0-cdh5.5.0</hadoop.version>
        <spark.version>1.5.0-cdh5.5.0</spark.version>
        <commons-codec.version>1.9</commons-codec.version>
        <httpclient.version>4.5.2</httpclient.version>
        <httpcore.version>4.4.4</httpcore.version>
        <jackson.version>2.4.4</jackson.version>
        <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
        <jetty.version>9.2.16.v20160414</jetty.version>
        <json4s.version>3.2.10</json4s.version>
        <junit.version>4.11</junit.version>
        <kryo.version>2.22</kryo.version>
        <metrics.version>3.1.0</metrics.version>
        <mockito.version>1.9.5</mockito.version>
        <netty.version>4.0.23.Final</netty.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <py4j.version>0.8.2.1</py4j.version>
        <scala.binary.version>2.10</scala.binary.version>
        <scala.version>2.10.4</scala.version>
        <scalatest.version>2.2.4</scalatest.version>
        <scalatra.version>2.3.0</scalatra.version>
        <java.version>1.7</java.version>
        <minJavaVersion>1.7</minJavaVersion>
        <maxJavaVersion>1.8</maxJavaVersion>
        <test.redirectToFile>true</test.redirectToFile>
        <execution.root>${user.dir}</execution.root>
        <spark.home>${execution.root}/dev/spark</spark.home>

        <!-- Set this to "true" to skip R tests. -->
        <skipRTests>false</skipRTests>

        <!--
          Properties for the copyright header style checks. Modules that use the ASF header
          should override the "copyright.header" property.
        -->

        <!--
          By default artifacts are not deployed. Artifacts that should be deployed to a maven
          repo should override the "skipDeploy" property in their pom.
        -->
        <skipDeploy>true</skipDeploy>

        <asf.copyright.header><![CDATA[/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */]]></asf.copyright.header>

        <cloudera.copyright.header><![CDATA[/*
 * Licensed to Cloudera, Inc. under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  Cloudera, Inc. licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */]]></cloudera.copyright.header>

        <copyright.header>${cloudera.copyright.header}</copyright.header>

        <MaxPermGen>512m</MaxPermGen>
        <CodeCacheSize>512m</CodeCacheSize>

        <!-- Where to deploy artifacts. -->
        <repository.root>http://maven.jenkins.cloudera.com:8081/artifactory</repository.root>
    </properties>

    <repositories>
        <repository>
            <id>cdh.repo</id>
            <url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
            <name>Cloudera Repositories</name>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>cdh.snapshots.repo</id>
            <url>https://repository.cloudera.com/artifactory/libs-snapshot-local</url>
            <name>Cloudera Snapshots Repository</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>apache-repo</id>
            <name>Apache Repository</name>
            <url>https://repository.apache.org/content/repositories/releases</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>repository.jboss.org</id>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

    </repositories>


    <modules>
        <module>api</module>
        <module>assembly</module>
        <module>client-common</module>
        <module>client-http</module>
        <module>core</module>
        <module>repl</module>
        <module>rsc</module>
        <module>server</module>
        <module>test-lib</module>
        <module>integration-test</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>

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

        <dependency>
            <groupId>org.scalatra</groupId>
            <artifactId>scalatra-scalatest_${scala.binary.version}</artifactId>
            <version>${scalatra.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.16</version>
            </dependency>

            <dependency>
                <groupId>com.esotericsoftware.kryo</groupId>
                <artifactId>kryo</artifactId>
                <version>${kryo.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-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec.version}</version>
            </dependency>

            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>

            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-healthchecks</artifactId>
                <version>${metrics.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>${netty.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${javax.servlet-api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-auth</artifactId>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-common</artifactId>
                <version>${hadoop.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-common</artifactId>
                <classifier>tests</classifier>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-client</artifactId>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-hdfs</artifactId>
                <classifier>tests</classifier>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-yarn-api</artifactId>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-yarn-client</artifactId>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-yarn-common</artifactId>
                <version>${hadoop.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.hadoop</groupId>
                <artifactId>hadoop-yarn-server-tests</artifactId>
                <classifier>tests</classifier>
                <version>${hadoop.version}</version>
            </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>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-core_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.eclipse.jetty.orbit</groupId>
                        <artifactId>javax.servlet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-hive_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-launcher_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.spark-project.spark</groupId>
                        <artifactId>unused</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-repl_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-sql_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-streaming_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-yarn_${scala.binary.version}</artifactId>
                <version>${spark.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-http</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-continuation</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-util</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-plus</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-security</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.json4s</groupId>
                <artifactId>json4s_${scala.binary.version}</artifactId>
                <version>${json4s.version}</version>
            </dependency>

            <dependency>
                <groupId>org.json4s</groupId>
                <artifactId>json4s-ast_${scala.binary.version}</artifactId>
                <version>${json4s.version}</version>
            </dependency>

            <dependency>
                <groupId>org.json4s</groupId>
                <artifactId>json4s-core_${scala.binary.version}</artifactId>
                <version>${json4s.version}</version>
            </dependency>

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

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

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

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

            <dependency>
                <groupId>org.scalatra</groupId>
                <artifactId>scalatra_${scala.binary.version}</artifactId>
                <version>${scalatra.version}</version>
            </dependency>

            <dependency>
                <groupId>org.scalatra</groupId>
                <artifactId>scalatra-jetty_${scala.binary.version}</artifactId>
                <version>${scalatra.version}</version>
            </dependency>

            <dependency>
                <groupId>org.scalatra</groupId>
                <artifactId>scalatra-json_${scala.binary.version}</artifactId>
                <version>${scalatra.version}</version>
            </dependency>

            <dependency>
                <groupId>org.scalatra</groupId>
                <artifactId>scalatra-test_${scala.binary.version}</artifactId>
                <version>${scalatra.version}</version>
            </dependency>

            <dependency>
                <groupId>net.sf.py4j</groupId>
                <artifactId>py4j</artifactId>
                <version>${py4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.0</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>




                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <executions>
                        <execution>
                            <id>enforce-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireJavaVersion>
                                        <version>1.7</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <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.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.4.0</version>
                </plugin>

                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>3.2.2</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compile</goal>
                                <goal>testCompile</goal>
                                <goal>add-source</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>attach-scaladocs</id>
                            <goals>
                                <goal>doc-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <scalaVersion>${scala.version}</scalaVersion>
                        <recompileMode>incremental</recompileMode>
                        <useZincServer>true</useZincServer>
                        <checkMultipleScalaVersions>false</checkMultipleScalaVersions>
                        <args>
                            <arg>-unchecked</arg>
                            <arg>-deprecation</arg>
                            <arg>-feature</arg>
                        </args>
                        <javacArgs>
                            <javacArg>-source</javacArg>
                            <javacArg>${java.version}</javacArg>
                            <javacArg>-target</javacArg>
                            <javacArg>${java.version}</javacArg>
                            <javacArg>-Xlint:unchecked</javacArg>
                        </javacArgs>
                        <jvmArgs>
                            <jvmArg>-Xms1024m</jvmArg>
                            <jvmArg>-Xmx1024m</jvmArg>
                            <jvmArg>-XX:MaxPermSize=${MaxPermGen}</jvmArg>
                            <jvmArg>-XX:ReservedCodeCacheSize=${CodeCacheSize}</jvmArg>
                        </jvmArgs>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19</version>
                    <configuration>
                        <environmentVariables>
                            <LIVY_TEST>true</LIVY_TEST>
                            <SPARK_HOME>${spark.home}</SPARK_HOME>
                        </environmentVariables>
                        <systemProperties>
                            <java.awt.headless>true</java.awt.headless>
                            <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
                            <livy.environment>development</livy.environment>
                            <jacoco.args>${argLine}</jacoco.args>
                            <spark.ui.enabled>false</spark.ui.enabled>
                            <project.version>${project.version}</project.version>
                            <skipRTests>${skipRTests}</skipRTests>
                        </systemProperties>
                        <redirectTestOutputToFile>${test.redirectToFile}</redirectTestOutputToFile>
                        <useFile>${test.redirectToFile}</useFile>
                        <argLine>${argLine} -Xmx1g -XX:MaxPermSize=256m</argLine>
                        <failIfNoTests>false</failIfNoTests>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.scalatest</groupId>
                    <artifactId>scalatest-maven-plugin</artifactId>
                    <version>1.0</version>
                    <configuration>
                        <environmentVariables>
                            <LIVY_TEST>true</LIVY_TEST>
                            <SPARK_HOME>${spark.home}</SPARK_HOME>
                        </environmentVariables>
                        <systemProperties>
                            <java.awt.headless>true</java.awt.headless>
                            <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
                            <livy.environment>development</livy.environment>
                            <jacoco.args>${argLine}</jacoco.args>
                            <spark.ui.enabled>false</spark.ui.enabled>
                            <project.version>${project.version}</project.version>
                            <skipRTests>${skipRTests}</skipRTests>
                        </systemProperties>
                        <stdout>D</stdout>
                        <reportsDirectory>${project.build.directory}/surefire-reports
                        </reportsDirectory>
                        <junitxml>.</junitxml>
                        <filereports>WDF TestSuite.txt</filereports>
                        <argLine>${argLine} -Xmx1g -XX:MaxPermSize=256m</argLine>
                    </configuration>
                    <executions>
                        <execution>
                            <id>test</id>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>

        <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>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <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>
            </plugin>

            <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-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <rules>
                        <requireMavenVersion>
                            <version>[3.0.0,)</version>
                        </requireMavenVersion>
                        <requireJavaVersion>
                            <version>[${minJavaVersion}.0,${maxJavaVersion}.1000}]</version>
                        </requireJavaVersion>
                        <requireOS>
                            <family>unix</family>
                        </requireOS>
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>clean</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>pre-clean</phase>
                    </execution>
                    <execution>
                        <id>default</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                    <execution>
                        <id>site</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>pre-site</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <!-- Cleans up files that tests append to (because we have two test plugins). -->
                    <execution>
                        <id>pre-test-clean</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <delete file="${project.build.directory}/unit-tests.log"
                                        quiet="true"/>
                                <delete file="${project.build.directory}/jacoco.exec" quiet="true"/>
                                <delete dir="${project.build.directory}/tmp" quiet="true"/>
                            </target>
                        </configuration>
                    </execution>
                    <!-- Create the temp directory to be  used by tests. -->
                    <execution>
                        <id>create-tmp-dir</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <mkdir dir="${project.build.directory}/tmp"/>
                            </target>
                        </configuration>
                    </execution>
                    <!--
                      Copy the template scalastyle / checkstyle configuration and replace the copyright
                      header.
                    -->
                    <execution>
                        <id>setup-style-checker</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <copy file="${execution.root}/scalastyle.xml"
                                      tofile="${project.build.directory}/scalastyle.xml"/>
                                <replace file="${project.build.directory}/scalastyle.xml"
                                         token="{{COPYRIGHT_HEADER}}"
                                         value="${copyright.header}"/>
                                <copy file="${execution.root}/checkstyle.xml"
                                      tofile="${project.build.directory}/checkstyle.xml"/>
                                <echo file="${project.build.directory}/checkstyle.header"
                                      message="${copyright.header}"/>
                                <replace file="${project.build.directory}/checkstyle.xml"
                                         token="{{HEADER_FILE}}"
                                         value="${project.build.directory}/checkstyle.header"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.scalastyle</groupId>
                <artifactId>scalastyle-maven-plugin</artifactId>
                <version>0.8.0</version>
                <configuration>
                    <verbose>false</verbose>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failOnWarning>false</failOnWarning>
                    <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
                    <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
                    <configLocation>${project.build.directory}/scalastyle.xml</configLocation>
                    <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <verbose>false</verbose>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failOnWarning>false</failOnWarning>
                    <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
                    <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
                    <configLocation>${project.build.directory}/checkstyle.xml</configLocation>
                    <outputFile>${basedir}/target/checkstyle-output.xml</outputFile>
                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/jars</outputDirectory>
                    <useSubDirectoryPerType>false</useSubDirectoryPerType>
                    <includeScope>runtime</includeScope>
                    <silent>true</silent>
                    <overWriteReleases>true</overWriteReleases>
                    <overWriteSnapshots>true</overWriteSnapshots>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.5.201505241946</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <append>true</append>
                            <destFile>${project.build.directory}/jacoco/main.exec</destFile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>merge-reports</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>merge</goal>
                        </goals>
                        <configuration>
                            <fileSets>
                                <fileSet>
                                    <directory>${project.build.directory}/jacoco</directory>
                                    <includes>
                                        <include>*.exec</include>
                                    </includes>
                                </fileSet>
                            </fileSets>
                        </configuration>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>

        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>

        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


</project>
