<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <!-- inherit common settings -->
  <parent>
    <groupId>io.stargate</groupId>
    <artifactId>stargate</artifactId>
    <version>0.0.8</version>
  </parent>
  <groupId>io.stargate.health</groupId>
  <artifactId>health-checker</artifactId>
  <properties>
    <jettyVersion>9.4.24.v20191120</jettyVersion>
    <dropwizard.version>2.0.10</dropwizard.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.stargate.db</groupId>
      <artifactId>persistence-api</artifactId>
      <version>0.0.8</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.dropwizard</groupId>
      <artifactId>dropwizard-jersey</artifactId>
      <version>${dropwizard.version}</version>
    </dependency>
    <dependency>
      <groupId>io.dropwizard</groupId>
      <artifactId>dropwizard-core</artifactId>
      <version>${dropwizard.version}</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>4.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-http</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-io</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <version>${jettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.1.0.Final</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>io.dropwizard</groupId>
      <artifactId>dropwizard-logging</artifactId>
      <version>${dropwizard.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>27.0-jre</version>
    </dependency>
    <dependency>
      <groupId>io.prometheus</groupId>
      <artifactId>simpleclient_dropwizard</artifactId>
      <version>0.9.0</version>
    </dependency>
    <dependency>
      <groupId>io.prometheus</groupId>
      <artifactId>simpleclient_servlet</artifactId>
      <version>0.9.0</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.6.2</version>
      <exclusions>
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.14.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>3.5.10</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <unpackBundle>true</unpackBundle>
          <instructions>
            <Bundle-Name>HealthChecker</Bundle-Name>
            <Bundle-Description>HealthChecker for Stargate project</Bundle-Description>
            <Bundle-SymbolicName>io.stargate.health</Bundle-SymbolicName>
            <Bundle-Activator>io.stargate.health.HealthCheckerActivator</Bundle-Activator>
            <Embed-Transitive>true</Embed-Transitive>
            <Import-Package><![CDATA[
              !org.eclipse.jetty.http,
              !org.eclipse.jetty.http.pathmap,
              !com.sun.nio.file,
              !org.eclipse.jetty.io,
              !org.eclipse.jetty.io.ssl,
              !org.eclipse.jetty.jmx,
              !org.eclipse.jetty.servlet,
              !org.eclipse.jetty.util,
              !org.eclipse.jetty.util.annotation,
              !org.eclipse.jetty.util.compression,
              !org.eclipse.jetty.util.log,
              !org.eclipse.jetty.util.resource,
              !org.eclipse.jetty.util.ssl,
              !org.eclipse.jetty.util.statistic,
              !org.eclipse.jetty.util.thread,
              !org.eclipse.jetty.websocket.common,
              !org.eclipse.jetty.websocket.common.events,
              !org.eclipse.jetty.websocket.common.extensions,
              !org.eclipse.jetty.websocket.common.io,
              !org.eclipse.jetty.websocket.common.scopes,
              !org.eclipse.jetty.websocket.servlet,
              !org.slf4j,
              !org.slf4j.helpers,
              !org.slf4j.spi,
              !org.eclipse.jetty.security,
              !ch.qos.logback.classic.*,
              !ch.qos.logback.core.*,
              !io.dropwizard.logging,
              org.osgi.framework
            ]]></Import-Package>
            <Export-Package><![CDATA[
              io.stargate.health.metrics.api,
              com.codahale.metrics
            ]]></Export-Package>
            <DynamicImport-Package>*</DynamicImport-Package>
            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
          </instructions>
          <buildDirectory>${project.basedir}/../stargate-lib</buildDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
          <outputDirectory>${project.basedir}/../stargate-lib</outputDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
