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

  <parent>
    <groupId>com.mainstreethub</groupId>
    <artifactId>ecs-parent-pom</artifactId>
    <version>1.1.1</version>
  </parent>

  <artifactId>dropwizard-parent-pom</artifactId>
  <version>1.0.2-4</version>
  <packaging>pom</packaging>

  <scm>
    <url>https://github.com/mainstreethub/parent-poms</url>
    <connection>scm:git:git@github.com:mainstreethub/parent-poms</connection>
    <developerConnection>scm:git:git@github.com:mainstreethub/parent-poms</developerConnection>
    <tag>dropwizard-parent-pom-v1.0.2-4</tag>
  </scm>

  <properties>
    <dropwizard.version>1.0.2</dropwizard.version>

    <!--
      These versions should remain consistent with the version of Dropwizard being specified.
      Don't just update the version of Dropwizard above and not update the versions of the
      bundles/dependencies.

      Also don't add anything to this pom that isn't directly influenced by dropwizard.  The
      idea is that these dependencies should only ever change versions when we upgrade to a
      newer version of dropwizard.
    -->
    <dropwizard.api.key.bundle.version>1.0.0</dropwizard.api.key.bundle.version>
    <dropwizard.configurable.assets.bundle.version>1.0.0</dropwizard.configurable.assets.bundle.version>
    <dropwizard.json.log.bundle.version>1.0.2-0</dropwizard.json.log.bundle.version>
    <dropwizard.metrics.datadog.ecs.version>0.3.0</dropwizard.metrics.datadog.ecs.version>
    <dropwizard.redirect.bundle.version>1.0.0</dropwizard.redirect.bundle.version>
    <dropwizard.template.config.version>1.4.0</dropwizard.template.config.version>
    <dropwizard.version.bundle.version>1.0.0</dropwizard.version.bundle.version>
    <dropwizard.webjars.bundle.version>1.0.0</dropwizard.webjars.bundle.version>
    <guava.version>19.0</guava.version>
    <jackson.api.version>2.7.6</jackson.api.version>
    <jackson.version>2.7.6</jackson.version>
    <slf4j.version>1.7.21</slf4j.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>docker-image</id>
            <phase>package</phase>
            <goals>
              <goal>build-nofork</goal>
            </goals>
            <configuration>
              <images>
                <image>
                  <build>
                    <labels>
                      <archetype>dropwizard</archetype>
                    </labels>
                    <ports>
                      <port>8080</port>
                      <port>8081</port>
                    </ports>
                    <cmd>
                      <arg>server</arg>
                      <arg>classpath://config.yaml</arg>
                    </cmd>
                  </build>
                </image>
              </images>
            </configuration>
          </execution>
        </executions>
      </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <!-- During release, make the tag contain the project name since this is a shared repo. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <tagNameFormat>@{project.artifactId}-v@{project.version}</tagNameFormat>
        </configuration>
        <executions>
          <execution>
            <id>default</id>
            <goals>
              <goal>perform</goal>
            </goals>
            <configuration>
              <pomFileName>dropwizard-parent-pom/pom.xml</pomFileName>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-rules</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>commons-logging:*:*</exclude>
                    <exclude>org.apache.logging.log4j:*:*</exclude>
                    <exclude>log4j:*:*</exclude>
                  </excludes>
                  <searchTransitive>true</searchTransitive>
                </bannedDependencies>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <!-- Dependencies released as part of Dropwizard. -->
    <dependencies>
      <dependency>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-bom</artifactId>
        <version>${dropwizard.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Dependencies that Dropwizard uses. -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-guava</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jdk8</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-joda</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.module</groupId>
        <artifactId>jackson-module-parameter-names</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <!-- Main Street Hub authored bundles to use with Dropwizard. -->
      <dependency>
        <groupId>com.mainstreethub</groupId>
        <artifactId>dropwizard-metrics-datadog-ecs</artifactId>
        <version>${dropwizard.metrics.datadog.ecs.version}</version>
      </dependency>

      <!-- 3rd-party bundles to use with Dropwizard. -->
      <dependency>
        <groupId>com.mainstreethub</groupId>
        <artifactId>dropwizard-api-key-bundle</artifactId>
        <version>${dropwizard.api.key.bundle.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard-bundles</groupId>
        <artifactId>dropwizard-configurable-assets-bundle</artifactId>
        <version>${dropwizard.configurable.assets.bundle.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard-bundles</groupId>
        <artifactId>dropwizard-redirect-bundle</artifactId>
        <version>${dropwizard.redirect.bundle.version}</version>
      </dependency>
      <dependency>
        <groupId>de.thomaskrille</groupId>
        <artifactId>dropwizard-template-config</artifactId>
        <version>${dropwizard.template.config.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard-bundles</groupId>
        <artifactId>dropwizard-version-bundle</artifactId>
        <version>${dropwizard.version.bundle.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>io.dropwizard-bundles</groupId>
        <artifactId>dropwizard-webjars-bundle</artifactId>
        <version>${dropwizard.webjars.bundle.version}</version>
      </dependency>
      <dependency>
        <groupId>com.mainstreethub</groupId>
        <artifactId>dropwizard-json-log-bundle</artifactId>
        <version>${dropwizard.json.log.bundle.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
