<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~  Copyright 2017 Red Hat, Inc.
 ~
 ~  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>io.smallrye</groupId>
    <artifactId>smallrye-parent</artifactId>
    <version>18</version>
  </parent>

  <artifactId>smallrye-fault-tolerance-parent</artifactId>
  <version>4.3.0</version>

  <packaging>pom</packaging>
  <name>SmallRye Fault Tolerance: Parent</name>
  <url>http://smallrye.io</url>

  <properties>
    <version.jakarta.enterprise.cdi.api>2.0.2</version.jakarta.enterprise.cdi.api>
    <version.jakarta.enterprise.concurrent-api>1.1.2</version.jakarta.enterprise.concurrent-api>
    <version.jakarta.interceptor-api>1.2.5</version.jakarta.interceptor-api>
    <version.mp-fault-tolerance>2.1.1</version.mp-fault-tolerance>
    <version.microprofile-config-api>1.4</version.microprofile-config-api>
    <version.microprofile-metrics-api>2.3.2</version.microprofile-metrics-api>
    <version.slf4j-simple>1.7.30</version.slf4j-simple>
    <!-- smallrye-config is purely used for testing -->
    <version.smallrye-config>1.8.0</version.smallrye-config>
    <!-- smallrye-metrics is purely used for testing -->
    <version.smallrye-metrics>2.4.2</version.smallrye-metrics>
    <version.smallrye-context-propagation>1.0.13</version.smallrye-context-propagation>
    <version.smallrye-common>1.0.2</version.smallrye-common>
    <version.opentracing>0.31.0</version.opentracing>

    <version.org.assertj.assertj-core>3.16.1</version.org.assertj.assertj-core>
    <sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  </properties>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/smallrye/smallrye-fault-tolerance/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git@github.com:smallrye/smallrye-fault-tolerance.git</connection>
    <developerConnection>scm:git:git@github.com:smallrye/smallrye-fault-tolerance.git</developerConnection>
    <url>https://github.com/smallrye/smallrye-fault-tolerance/</url>
    <tag>4.3.0</tag>
  </scm>

  <modules>
    <module>api</module>
    <module>implementation</module>
    <module>docs</module>
    <module>testsuite</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>jakarta.interceptor</groupId>
        <artifactId>jakarta.interceptor-api</artifactId>
        <version>${version.jakarta.interceptor-api}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>jakarta.enterprise.cdi-api</artifactId>
        <version>${version.jakarta.enterprise.cdi.api}</version>
        <exclusions>
          <exclusion>
            <groupId>jakarta.el</groupId>
            <artifactId>jakarta.el-api</artifactId>
          </exclusion>
          <!-- https://github.com/eclipse-ee4j/interceptor-api/issues/31 -->
          <exclusion>
            <groupId>jakarta.ejb</groupId>
            <artifactId>jakarta.ejb-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>jakarta.enterprise.concurrent</groupId>
        <artifactId>jakarta.enterprise.concurrent-api</artifactId>
        <version>${version.jakarta.enterprise.concurrent-api}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.config</groupId>
        <artifactId>microprofile-config-api</artifactId>
        <version>${version.microprofile-config-api}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.metrics</groupId>
        <artifactId>microprofile-metrics-api</artifactId>
        <version>${version.microprofile-metrics-api}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
        <artifactId>microprofile-fault-tolerance-api</artifactId>
        <version>${version.mp-fault-tolerance}</version>
        <exclusions>
          <exclusion>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation.versioning</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
        <artifactId>microprofile-fault-tolerance-tck</artifactId>
        <version>${version.mp-fault-tolerance}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-context-propagation</artifactId>
        <version>${version.smallrye-context-propagation}</version>
      </dependency>
      <dependency>
        <groupId>io.smallrye.common</groupId>
        <artifactId>smallrye-common-annotation</artifactId>
        <version>${version.smallrye-common}</version>
      </dependency>
      <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-api</artifactId>
        <version>${version.opentracing}</version>
      </dependency>
      <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-util</artifactId>
        <version>${version.opentracing}</version>
      </dependency>
      <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-mock</artifactId>
        <version>${version.opentracing}</version>
      </dependency>
      <dependency>
        <groupId>io.opentracing</groupId>
        <artifactId>opentracing-util</artifactId>
        <version>${version.opentracing}</version>
        <type>test-jar</type>
      </dependency>

      <dependency>
        <groupId>io.smallrye.config</groupId>
        <artifactId>smallrye-config</artifactId>
        <version>${version.smallrye-config}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-metrics</artifactId>
        <version>${version.smallrye-metrics}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-context-propagation-cdi</artifactId>
        <version>${version.smallrye-context-propagation}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${version.slf4j-simple}</version>
        <scope>test</scope>
      </dependency>

      <!-- Dependencies provided by the project -->
      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-fault-tolerance-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-fault-tolerance</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-fault-tolerance-context-propagation</artifactId>
        <version>${project.version}</version>
      </dependency>


      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-fault-tolerance-tracing-propagation</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.smallrye</groupId>
        <artifactId>smallrye-fault-tolerance-core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${version.org.assertj.assertj-core}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <configuration>
            <sourceHighlighter>coderay</sourceHighlighter>
            <attributes>
              <icons>font</icons>
              <pagenums />
              <version>${project.version}</version>
              <idprefix />
              <idseparator>-</idseparator>
              <allow-uri-read>true</allow-uri-read>
              <revnumber>${project.version}</revnumber>
              <revdate>${maven.build.timestamp}</revdate>
              <organization>${project.organization.name}</organization>
            </attributes>
          </configuration>
        </plugin>
        <!-- Fixes maven build warnings by making maven-resources-plugin version explicit,
          since it is not managed by smallrye parent pom -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <!-- TODO - to remove once these changes are in the Parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${version.release.plugin}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <preparationGoals>verify</preparationGoals>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
          <remoteTagging>false</remoteTagging>
          <arguments>-DskipTests ${release.arguments}</arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${version.gpg.plugin}</version>
        <configuration>
          <gpgArguments>
            <arg>--pinentry-mode</arg>
            <arg>loopback</arg>
          </gpgArguments>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>!release.maven.bug.always.be.active</name>
        </property>
      </activation>
      <modules>
        <module>release</module>
      </modules>
    </profile>
  </profiles>
</project>
