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

    <name>Helios Parent</name>
    <description>A docker container orchestration system and deployment platform</description>
    <url>https://github.com/spotify/helios</url>
    <artifactId>helios-parent</artifactId>
    <version>0.9.283</version>
    <packaging>pom</packaging>

    <parent>
        <groupId>com.spotify</groupId>
        <artifactId>foss-root</artifactId>
        <version>9</version>
    </parent>

    <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>
        <connection>scm:git:https://github.com/spotify/helios.git</connection>
        <developerConnection>scm:git:git@github.com:spotify/helios.git</developerConnection>
        <url>https://github.com/spotify/helios</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <site>
            <id>spotify.github.io</id>
            <url>file:///tmp/helios-docs</url>
        </site>
    </distributionManagement>

    <developers>
        <developer>
            <id>dano</id>
            <name>Daniel Norberg</name>
            <email>dano@spotify.com</email>
        </developer>
        <developer>
            <id>drewc</id>
            <name>Drew Csillag</name>
            <email>drewc@spotify.com</email>
        </developer>
        <developer>
            <id>matslina</id>
            <name>Mats Linander</name>
            <email>matslina@spotify.com</email>
        </developer>
        <developer>
            <id>philipcristiano</id>
            <name>Philip Cristiano</name>
            <email>philipcristiano@spotify.com</email>
        </developer>
        <developer>
            <id>rohan</id>
            <name>Rohan Singh</name>
            <email>rohan@spotify.com</email>
        </developer>
        <developer>
            <id>ryan</id>
            <name>Ryan Culbertson</name>
            <email>ryan@spotify.com</email>
        </developer>
        <developer>
            <id>snc</id>
            <name>Simon Cohen</name>
            <email>snc@spotify.com</email>
        </developer>
        <developer>
            <id>davidxia</id>
            <name>David Xia</name>
            <email>dxia@spotify.com</email>
        </developer>
        <developer>
            <id>kobolog</id>
            <name>Andrey Sibiryov</name>
            <email>kobolog@spotify.com</email>
        </developer>
        <developer>
            <id>mattbrown</id>
            <name>Matt Brown</name>
            <email>mattbrown@spotify.com</email>
        </developer>
        <developer>
            <id>gimaker</id>
            <name>Staffan Gimåker</name>
            <email>staffan@spotify.com</email>
        </developer>
        <developer>
            <id>negz</id>
            <name>Nic Cope</name>
            <email>negz@spotify.com</email>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>clojars.org</id>
            <url>https://clojars.org/repo</url>
        </repository>
        <repository>
            <id>bintray-readytalk</id>
            <url>https://dl.bintray.com/readytalk/maven</url>
        </repository>
        <repository>
            <id>ossrh</id>
            <name>Sonatype OSS</name>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>annotations</artifactId>
            <version>12.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.spotify</groupId>
                <artifactId>docker-client</artifactId>
                <version>8.14.1</version>
                <classifier>shaded</classifier>
            </dependency>

            <!--compile deps-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.22</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>20.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-guava</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
                <version>2.9.10</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.9.2</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-access</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.argparse4j</groupId>
                <artifactId>argparse4j</artifactId>
                <version>0.4.3</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>com.typesafe</groupId>
                <artifactId>config</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>dnsjava</groupId>
                <artifactId>dnsjava</artifactId>
                <version>2.1.7</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.6</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-recipes</artifactId>
                <version>2.7.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.jboss.netty</groupId>
                        <artifactId>netty</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-test</artifactId>
                <version>2.7.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.jboss.netty</groupId>
                        <artifactId>netty</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.5</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>4.4.9</version>
            </dependency>
            <!--
            We don't actually use netty directly in this project, but we've added a dependency here
            to try to ensure that 4.1.5 is the version used by grpc and pubsub.
            This attempts to address a memory leak in netty 4.1.3 which grpc 1.0.0/1.0.1 is using.
            See https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1433
            and https://groups.google.com/forum/#!topic/grpc-io/4wHa_fxaT-Q
            -->
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>4.1.5.Final</version>
            </dependency>
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>google-cloud-pubsub</artifactId>
                <version>0.5.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                    </exclusion>
                    <!--
                    google-cloud-pubsub:0.5.1 depends on grpc-netty:1.0.1 which depends on
                    io.netty:netty-codec-http2:4.1.3.Final which pulls in a number of other netty subprojects.
                    Exclude io.netty:netty-codec-http2 at the root to avoid having dependencies on the various
                    netty subprojects, as their code is provided in netty-all.

                    We want to be doubly-sure that we do not pull in 4.1.3 code or classes.

                    When upgrading to more recent versions of google-cloud-pubsub this and the use of
                    netty-all above should be reevaluated.
                    -->
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty-codec-http2</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.spotify</groupId>
                <artifactId>ssh-agent-tls</artifactId>
                <version>0.0.4</version>
            </dependency>
            <dependency>
                <groupId>com.spotify</groupId>
                <artifactId>ssh-agent-proxy</artifactId>
                <version>0.2.0</version>
            </dependency>

            <!--
            versions that we have to manage to avoid requireUpperBoundDeps violations due to
            conflicting versions in use from google-cloud-*
            -->
            <dependency>
                <groupId>com.google.http-client</groupId>
                <artifactId>google-http-client-jackson2</artifactId>
                <version>1.27.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.api-client</groupId>
                <artifactId>google-api-client</artifactId>
                <version>1.27.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.oauth-client</groupId>
                <artifactId>google-oauth-client</artifactId>
                <version>1.27.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.http-client</groupId>
                <artifactId>google-http-client</artifactId>
                <version>1.27.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.auth</groupId>
                <artifactId>google-auth-library-credentials</artifactId>
                <version>0.12.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.auth</groupId>
                <artifactId>google-auth-library-oauth2-http</artifactId>
                <version>0.12.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-debug-jdk15on</artifactId>
                <version>1.59</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>1.59</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.3.1</version>
            </dependency>

            <!--test deps-->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.9.5</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.5</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>2.0.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>2.1</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <autoReleaseAfterClose>true</autoReleaseAfterClose>
        <jacoco.version>0.8.2</jacoco.version>
        <jdeb.skip>false</jdeb.skip>
        <surefire.version>2.16</surefire.version>
        <surefireArgLine>-Xmx128m -XX:+TieredCompilation -XX:TieredStopAtLevel=1</surefireArgLine>
    </properties>

    <modules>
        <module>helios-client</module>
        <module>helios-service-registration</module>
        <module>helios-tools</module>
        <module>helios-testing</module>
        <module>helios-testing-common</module>
        <module>helios-services</module>
        <module>helios-system-tests</module>
        <module>helios-integration-tests</module>
    </modules>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <enableAssertions>false</enableAssertions>
                            <forkCount>1C</forkCount>
                            <reuseForks>false</reuseForks>
                            <argLine>${surefireArgLine}</argLine>
                            <systemPropertyVariables>
                                <curator-default-session-timeout>500
                                </curator-default-session-timeout>
                                <curator-default-connection-timeout>500
                                </curator-default-connection-timeout>
                                <logToFile>true</logToFile>
                                <heliosLoggingLevel>OFF</heliosLoggingLevel>
                                <externalLoggingLevel>OFF</externalLoggingLevel>
                                <rootLoggingLevel>OFF</rootLoggingLevel>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>circleci</id>
            <activation>
                <property>
                    <name>env.CIRCLECI</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <enableAssertions>false</enableAssertions>
                            <forkCount>4</forkCount>
                            <reuseForks>false</reuseForks>
                            <argLine>${surefireArgLine}</argLine>
                            <rerunFailingTestsCount>2</rerunFailingTestsCount>
                            <environmentVariables>
                                <HELIOS_CLUSTER_DEPLOYMENT_TEST_HOSTS>2
                                </HELIOS_CLUSTER_DEPLOYMENT_TEST_HOSTS>
                            </environmentVariables>
                            <systemPropertyVariables>
                                <logToFile>true</logToFile>
                                <heliosLoggingLevel>INFO</heliosLoggingLevel>
                                <externalLoggingLevel>OFF</externalLoggingLevel>
                                <rootLoggingLevel>ERROR</rootLoggingLevel>
                            </systemPropertyVariables>
                            <excludesFile>../.test-excludes</excludesFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>env.JENKINS</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <enableAssertions>false</enableAssertions>
                            <forkCount>1C</forkCount>
                            <reuseForks>false</reuseForks>
                            <argLine>${surefireArgLine}</argLine>
                            <rerunFailingTestsCount>2</rerunFailingTestsCount>
                            <systemPropertyVariables>
                                <junit.parallel.threads>1</junit.parallel.threads>
                                <logToFile>false</logToFile>
                                <heliosLoggingLevel>WARN</heliosLoggingLevel>
                                <externalLoggingLevel>OFF</externalLoggingLevel>
                                <rootLoggingLevel>WARN</rootLoggingLevel>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>debug</id>
            <activation>
                <property>
                    <name>debug</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <enableAssertions>false</enableAssertions>
                            <systemPropertyVariables>
                                <logToFile>false</logToFile>
                                <heliosLoggingLevel>DEBUG</heliosLoggingLevel>
                                <externalLoggingLevel>ERROR</externalLoggingLevel>
                                <rootLoggingLevel>ERROR</rootLoggingLevel>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>integration-only</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release-unsafe-fast</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <arguments>-DskipITs -Dgpg.skip=true -DskipTests -Prelease-unsafe-fast
                            </arguments>
                            <pushChanges>false</pushChanges>
                            <tagNameFormat>@{project.version}</tagNameFormat>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.scm</groupId>
                                <artifactId>maven-scm-provider-gitexe</artifactId>
                                <version>1.9</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release-no-sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <arguments>-DskipITs -Dgpg.skip=true -Prelease-no-sign</arguments>
                            <pushChanges>false</pushChanges>
                            <tagNameFormat>@{project.version}</tagNameFormat>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.scm</groupId>
                                <artifactId>maven-scm-provider-gitexe</artifactId>
                                <version>1.9</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>sign-artifacts</id>
            <build>
                <plugins>
                    <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>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jacoco</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${jacoco.version}</version>
                        <executions>
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <destFile>${project.build.directory}/jacoco/jacoco.exec
                                    </destFile>
                                    <propertyName>jacocoArgLine</propertyName>
                                </configuration>
                            </execution>
                            <execution>
                                <id>post-unit-test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <dataFile>${project.build.directory}/jacoco/jacoco.exec
                                    </dataFile>
                                    <outputDirectory>${project.build.directory}/jacoco
                                    </outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <argLine>${jacocoArgLine} ${surefireArgLine}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- using github.com/google/error-prone-javac is required when running on JDK 8 -->
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <javac.version>9+181-r4173-1</javac.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <fork>true</fork>
                            <compilerArgs combine.children="append">
                                <arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <violationSeverity>warning</violationSeverity>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <arguments>-DskipITs -Dgpg.skip=true</arguments>
                        <pushChanges>false</pushChanges>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.scm</groupId>
                            <artifactId>maven-scm-provider-gitexe</artifactId>
                            <version>1.9</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <compilerArgs>
                            <arg>-XDcompilePolicy=simple</arg>
                            <arg>-Xplugin:ErrorProne</arg>
                        </compilerArgs>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>com.google.errorprone</groupId>
                                <artifactId>error_prone_core</artifactId>
                                <version>2.3.2</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true
                                </addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-file</artifactId>
                            <version>2.4</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.2</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>jdeb</artifactId>
                    <groupId>org.vafer</groupId>
                    <version>1.1.1</version>
                    <configuration>
                        <attach>false</attach>
                        <skip>${jdeb.skip}</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <requireUpperBoundDeps/>
                                <!--
                                netty 4.1.3.Final and below has a memory leak when used with grpc.
                                See https://github.com/grpc/grpc-java/issues/2358
                                -->
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>io.netty:netty-*:(,4.1.3.Final]</exclude>
                                    </excludes>
                                    <includes>
                                        <!-- this rule does not apply to the tcnative library, which we don't use anyway -->
                                        <include>io.netty:netty-tcnative-*</include>
                                    </includes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.6</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
                    <skipRemoteStaging>true</skipRemoteStaging>
                    <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <effort>Max</effort>
                    <failOnError>false</failOnError>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <findbugsXmlOutputDirectory>${project.build.directory}/findbugs
                    </findbugsXmlOutputDirectory>
                    <excludeFilterFile>${project.parent.basedir}/findbugs-exclude.xml
                    </excludeFilterFile>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
