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

  <groupId>io.knotx</groupId>
  <artifactId>knotx-dependencies</artifactId>
  <version>2.0.0-RC2</version>

  <name>Knot.x Dependencies - Knot.x components and required dependencies versions</name>
  <packaging>pom</packaging>
  <description>Knot.x stack dependencies POM</description>
  <url>http://knotx.io</url>

  <inceptionYear>2016</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Tomasz Michalak</name>
      <url>https://github.com/tomaszmichalak</url>
    </developer>
    <developer>
      <name>Maciej Laskowski</name>
      <url>https://github.com/Skejven</url>
    </developer>
    <developer>
      <name>Marcin Czeczko</name>
      <url>https://github.com/marcinczeczko</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/Knotx/knotx-dependencies.git</connection>
    <developerConnection>scm:git:ssh://github.com:Knotx/knotx-dependencies.git</developerConnection>
    <url>http://github.com/Knotx/knotx-dependencies/tree/master</url>
    <tag>HEAD</tag>
  </scm>

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <properties>
    <file.encoding>UTF-8</file.encoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Stack versions -->
    <vertx.stack.version>3.7.0</vertx.stack.version>

    <!-- Dependencies versions -->
    <commons-io.version>2.6</commons-io.version>
    <commons-lang3.version>3.9</commons-lang3.version>
    <commons-collections4.version>4.2</commons-collections4.version>
    <guava.version>27.1-jre</guava.version>
    <logback-classic.version>1.2.3</logback-classic.version>
    <typesafe.version>1.3.3</typesafe.version>

    <!-- Test deps versions -->
    <junit5.version>5.4.1</junit5.version>
    <junit5-surefire.version>1.4.1</junit5-surefire.version>
    <assertj.version>3.11.1</assertj.version>
    <mockito2.version>2.22.0</mockito2.version>
    <system-rules.version>1.16.1</system-rules.version>
    <wiremock.version>2.18.0</wiremock.version>
    <free-port-finder.version>1.1.1</free-port-finder.version>

    <maven.nexus.staging.plugin.version>1.6.7</maven.nexus.staging.plugin.version>
    <maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${vertx.stack.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Vert.x - missing dependency -->
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-rx-java2-gen</artifactId>
        <version>${vertx.stack.version}</version>
      </dependency>

      <!-- Logger -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback-classic.version}</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${commons-collections4.version}</version>
      </dependency>
      <dependency>
        <groupId>com.typesafe</groupId>
        <artifactId>config</artifactId>
        <version>${typesafe.version}</version>
      </dependency>

      <!-- Test deps -->
      <dependency><!-- JUnit 5 compatible -->
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito2.version}</version>
        <scope>compile</scope> <!-- compiled against in knotx-junit5 -->
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito2.version}</version>
        <scope>compile</scope> <!-- compiled against in knotx-junit5 -->
      </dependency>
      <dependency>
        <groupId>com.github.tomakehurst</groupId>
        <artifactId>wiremock</artifactId>
        <version>${wiremock.version}</version>
        <scope>compile</scope> <!-- compiled against in knotx-junit5 -->
      </dependency>
      <dependency>
        <groupId>com.github.stefanbirkner</groupId>
        <artifactId>system-rules</artifactId>
        <version>${system-rules.version}</version>
        <scope>test</scope>
        <!-- junit:junit-dep is deprecated, and junit:junit replaces it. -->
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-surefire-provider</artifactId>
        <version>${junit5-surefire.version}</version>
      </dependency>
      <dependency>
        <groupId>me.alexpanov</groupId>
        <artifactId>free-port-finder</artifactId>
        <version>${free-port-finder.version}</version>
        <scope>compile</scope> <!-- compiled against in knotx-junit5 -->
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- JUnit5 BOM -->
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit5.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${maven.nexus.staging.plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>false</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven.gpg.plugin.version}</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven.gpg.plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
