<?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-oss</artifactId>
    <version>63</version>
  </parent>

  <scm>
    <connection>scm:git:git://github.com/opentable/otj-pg-embedded.git</connection>
    <developerConnection>scm:git:git@github.com:opentable/otj-pg-embedded.git</developerConnection>
    <url>http://github.com/opentable/otj-pg-embedded</url>
    <tag>otj-pg-embedded-1.1.1</tag>
  </scm>

  <groupId>com.opentable.components</groupId>
  <artifactId>otj-pg-embedded</artifactId>
  <version>1.1.1</version>
  <description>Embedded PostgreSQL driver</description>
  <url>https://github.com/opentable/otj-pg-embedded</url>

  <properties>
    <basepom.check.skip-spotbugs>true</basepom.check.skip-spotbugs>
    <project.build.targetJdk>11</project.build.targetJdk>
    <maven.compiler.target>${project.build.targetJdk}</maven.compiler.target>
    <project.build.systemJdk>${project.build.targetJdk}</project.build.systemJdk>
    <dep.testcontainers.version>1.19.8</dep.testcontainers.version>
    <dep.postgres-jdbc.version>42.7.3</dep.postgres-jdbc.version>
    <dep.liquibase.version>4.23.1</dep.liquibase.version>
    <dep.slf4j.version>1.7.36</dep.slf4j.version>
    <dep.jackson.version>2.15.2</dep.jackson.version>
    <dep.flyway.version>10.10.0</dep.flyway.version>
    <dep.commons-lang.version>3.14.0</dep.commons-lang.version>
    <dep.commons-compress.version>1.26.0</dep.commons-compress.version>
    <dep.junit.version>4.13.2</dep.junit.version>
    <dep.junit5.version>5.8.2</dep.junit5.version>
    <basepom.test.timeout>1800</basepom.test.timeout>
    <basepom.javadoc.skip>false</basepom.javadoc.skip>
    <basepom.oss.skip-scala-doc>true</basepom.oss.skip-scala-doc>
    <basepom.check.skip-javadoc>false</basepom.check.skip-javadoc>
    <basepom.check.fail-javadoc>false</basepom.check.fail-javadoc>
    <moduleName>com.opentable.components.otj.pg.embedded</moduleName>
    <basepom.central-publishing.repo-id>ot-central</basepom.central-publishing.repo-id>
    <basepom.deploy.snapshot.repo-id>opentable.snapshot</basepom.deploy.snapshot.repo-id>
    <basepom.deploy.snapshot.url>https://artifactory.otenv.com/snapshots</basepom.deploy.snapshot.url>
    <basepom.release.profiles>basepom.central-release</basepom.release.profiles>
  </properties>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>opentable</id>
      <name>OpenTable</name>
      <url>https://github.com/opentable</url>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${dep.slf4j.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${dep.commons-lang.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>${dep.commons-compress.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
      <optional>true</optional>
      <version>${dep.flyway.version}</version>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-database-postgresql</artifactId>
      <optional>true</optional>
      <scope>runtime</scope>
      <version>${dep.flyway.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-toml</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.liquibase</groupId>
      <artifactId>liquibase-core</artifactId>
      <version>${dep.liquibase.version}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>${dep.postgres-jdbc.version}</version>
    </dependency>

    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>postgresql</artifactId>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${dep.junit.version}</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${dep.junit5.version}</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${dep.slf4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>postgresql</artifactId>
        <version>${dep.testcontainers.version}</version>
       </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers</artifactId>
        <version>${dep.testcontainers.version}</version>
       </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${dep.jackson.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>default-jar</id>
            <!-- add module name to main artifact -->
            <configuration>
              <archive>
                <manifestEntries combine.children="append">
                  <Automatic-Module-Name>${moduleName}</Automatic-Module-Name>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
          <execution>
            <id>basepom.default</id>
            <!-- add module name with "test" appended to tests artifact -->
            <configuration>
              <archive>
                <manifestEntries combine.children="append">
                  <Automatic-Module-Name>${moduleName}.tests</Automatic-Module-Name>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
