<?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>io.scalecube</groupId>
    <artifactId>scalecube-parent-pom</artifactId>
    <version>0.2.19</version>
  </parent>

  <artifactId>scalecube-config-parent</artifactId>
  <version>0.4.16</version>
  <packaging>pom</packaging>

  <description>
    ScaleCube Config is a configuration management library for JVM based distributed applications.
  </description>
  <inceptionYear>2017</inceptionYear>
  <url>https://github.com/scalecube/scalecube-config</url>

  <repositories>
    <repository>
      <id>github</id>
      <name>GitHub Packages</name>
      <url>https://maven.pkg.github.com/scalecube/packages</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <scm>
    <url>https://github.com/scalecube/scalecube-config</url>
    <connection>scm:git:https://github.com/scalecube/scalecube-config.git</connection>
    <developerConnection>scm:git:https://github.com/scalecube/scalecube-config.git
    </developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <checkstyle.skip>false</checkstyle.skip>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <jackson.version>2.11.0</jackson.version>
    <bson4jackson.version>2.7.0</bson4jackson.version>
    <mongo-java-driver.version>3.4.2</mongo-java-driver.version>
    <slf4j.version>1.7.7</slf4j.version>
    <jersey.version>2.26-b09</jersey.version>
    <commons-io.version>2.6</commons-io.version>

    <log4j.version>2.13.3</log4j.version>
    <mockito-junit-jupiter.version>2.27.0</mockito-junit-jupiter.version>
    <junit-jupiter.version>5.1.1</junit-jupiter.version>
    <hamcrest.version>1.3</hamcrest.version>
    <!-- TODO: remove explicit version of `jna` once testcontainers fixes dependencies conflict -->
    <jna.version>5.5.0</jna.version>
  </properties>

  <modules>
    <module>config</module>
    <module>config-mongo</module>
    <module>config-http-server</module>
    <module>config-examples</module>
    <module>config-vault</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>de.undercouch</groupId>
        <artifactId>bson4jackson</artifactId>
        <version>${bson4jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongo-java-driver</artifactId>
        <version>${mongo-java-driver.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-jetty-http</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.inject</groupId>
        <artifactId>jersey-hk2</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-json-jackson</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>${jna.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Test scope -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>${mockito-junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>deploy2Github</id>
      <distributionManagement>
        <repository>
          <id>github</id>
          <name>GitHub Packages</name>
          <url>https://maven.pkg.github.com/scalecube/scalecube-config</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>deploy2Maven</id>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <name>Central Repository OSSRH</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
