<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.dataone</groupId>
  <artifactId>bookkeeper</artifactId>
  <version>0.1.0-SNAPSHOT</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.platform.version}</version>
          </dependency>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
          </dependency>
          <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.vintage.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <includes>
            <include>**/Test*.java</include>
            <include>**/*Test.java</include>
            <include>**/*Tests.java</include>
            <include>**/*TestCase.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven.failsafe.version}</version>
      </plugin>
      <plugin>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-maven-plugin</artifactId>
        <version>${flyway.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.version}</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven.shade.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
          <transformers>
            <transformer />
            <transformer>
              <mainClass>org.dataone.bookkeeper.Bookkeeper</mainClass>
            </transformer>
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.jar.version}</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>${maven.install.version}</version>
        <executions>
          <execution>
            <phase>install</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <groupId>${project.groupId}</groupId>
              <artifactId>${client.artifact.id}</artifactId>
              <file>${unshaded.jar.file}</file>
              <version>${project.version}</version>
              <generatePom>false</generatePom>
              <pomFile>pom.xml</pomFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${maven.deploy.version}</version>
        <executions>
          <execution>
            <id>deploy-file</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy-file</goal>
            </goals>
            <configuration>
              <url>${url}</url>
              <groupId>${project.groupId}</groupId>
              <artifactId>${client.artifact.id}</artifactId>
              <file>${unshaded.jar.file}</file>
              <version>${project.version}</version>
              <generatePom>false</generatePom>
              <pomFile>pom.xml</pomFile>
              <packaging>jar</packaging>
              <repositoryId>jenkins.dataone.org</repositoryId>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${io.fabric8.version}</version>
        <configuration>
          <images>
            <image>
              <name>${docker.repo}/bookkeeper:${docker.tag}</name>
              <build>
                <dockerFileDir>${project.basedir}</dockerFileDir>
              </build>
            </image>
          </images>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <releases />
      <snapshots />
      <id>dataone.org</id>
      <url>http://maven.dataone.org/</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>io.dropwizard</groupId>
      <artifactId>dropwizard-testing</artifactId>
      <version>2.0.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>assertj-core</artifactId>
          <groupId>org.assertj</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jersey-test-framework-provider-inmemory</artifactId>
          <groupId>org.glassfish.jersey.test-framework.providers</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.opentable.components</groupId>
      <artifactId>otj-pg-embedded</artifactId>
      <version>0.13.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-compress</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xz</artifactId>
          <groupId>org.tukaani</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spotbugs-annotations</artifactId>
          <groupId>com.github.spotbugs</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.28.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>1.4.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.4.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.4.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>jenkins.dataone.org</id>
      <name>DataONE</name>
      <url>${url}</url>
    </repository>
  </distributionManagement>
  <properties>
    <junit.vintage.version>5.4.2</junit.vintage.version>
    <dropwizard.version>2.0.0</dropwizard.version>
    <maven.surefire.version>2.22.0</maven.surefire.version>
    <client.artifact.id>bookkeeper-client</client.artifact.id>
    <maven.jar.version>3.1.2</maven.jar.version>
    <mockito.version>2.28.2</mockito.version>
    <junit.jupiter.version>5.4.2</junit.jupiter.version>
    <postgresql.version>42.2.6</postgresql.version>
    <docker.tag>0.1.0dev</docker.tag>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <io.fabric8.version>0.30.0</io.fabric8.version>
    <embedded-pg.version>0.13.1</embedded-pg.version>
    <maven.shade.version>3.2.1</maven.shade.version>
    <maven.deploy.version>3.0.0-M1</maven.deploy.version>
    <d1libclient.version>2.3.1</d1libclient.version>
    <unshaded.jar.file>target/original-bookkeeper-${project.version}.jar</unshaded.jar.file>
    <docker.repo>d1bookkeeper</docker.repo>
    <maven.compiler.version>3.8.1</maven.compiler.version>
    <junit.platform.version>1.4.2</junit.platform.version>
    <nimbus.version>7.9</nimbus.version>
    <flyway.version>5.2.4</flyway.version>
    <maven.failsafe.version>2.22.0</maven.failsafe.version>
    <maven.install.version>3.0.0-M1</maven.install.version>
  </properties>
</project>