<?xml version="1.0" encoding="UTF-8"?>
<!--
~   Licensed 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>

  <parent>
    <groupId>org.basepom</groupId>
    <artifactId>basepom-minimal</artifactId>
    <version>24</version>
    <relativePath />
  </parent>

  <groupId>com.opentable</groupId>
  <artifactId>otj-parent-spring</artifactId>
  <packaging>pom</packaging>
  <version>116</version>
  <name>OpenTable Spring base pom</name>

  <description>This is the Base POM for internal OpenTable Spring Maven projects.</description>

  <properties>
    <!-- tweak basepom settings -->
    <basepom.check.skip-checkstyle>${basepom.check.skip-extended}</basepom.check.skip-checkstyle>
    <basepom.check.checkstyle-severity>warning</basepom.check.checkstyle-severity>
    <dep.checkstyle.version>7.1</dep.checkstyle.version>
    <dep.plugin.dependency-versions-check.version>2.0.2</dep.plugin.dependency-versions-check.version>

    <project.build.generated-resources>${basedir}/target/generated-resources</project.build.generated-resources>

    <basepom.release.push-changes>true</basepom.release.push-changes>
    <basepom.test.timeout>600</basepom.test.timeout>
    <basepom.test.fork-count>0.5C</basepom.test.fork-count>

    <!-- basepom-oss picks -->
    <!-- License checker for OSS deployments. -->
    <basepom.check.skip-license>${basepom.check.skip-extended}</basepom.check.skip-license>
    <basepom.check.fail-license>${basepom.check.fail-extended}</basepom.check.fail-license>
    <!-- Some plugins can run early ("validate") or late ("verify") -->
    <basepom.check.phase-license>validate</basepom.check.phase-license> <!-- this is overriding basepom default -->
    <basepom.license.skip-existing>true</basepom.license.skip-existing>
    <!-- release profiles -->
    <basepom.release.profiles>basepom.oss-release,oss-build</basepom.release.profiles>
    <!-- Plugin versions, ordered like http://maven.apache.org/plugins/ -->
    <dep.plugin.gpg.version>1.6</dep.plugin.gpg.version>
    <!-- https://github.com/mycila/license-maven-plugin/releases -->
    <dep.plugin.license.version>2.11</dep.plugin.license.version>

    <!-- PMD versions -->
    <dep.plugin.pmd.ruleset.version>1.2.0</dep.plugin.pmd.ruleset.version>

    <!-- Dependency Versions -->
    <dep.spring.version>4.3.8.RELEASE</dep.spring.version>
    <dep.spring-boot.version>1.5.3.RELEASE</dep.spring-boot.version>

    <!-- logging versions -->
    <dep.logback.version>1.2.2</dep.logback.version>
    <dep.slf4j.version>1.7.25</dep.slf4j.version>
    <dep.otj-otl.version>0.4.1</dep.otj-otl.version>

    <dep.scala.version>2.12.2</dep.scala.version>

    <!-- http versions -->
    <dep.jetty.version>9.3.19.v20170502</dep.jetty.version>
    <dep.resteasy.version>3.1.2.Final</dep.resteasy.version>

    <!-- instrumentation versions -->
    <!--
      NB: There is a related version in otj-metrics for
      com.ryantenney.metrics:metrics-spring.
    -->
    <dep.metrics.version>3.1.2</dep.metrics.version>

    <!-- library versions -->
    <dep.jackson.version>2.8.10</dep.jackson.version>
    <dep.kafka.version>0.11.0.0</dep.kafka.version>
    <dep.jdbi3.version>3.0.0-beta3</dep.jdbi3.version>

    <!-- OT module dependency versions -->
    <dep.otj-sql.version>2.0.3</dep.otj-sql.version>
    <dep.otj-logging.version>2.4.0</dep.otj-logging.version>
    <dep.otj-jaxrs.version>2.5.0</dep.otj-jaxrs.version>
    <dep.otj-server.version>2.6.2</dep.otj-server.version>
    <dep.discovery.version>0.99.26</dep.discovery.version>

    <!-- Conditional bans -->
    <ot.build.allow-spring>true</ot.build.allow-spring>
    <ot.build.allow-guice>false</ot.build.allow-guice>
    <ot.build.allow-resteasy>true</ot.build.allow-resteasy>
    <ot.build.allow-joda-time>false</ot.build.allow-joda-time>
    <ot.build.allow-codehaus-jackson>false</ot.build.allow-codehaus-jackson>
    <ot.build.allow-jersey>false</ot.build.allow-jersey>
    <ot.build.allow-otj-httpclient>false</ot.build.allow-otj-httpclient>

    <!-- hic sunt dracones -->
    <ot.build.allow-circular-dependencies>false</ot.build.allow-circular-dependencies>

    <!-- enable otpl to be used in sub-directories -->
    <otpl.project.dir>${basedir}</otpl.project.dir>
  </properties>

  <build>
    <!-- Make the artifacts contain the build number for snapshot builds. -->
    <finalName>${ot.build.name}</finalName>

    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
      </resource>
      <resource>
        <directory>${basedir}/src/main/java</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${project.build.generated-resources}</directory>
      </resource>
    </resources>

    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>${basedir}/src/test/java</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
    </testResources>

    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions combine.children="append">
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.ning.maven.plugins</groupId>
                    <artifactId>maven-dependency-versions-check-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.nesscomputing.mojo</groupId>
                    <artifactId>numbers-maven-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>get</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>revision</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>analyze-dep-mgt</goal>
                      <goal>analyze-duplicate</goal>
                      <goal>analyze-only</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.ning.maven.plugins</groupId>
                    <artifactId>maven-duplicate-finder-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

        <!--
            MAVEN-ENFORCER-PLUGIN (The Loving Iron Fist of Maven™)
            Global banhammer

            Why?  These artifacts are considered hazardous to your health.  Each has its own rationale,
            descibed below inline.
        -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${dep.plugin.enforcer.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>extra-enforcer-rules</artifactId>
              <version>1.0-beta-6</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>default</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${basepom.check.skip-enforcer}</skip>
                <fail>${basepom.check.fail-enforcer}</fail>
                <rules>
                  <bannedDependencies>
                    <!-- Now here is an arcane trick. See http://www.sonatype.com/people/2007/06/how-to-merge-sub-items-from-parent-pom-to-child-pom-in-a-maven-plugin-configuration-2/ for details... -->
                    <excludes combine.children="append">
                      <!-- clashes with commons-logging:commons-logging -->
                      <exclude>commons-logging:commons-logging-api</exclude>
                      <!-- logback implements slf4j directly.  No need for slf4j -->
                      <exclude>org.slf4j:slf4j</exclude>
                      <!-- slf4j-simple only allowed for tests -->
                      <exclude>org.slf4j:slf4j-simple:*:*:compile</exclude>
                      <!-- We don't use log4j, use log4j-over-slf4j instead -->
                      <exclude>org.slf4j:slf4j-log4j12</exclude>
                      <!-- junit-dep used to avoid a classless repackaging, but it is now obsoleted -->
                      <exclude>junit:junit-dep</exclude>

                      <!-- No Ness components, port them over. -->
                      <exclude>ness.components:*</exclude>
                      <exclude>com.nesscomputing.components:*</exclude>
                      <exclude>com.nesscomputing.testing:*</exclude>
                      <!-- Trumpet was the code-name for Ness, don't allow that to creep in. -->
                      <exclude>io.trumpet.components:*</exclude>

                      <!-- use Spring JMX instead -->
                      <exclude>org.weakref:jmxutils</exclude>
                      <!-- only the jsr305 jar is allowed, for @SuppressWarnings use findbugs-annotations -->
                      <exclude>com.google.code.findbugs:annotations</exclude>
                      <exclude>net.jcip:jcip-annotations</exclude>
                      <!-- replaced with org.kitei.testing:kitei-lessio -->
                      <exclude>ness.kawala:*</exclude>
                      <exclude>com.nesscomputing.testing:testing-lessio</exclude>
                      <!-- OpenTable transitional bans -->
                      <exclude>log4j:log4j</exclude>
                      <exclude>commons-logging:commons-logging</exclude>
                      <exclude>org.jboss.resteasy:jaxrs-api</exclude>
                      <exclude>org.jboss.spec.javax.annotation:*</exclude>
                      <exclude>javax.annotation:jsr250-api</exclude>
                      <exclude>com.opentable.components:otj-tracking</exclude>
                      <exclude>com.opentable.components:otj-server-templates</exclude>
                      <exclude>com.opentable.components:otj-config</exclude>
                      <exclude>com.opentable.components:otj-lifecycle</exclude>
                      <exclude>com.opentable.components:otj-jaxrs</exclude>
                      <exclude>com.opentable.components:otj-metrics:(,0.7.0)</exclude>
                      <exclude>com.opentable.components:otj-requestid</exclude>
                      <exclude>com.opentable.components:otj-httpclient</exclude>
                      <!-- Spring killed these.  die die die -->
                      <exclude>com.opentable.components:otj-config</exclude>
                      <exclude>com.opentable.components:otj-httpserver</exclude>
                      <exclude>com.opentable.components:otj-integration-testing</exclude>
                      <exclude>com.opentable.components:otj-jmx</exclude>
                      <exclude>com.opentable.components:otj-lifecycle</exclude>
                      <exclude>com.opentable.components:otj-migratory</exclude>
                      <exclude>com.opentable.components:otj-serverinfo</exclude>
                      <exclude>com.opentable.components:otj-service-packaging</exclude>
                      <exclude>com.opentable.components:otj-tinyhttp</exclude>
                      <exclude>com.opentable.components:otj-uuid</exclude>
                    </excludes>
                  </bannedDependencies>
                  <requireFilesDontExist>
                    <files>
                      <file>${basedir}/src/main/resources/log4j.xml</file>
                      <file>${basedir}/src/test/resources/log4j.xml</file>
                    </files>
                  </requireFilesDontExist>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of resteasy jackson2 provider -->
            <execution>
              <id>ban-resteasy-jackson2-provider</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-resteasy-jackson2-provider}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>org.jboss.resteasy:resteasy-jackson2-provider</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of joda-time, supplanted by JSR310 time in Java 8 -->
            <execution>
              <id>ban-joda-time</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-joda-time}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>joda-time:joda-time</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of old org.codehaus.jackson artifacts -->
            <execution>
              <id>ban-codehaus-jackson</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-codehaus-jackson}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>org.codehaus.jackson:*</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of Spring, for writing modules which are DI-independent -->
            <execution>
              <id>ban-spring</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-spring}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>org.springframework</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of Guice, for writing modules which are DI-independent -->
            <execution>
              <id>ban-guice</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-guice}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>com.google.inject</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of RESTeasy, for when you're building Jersey stuff -->
            <execution>
              <id>ban-resteasy</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-resteasy}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>org.jboss.resteasy</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Allow optional banning of Jersey, which we replaced with RESTeasy but
                 some external components still use
              -->
            <execution>
              <id>ban-jersey</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-jersey}</skip>
                <rules>
                  <bannedDependencies combine.children="append">
                    <excludes combine.children="append">
                      <exclude>com.sun.jersey:jersey-core</exclude>
                      <exclude>org.glassfish.jersey.core:jersey-common</exclude>
                    </excludes>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
            <!-- Ban circular dependencies by default, as they are generally a design smell -->
            <execution>
              <id>ban-circular-dependencies</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <skip>${ot.build.allow-circular-dependencies}</skip>
                <rules>
                  <banCircularDependencies />
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <compilerArgs combine.children="append">
              <arg>-parameters</arg>
            </compilerArgs>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${dep.plugin.surefire.version}</version>
          <configuration>
            <!-- Make sure we run all tests including those that do not have 'Test' in the name
                 (default includes *Test and Test* only) -->
            <includes>
              <include>**/*.java</include>
            </includes>
            <!-- And static nested classes ('$' in the name excluded by default) -->
            <excludes>
              <exclude />
            </excludes>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.nesscomputing.mojo</groupId>
          <artifactId>numbers-maven-plugin</artifactId>
          <version>2.0</version>
          <executions>
            <execution>
              <id>default-validate</id>
              <phase>validate</phase>
              <goals>
                <goal>get</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <activeGroups>
              <activeGroup>snapshot</activeGroup>
              <activeGroup>release</activeGroup>
            </activeGroups>
            <propertyGroups>
              <propertyGroup>
                <id>snapshot</id>
                <!-- This group is used for the snapshot builds.
                     It generates artifact names with a date
                -->
                <activeOnRelease>false</activeOnRelease>
                <onMissingProperty>ignore</onMissingProperty>
                <properties>
                  <property>
                    <name>ot.build.name</name>
                    <value>${project.artifactId}-${project.version}-#{ot.build.timestamp}_${user.name}</value>
                  </property>
                  <property>
                    <name>ot.build.number</name>
                    <value>#{ot.build.timestamp}_${user.name}</value>
                  </property>
                </properties>
              </propertyGroup>
              <propertyGroup>
                <id>release</id>
                <!-- This group is used for the release builds.
                     It generates normal artifact names
                -->
                <activeOnSnapshot>false</activeOnSnapshot>
                <properties>
                  <property>
                    <name>ot.build.name</name>
                    <value>${project.artifactId}-${project.version}</value>
                  </property>
                  <property>
                    <name>ot.build.number</name>
                    <value>release_${user.name}</value>
                  </property>
                </properties>
              </propertyGroup>
            </propertyGroups>
            <dates>
              <date>
                <export>true</export>
                <id>ot.build.timestamp</id>
                <format>yyyyMMdd_HHmmss</format>
                <timezone>UTC</timezone>
              </date>
            </dates>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <configuration>
            <rulesets>
              <ruleset>otj-pmd-rulesets/ot-pmd.xml</ruleset>
            </rulesets>
            <excludeRoots>
              <excludeRoot>target/generated-sources</excludeRoot>
            </excludeRoots>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.opentable</groupId>
              <artifactId>otj-pmd-rulesets</artifactId>
              <version>${dep.plugin.pmd.ruleset.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <failOnError>true</failOnError>
            <failOnWarning>true</failOnWarning>
            <failOnInfo>false</failOnInfo>
            <minSeverity>info</minSeverity>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.basepom.maven</groupId>
          <artifactId>duplicate-finder-maven-plugin</artifactId>
          <configuration combine.children="append">
            <exceptions>
              <exception>
                <conflictingDependencies>
                  <dependency>
                    <groupId>com.opentable.components</groupId>
                    <artifactId>otj-logging-kafka</artifactId>
                  </dependency>
                  <dependency>
                    <groupId>org.apache.kafka</groupId>
                    <artifactId>kafka-clients</artifactId>
                  </dependency>
                </conflictingDependencies>
                <resources>
                  <resource>kafka/kafka-version.properties</resource>
                </resources>
              </exception>
            </exceptions>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- Provide a build number -->
      <plugin>
        <groupId>com.nesscomputing.mojo</groupId>
        <artifactId>numbers-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

  <!-- Contains a number of "global" dependencies that should never change across our code base. -->
  <dependencyManagement>
    <dependencies>
      <!-- OT module dependencies -->
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-core</artifactId>
        <version>1.6.0</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-spring</artifactId>
        <version>1.2.1</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-pausedetector</artifactId>
        <version>2.0.0</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.logging</groupId>
        <artifactId>otj-otl</artifactId>
        <version>${dep.otj-otl.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-logging</artifactId>
        <version>${dep.otj-logging.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-logging-kafka</artifactId>
        <version>${dep.otj-logging.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-logging-jetty</artifactId>
        <version>${dep.otj-logging.version}</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-executors</artifactId>
        <version>2.1.1</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-conservedheaders</artifactId>
        <version>2.1.1</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-scopes</artifactId>
        <version>2.0.1</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jaxrs-shared</artifactId>
        <version>${dep.otj-jaxrs.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jaxrs-client</artifactId>
        <version>${dep.otj-jaxrs.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jaxrs-clientfactory-resteasy</artifactId>
        <version>${dep.otj-jaxrs.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jaxrs-clientfactory-jersey</artifactId>
        <version>${dep.otj-jaxrs.version}</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jackson</artifactId>
        <version>2.1.0</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-metrics</artifactId>
        <version>2.4.4</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-kafka</artifactId>
        <version>2.2.0</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-server</artifactId>
        <version>${dep.otj-server.version}</version>
      </dependency>
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-server</artifactId>
        <version>${dep.otj-server.version}</version>
        <classifier>tests</classifier>
      </dependency>

      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-jvm</artifactId>
        <version>1.1.4</version>
      </dependency>

      <dependency>
        <groupId>com.opentable.service.discovery</groupId>
        <artifactId>discovery-client</artifactId>
        <version>${dep.discovery.version}</version>
      </dependency>

      <!-- SnakeYml -->
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>1.16</version>
      </dependency>

      <!-- Spring -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${dep.spring.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${dep.spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${dep.spring.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.asynchttpclient</groupId>
        <artifactId>async-http-client</artifactId>
        <version>2.0.21</version>
      </dependency>
      <!-- This version declaration can be removed once Spring's javassist dep is >= asynchttpclient's -->
      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.21.0-GA</version>
      </dependency>

      <!-- Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>23.0</version>
      </dependency>

      <!-- RESTeasy -->
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-spring</artifactId>
        <version>${dep.resteasy.version}</version>
        <exclusions>
          <exclusion>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jboss.spec.javax.ws.rs</groupId>
            <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.2_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jettison-provider</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson2-provider</artifactId>
        <version>${dep.resteasy.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>${dep.resteasy.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.jboss.spec.javax.ws.rs</groupId>
            <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.2_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>${dep.resteasy.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.jboss.spec.javax.ws.rs</groupId>
            <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.2_spec</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Kafka -->
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.12</artifactId>
        <version>${dep.kafka.version}</version>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.12</artifactId>
        <classifier>test</classifier>
        <version>${dep.kafka.version}</version>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${dep.kafka.version}</version>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${dep.kafka.version}</version>
        <classifier>test</classifier>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>${dep.kafka.version}</version>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.xerial.snappy</groupId>
        <artifactId>snappy-java</artifactId>
        <version>1.1.2.6</version>
      </dependency>

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

      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>3.4.10</version>
        <exclusions>
          <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- logging -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${dep.logback.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>${dep.logback.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${dep.slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
        <version>${dep.slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${dep.slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${dep.slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${dep.slf4j.version}</version>
      </dependency>

      <!-- Apache commons components -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.5</version>
      </dependency>
      <dependency>
        <groupId>commons-configuration</groupId>
        <artifactId>commons-configuration</artifactId>
        <version>1.10</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.9.2</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Codahale Metrics -->
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-core</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-annotation</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-servlet</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-servlets</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-logback</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-json</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jetty9</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jersey</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jdbi</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-httpclient</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-graphite</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-healthchecks</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jvm</artifactId>
        <version>${dep.metrics.version}</version>
      </dependency>

      <!-- Apache httpclient -->
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.6</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Jetty -->
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-http</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-util</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-util-ajax</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlet</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlets</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-jmx</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-continuation</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-io</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-client</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${dep.jetty.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.eclipse.jetty.orbit</groupId>
            <artifactId>javax.servlet</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-security</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-xml</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-proxy</artifactId>
        <version>${dep.jetty.version}</version>
      </dependency>

      <!-- jackson -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-parameter-names</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-guava</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-joda</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jdk8</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-smile</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-yaml</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-mrbean</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-afterburner</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-jaxb-annotations</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <!-- New location for JSR-310 support, among other things. -->
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-modules-java8</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.jaxrs</groupId>
        <artifactId>jackson-jaxrs-base</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.jaxrs</groupId>
        <artifactId>jackson-jaxrs-json-provider</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>

      <!-- Java APIs -->
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.5</version>
      </dependency>
      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
      </dependency>

      <!-- Database related -->
      <dependency>
        <groupId>com.opentable.components</groupId>
        <artifactId>otj-sql</artifactId>
        <version>${dep.otj-sql.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-core</artifactId>
        <version>${dep.jdbi3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-guava</artifactId>
        <version>${dep.jdbi3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-sqlobject</artifactId>
        <version>${dep.jdbi3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-spring</artifactId>
        <version>${dep.jdbi3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-postgres</artifactId>
        <version>${dep.jdbi3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.4.1212</version>
      </dependency>
      <dependency>
        <groupId>com.mchange</groupId>
        <artifactId>c3p0</artifactId>
        <version>0.9.5.2</version>
      </dependency>
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>4.0.3</version>
      </dependency>

      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>5.1</version>
      </dependency>

      <!-- Testing -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
      </dependency>
      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>3.4</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.6.1</version>
      </dependency>
      <dependency>
        <groupId>org.objenesis</groupId>
        <artifactId>objenesis</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>findbugs-annotations</artifactId>
        <version>${dep.findbugs.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>test-log-config</id>
      <activation>
        <file>
          <missing>.no-test-log-config</missing>
        </file>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.opentable.testing</groupId>
          <artifactId>otj-test-log-config</artifactId>
          <version>1.1.2</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <!-- ======================================================================== -->
    <!-- =                                                                      = -->
    <!-- = Service profile. Builds a tarball which is a deployable unit.        = -->
    <!-- =                                                                      = -->
    <!-- ======================================================================== -->

    <profile>
      <id>build-service</id>
      <activation>
        <file>
          <exists>.build-service</exists>
        </file>
      </activation>
      <properties>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${dep.spring-boot.version}</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>assemble-app</id>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <transformers combine.self="override">
                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>META-INF/spring.handlers</resource>
                </transformer>
                <transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                  <resource>META-INF/spring.factories</resource>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>META-INF/spring.schemas</resource>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.basepom.maven.shade.CollectingManifestResourceTransformer">
                  <mainClass>${ot.mainclass}</mainClass>
                  <collectSections>true</collectSections>
                  <manifestEntries>
                    <X-BasePOM-Build-Id>${basepom.shaded.id}</X-BasePOM-Build-Id>
                    <X-BasePOM-Name>${project.name}</X-BasePOM-Name>
                    <X-BasePOM-Git-Commit-Id>${git.commit.id}</X-BasePOM-Git-Commit-Id>
                  </manifestEntries>
                </transformer>
              </transformers>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>check-service-build</id>
                <phase>validate</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireProperty>
                      <property>ot.mainclass</property>
                      <message>You must specify "ot.mainclass" as a Maven property for a service-enabled build.</message>
                    </requireProperty>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- Build a Docker image -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.3.2</version>
            <executions>
              <execution>
                <id>build-docker</id>
                <phase>deploy</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>otpl-package-docker</executable>
                  <arguments>
                    <argument>${project.artifactId}</argument>
                    <argument>${project.build.finalName}</argument>
                    <argument>${project.build.directory}/${project.build.finalName}.jar</argument>
                  </arguments>
                  <workingDirectory>${otpl.project.dir}</workingDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- ======================================================================== -->
    <!-- =                                                                      = -->
    <!-- = Clirr Profile. Run clirr to check binary compat of a new release     = -->
    <!-- =                                                                      = -->
    <!-- ======================================================================== -->
    <profile>
      <id>clirr</id>
      <activation>
        <property>
          <name>clirr</name>
        </property>

      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>clirr-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>default-clirr</id>
                <phase>verify</phase>
                <goals>
                  <goal>check-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sonar</id>
      <properties>
        <sonar.host.url>http://somewhere.invalid:9000</sonar.host.url>
        <sonar.jdbc.url>jdbc:postgresql://somewhere.invalid:5432/sonar</sonar.jdbc.url>
        <sonar.jdbc.username>FIXME</sonar.jdbc.username>
        <sonar.jdbc.password>FIXME</sonar.jdbc.password>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.sonar</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
            <version>4.4-otdev-1</version>
            <executions>
              <execution>
                <goals>
                  <goal>sonar</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile is active when *not* building for OSS -->
    <profile>
      <id>internal-build</id>
      <activation>
        <file>
          <missing>.oss-build</missing>
        </file>
      </activation>

      <distributionManagement>
        <snapshotRepository>
          <id>opentable.snapshot</id>
          <name>opentable-snapshots</name>
          <uniqueVersion>true</uniqueVersion>
          <url>https://artifactory.otenv.com/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>opentable</id>
          <name>opentable-internal</name>
          <url>https://artifactory.otenv.com/internal</url>
          <uniqueVersion>false</uniqueVersion>
        </repository>
      </distributionManagement>
    </profile>

    <!-- This profile ports basepom-oss into our spring pom -->
    <profile>
      <id>oss-build</id>
      <activation>
        <file>
          <exists>.oss-build</exists>
        </file>
      </activation>

      <distributionManagement>
        <snapshotRepository>
          <id>opentable.snapshot</id>
          <name>opentable-snapshots</name>
          <uniqueVersion>true</uniqueVersion>
          <url>https://artifactory.otenv.com/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>sonatype-nexus-staging</id>
          <name>Nexus Release Repository</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <configuration>
                <releaseProfiles>${basepom.release.profiles}</releaseProfiles>
              </configuration>
            </plugin>

            <plugin>
              <groupId>com.mycila</groupId>
              <artifactId>license-maven-plugin</artifactId>
              <version>${dep.plugin.license.version}</version>
              <dependencies>
                <dependency>
                  <groupId>org.basepom</groupId>
                  <artifactId>basepom-policy</artifactId>
                  <version>${dep.basepom-policy.version}</version>
                </dependency>
              </dependencies>
              <configuration>
                <skip>${basepom.check.skip-license}</skip>
                <skipExistingHeaders>${basepom.license.skip-existing}</skipExistingHeaders>
                <failIfMissing>${basepom.check.fail-license}</failIfMissing>
                <header>license/basepom-apache-license-header.txt</header>
                <headerDefinitions>
                  <headerDefinition>license/xml-prefix.xml</headerDefinition>
                </headerDefinitions>
                <mapping>
                  <xml>XML_PREFIX</xml>
                  <java>SLASHSTAR_STYLE</java>
                  <yaml>SCRIPT_STYLE</yaml>
                </mapping>
                <strictCheck>true</strictCheck>
                <aggregate>true</aggregate>
                <useDefaultExcludes>true</useDefaultExcludes>
                <encoding>${project.build.sourceEncoding}</encoding>
                <excludes>
                  <exclude>.*/**</exclude>
                  <exclude>**/*.md</exclude>
                  <exclude>**/*.rst</exclude>
                  <exclude>**/*.adoc</exclude>
                  <exclude>**/*.sh</exclude>
                  <exclude>**/*.txt</exclude>
                  <exclude>**/*.thrift</exclude>
                  <exclude>**/*.proto</exclude>
                  <exclude>**/*.g</exclude>
                  <exclude>**/*.releaseBackup</exclude>
                  <exclude>**/*.vm</exclude>
                  <exclude>**/*.st</exclude>
                  <exclude>**/*.raw</exclude>
                  <exclude>**/*.ser</exclude>
                  <exclude>**/src/license/**</exclude>
                </excludes>
                <includes>
                  <include>src/**</include>
                  <include>**/pom.xml</include>
                </includes>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>${dep.plugin.gpg.version}</version>
              <configuration>
                <useAgent>true</useAgent>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>

        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>default</id>
                <phase>${basepom.check.phase-license}</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Active during OSS release:perform -->
    <profile>
      <id>basepom.oss-release</id>
      <properties>
        <!-- tests run in the preparation step of the release -->
        <skipTests>true</skipTests>
      </properties>
      <build>
        <plugins>
          <!-- oss requires a javadoc jar. Build one when releasing. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- if necessary, build a scaladoc jar. Disabled by default. -->
          <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-scaladocs</id>
                <phase>package</phase>
                <configuration>
                  <skip>${basepom.oss.skip-scala-doc}</skip>
                </configuration>
                <goals>
                  <goal>doc-jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Sign artifacts using gpg for oss upload -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
