<?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-build-parent</artifactId>
        <version>36</version>
    </parent>

    <artifactId>smallrye-fault-tolerance-parent</artifactId>
    <version>5.6.0</version>
    <packaging>pom</packaging>

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

    <properties>
        <version.jakarta-annotations>1.3.5</version.jakarta-annotations>
        <version.jakarta-cdi>2.0.2</version.jakarta-cdi>
        <version.jakarta-interceptors>1.2.5</version.jakarta-interceptors>
        <version.javapoet>1.13.0</version.javapoet>
        <version.jboss-logging>3.4.3.Final</version.jboss-logging>
        <version.jboss-logging-tools>2.2.1.Final</version.jboss-logging-tools>
        <version.kotlin>1.7.20</version.kotlin>
        <version.kotlin-dokka>1.7.20</version.kotlin-dokka>
        <version.kotlinx-coroutines>1.6.4</version.kotlinx-coroutines>
        <version.micrometer-core>1.9.5</version.micrometer-core>
        <version.microprofile-fault-tolerance>3.0</version.microprofile-fault-tolerance>
        <version.microprofile-config-api>2.0</version.microprofile-config-api>
        <version.microprofile-metrics-api>3.0</version.microprofile-metrics-api>
        <version.microprofile-context-propagation-api>1.2</version.microprofile-context-propagation-api>
        <!-- smallrye-config is purely used for testing -->
        <version.smallrye-config>2.12.0</version.smallrye-config>
        <!-- smallrye-metrics is purely used for testing -->
        <version.smallrye-metrics>3.0.5</version.smallrye-metrics>
        <!-- smallrye-context-propagation is purely used for testing -->
        <version.smallrye-context-propagation>1.2.2</version.smallrye-context-propagation>
        <version.smallrye-common>1.13.0</version.smallrye-common>
        <version.smallrye-reactive-utils>2.6.0</version.smallrye-reactive-utils>
        <version.opentracing>0.33.0</version.opentracing>
        <version.vertx>4.3.4</version.vertx>

        <version.arquillian>1.6.0.Final</version.arquillian>
        <version.arquillian-weld>2.1.0.Final</version.arquillian-weld>
        <version.assertj>3.23.1</version.assertj>
        <version.awaitility>4.2.0</version.awaitility>
        <version.junit-jupiter>5.9.1</version.junit-jupiter>
        <version.mutiny>1.7.0</version.mutiny>
        <version.rxjava3>3.1.5</version.rxjava3>
        <version.testng>6.14.3</version.testng>
        <version.weld-api>3.1.SP4</version.weld-api>
        <version.weld-core>3.1.8.Final</version.weld-core>
        <version.weld-junit5>2.0.2.Final</version.weld-junit5>

        <version.maven-enforcer-plugin>3.1.0</version.maven-enforcer-plugin>

        <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>5.6.0</tag>
    </scm>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${version.jakarta-annotations}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
                <version>${version.jakarta-cdi}</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.interceptor</groupId>
                <artifactId>jakarta.interceptor-api</artifactId>
                <version>${version.jakarta-interceptors}</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.context-propagation</groupId>
                <artifactId>microprofile-context-propagation-api</artifactId>
                <version>${version.microprofile-context-propagation-api}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
                <artifactId>microprofile-fault-tolerance-api</artifactId>
                <version>${version.microprofile-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.microprofile-fault-tolerance}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.squareup</groupId>
                <artifactId>javapoet</artifactId>
                <version>${version.javapoet}</version>
            </dependency>
            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-core</artifactId>
                <version>${version.micrometer-core}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye.common</groupId>
                <artifactId>smallrye-common-annotation</artifactId>
                <version>${version.smallrye-common}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny</artifactId>
                <version>${version.mutiny}</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.reactivex.rxjava3</groupId>
                <artifactId>rxjava</artifactId>
                <version>${version.rxjava3}</version>
            </dependency>
            <dependency>
                <groupId>io.vertx</groupId>
                <artifactId>vertx-core</artifactId>
                <version>${version.vertx}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.jboss-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-annotations</artifactId>
                <version>${version.jboss-logging-tools}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-processor</artifactId>
                <version>${version.jboss-logging-tools}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${version.kotlin}</version>
            </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</artifactId>
                <version>${version.smallrye-context-propagation}</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.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-coroutines-jdk8</artifactId>
                <version>${version.kotlinx-coroutines}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.assertj}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${version.awaitility}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${version.arquillian}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.container</groupId>
                <artifactId>arquillian-weld-embedded</artifactId>
                <version>${version.arquillian-weld}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-api</artifactId>
                <version>${version.weld-api}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-spi</artifactId>
                <version>${version.weld-api}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-core-impl</artifactId>
                <version>${version.weld-core}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.se</groupId>
                <artifactId>weld-se-core</artifactId>
                <version>${version.weld-core}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-junit5</artifactId>
                <version>${version.weld-junit5}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit-jupiter}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${version.testng}</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-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-core</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-kotlin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-mutiny</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-rxjava3</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-vertx</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-autoconfig-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-autoconfig-processor</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-standalone</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-fault-tolerance-standalone</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- 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.3.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

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

        <profile>
            <id>enforce-java-version</id>
            <activation>
                <property>
                    <!-- this is only for CI to be able to verify running with Java 8 -->
                    <name>!allow-java8-build</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${version.maven-enforcer-plugin}</version>
                        <executions>
                            <execution>
                                <id>enforce-java</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireJavaVersion>
                                            <version>[9,)</version>
                                            <message>This project produces a multi-release JAR. Building with JDK 9+ is required.</message>
                                        </requireJavaVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
