<?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.smallrye</groupId>
        <artifactId>smallrye-build-parent</artifactId>
        <version>48</version>
    </parent>

    <groupId>io.smallrye.reactive</groupId>
    <artifactId>mutiny-project</artifactId>
    <version>3.1.1</version>
    <packaging>pom</packaging>

    <name>SmallRye Mutiny - Parent</name>
    <description>Intuitive Event-Driven Reactive Programming Library for Java</description>
    <url>https://smallrye.io/smallrye-mutiny</url>

    <inceptionYear>2019</inceptionYear>
    <organization>
        <name>SmallRye</name>
        <url>https://wwww.smallrye.io</url>
    </organization>

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

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

    <developers>
        <developer>
            <id>cescoffier</id>
            <name>Clement Escoffier</name>
            <email>clement[AT]apache[DOT]org</email>
            <url>https://github.com/cescoffier</url>
        </developer>
        <developer>
            <id>jponge</id>
            <name>Julien Ponge</name>
            <email>julien[AT]ponge[DOT]org</email>
            <url>https://github.com/jponge</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:smallrye/smallrye-mutiny.git</connection>
        <developerConnection>scm:git:git@github.com:smallrye/smallrye-mutiny.git</developerConnection>
        <url>https://github.com/smallrye/smallrye-mutiny</url>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>test-utils</module>
        <module>implementation</module>
        <module>reactive-streams-tck-tests</module>
        <module>rxjava3</module>
        <module>reactor</module>
        <module>reactive-streams-operators</module>
        <module>reactive-streams-operators-jakarta</module>
        <module>documentation</module>
        <module>context-propagation</module>
        <module>kotlin</module>
        <module>bom</module>
        <module>math</module>
        <module>workshop-examples</module>
        <module>no-deps</module>
    </modules>

    <properties>
        <argLine/>
        <jacocoArgLine/>

        <jctools-core.version>4.0.5</jctools-core.version>
        <mutiny-zero.version>1.1.1</mutiny-zero.version>
        <reactive-streams.version>1.0.4</reactive-streams.version>
        <rxjava3.version>3.1.12</rxjava3.version>
        <reactor-core.version>3.8.3</reactor-core.version>

        <microprofile-reactive-streams.version>3.0.1</microprofile-reactive-streams.version>
        <microprofile-context-propagation.version>1.3</microprofile-context-propagation.version>
        <smallrye-context-propagation.version>2.3.0</smallrye-context-propagation.version>
        <smallrye-config.version>3.16.0</smallrye-config.version>
        <smallrye-common-annotation.version>2.16.0</smallrye-common-annotation.version>
        <jakarta.enterprise.cdi-api.version>4.1.0</jakarta.enterprise.cdi-api.version>
        <jakarta.annotation-api.version>3.0.0</jakarta.annotation-api.version>

        <junit.version>6.0.0</junit.version>
        <assertj-core.version>3.27.7</assertj-core.version>
        <junit4.version>4.13.2</junit4.version>
        <awaitility.version>4.3.0</awaitility.version>
        <version.surefire.plugin>3.5.4</version.surefire.plugin>
        <testng.version>7.12.0</testng.version>
        <testng-junit5-engine.version>1.1.0</testng-junit5-engine.version>

        <mockito-core.version>5.21.0</mockito-core.version>
        <byte-buddy.version>1.18.5</byte-buddy.version>

        <revapi-maven-plugin.version>0.15.1</revapi-maven-plugin.version>
        <revapi-java.version>0.28.4</revapi-java.version>
        <revapi-reporter-json.version>0.5.1</revapi-reporter-json.version>
        <revapi-reporter-text.version>0.15.1</revapi-reporter-text.version>
        <revapi.skip>true</revapi.skip>

        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <maven-compiler-plugin.release>17</maven-compiler-plugin.release>

        <!-- Configuration of mutiny-kotlin module -->
        <kotlin.version>2.2.21</kotlin.version>
        <kotlin.compiler.apiVersion>1.8</kotlin.compiler.apiVersion>
        <kotlin.compiler.languageVersion>1.8</kotlin.compiler.languageVersion>
        <coroutines.version>1.10.2</coroutines.version>
        <kotlin.compiler.jvmTarget>${maven.compiler.target}</kotlin.compiler.jvmTarget>
        <dokka.version>2.1.0</dokka.version>

        <jandex-maven-plugin.version>3.5.3</jandex-maven-plugin.version>
        <find-and-replace-maven-plugin.version>1.2.0</find-and-replace-maven-plugin.version>
        <jreleaser-maven-plugin.version>1.22.0</jreleaser-maven-plugin.version>
        <cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
        <maven-shade-plugin.version>3.6.1</maven-shade-plugin.version>
        <maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
        <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
        <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
        <maven-dependency-plugin.version>3.10.0</maven-dependency-plugin.version>
        <bom-builder3.version>1.3.2</bom-builder3.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jctools</groupId>
                <artifactId>jctools-core</artifactId>
                <version>${jctools-core.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny-zero-flow-adapters</artifactId>
                <version>${mutiny-zero.version}</version>
            </dependency>
            <dependency>
                <groupId>org.reactivestreams</groupId>
                <artifactId>reactive-streams</artifactId>
                <version>${reactive-streams.version}</version>
            </dependency>
            <dependency>
                <groupId>io.reactivex.rxjava3</groupId>
                <artifactId>rxjava</artifactId>
                <version>${rxjava3.version}</version>
            </dependency>
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-core</artifactId>
                <version>${reactor-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
                <artifactId>microprofile-reactive-streams-operators-api</artifactId>
                <version>${microprofile-reactive-streams.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.microprofile.context-propagation</groupId>
                <artifactId>microprofile-context-propagation-api</artifactId>
                <version>${microprofile-context-propagation.version}</version>
            </dependency>

            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny-test-utils</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-context-propagation</artifactId>
                <version>${smallrye-context-propagation.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.smallrye.config</groupId>
                <artifactId>smallrye-config</artifactId>
                <version>${smallrye-config.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit4.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- Overridden from Smallrye build parent for module-info.java support -->
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>${version.impsort.plugin}</version>
                    <configuration>
                        <compliance>${maven-compiler-plugin.release}</compliance>
                        <groups>java.,javax.,jakarta.,org.,com.</groups>
                        <staticGroups>*</staticGroups>
                        <skip>${format.skip}</skip>
                        <removeUnused>true</removeUnused>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sort-imports</id>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <release>${maven-compiler-plugin.release}</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version.surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <phase>generate-test-resources</phase>
                            <configuration>
                                <destFile>${project.build.directory}/jacoco.exec</destFile>
                                <propertyName>jacocoArgLine</propertyName>
                                <append>true</append>
                            </configuration>
                        </execution>
                        <execution>
                            <id>generate-report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <phase>verify</phase>
                            <configuration>
                                <outputDirectory>${project.build.directory}</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>io.smallrye</groupId>
                    <artifactId>jandex-maven-plugin</artifactId>
                    <version>${jandex-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>make-index</id>
                            <goals>
                                <goal>jandex</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.revapi</groupId>
                    <artifactId>revapi-maven-plugin</artifactId>
                    <version>${revapi-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.revapi</groupId>
                            <artifactId>revapi-java</artifactId>
                            <version>${revapi-java.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.revapi</groupId>
                            <artifactId>revapi-reporter-json</artifactId>
                            <version>${revapi-reporter-json.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.revapi</groupId>
                            <artifactId>revapi-reporter-text</artifactId>
                            <version>${revapi-reporter-text.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-compatibility</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <checkDependencies>false</checkDependencies>
                                <analysisConfigurationFiles>
                                    <file>${project.basedir}/revapi.json</file>
                                </analysisConfigurationFiles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>io.github.floverfelt</groupId>
                    <artifactId>find-and-replace-maven-plugin</artifactId>
                    <version>${find-and-replace-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.cyclonedx</groupId>
                    <artifactId>cyclonedx-maven-plugin</artifactId>
                    <version>${cyclonedx-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>makeBom</goal>
                            </goals>
                            <configuration>
                                <skipNotDeployed>false</skipNotDeployed>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <force>true</force>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <configuration>
                        <forceCreation>true</forceCreation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin.version}</version>
                    <configuration>
                        <scmCommentPrefix>chore(release):</scmCommentPrefix>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <force>true</force>
                </configuration>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <configuration>
                            <reportOutputDirectory>target/generated-docs/apidocs</reportOutputDirectory>
                            <excludePackageNames>*.quickstart:*.snippets</excludePackageNames>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.revapi</groupId>
                <artifactId>revapi-maven-plugin</artifactId>
                <configuration>
                    <!-- Do not compute compatibility on the documentation -->
                    <skip>${revapi.skip}</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <modules>
                <module>release</module>
            </modules>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>running-in-ci</id>
            <activation>
                <property>
                    <name>env.CI</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <environmentVariables>
                                <DEFAULT_MUTINY_AWAIT_TIMEOUT>120</DEFAULT_MUTINY_AWAIT_TIMEOUT>
                            </environmentVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>quick-build</id>
            <activation>
                <property>
                    <name>quickly</name>
                </property>
            </activation>
            <properties>
                <skipTests>true</skipTests>
                <skipITs>true</skipITs>
                <maven.javadoc.skip>true</maven.javadoc.skip>
                <enforcer.skip>true</enforcer.skip>
                <cyclonedx.skip>true</cyclonedx.skip>
            </properties>
            <build>
                <defaultGoal>clean install</defaultGoal>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.jetbrains.dokka</groupId>
                            <artifactId>dokka-maven-plugin</artifactId>
                            <version>${dokka.version}</version>
                            <configuration>
                                <skip>true</skip>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>jreleaser</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <version>${jreleaser-maven-plugin.version}</version>
                        <inherited>false</inherited>
                        <configuration>
                            <projectVersionPattern>SEMVER</projectVersionPattern>
                            <jreleaser>
                                <release>
                                    <github>
                                        <owner>smallrye</owner>
                                        <name>smallrye-mutiny</name>
                                        <enabled>true</enabled>
                                        <overwrite>true</overwrite>
                                        <changelog>
                                            <preset>conventional-commits</preset>
                                            <links>true</links>
                                            <skipMergeCommits>true</skipMergeCommits>
                                            <formatted>ALWAYS</formatted>
                                            <extraProperties>
                                                <categorizeScopes>true</categorizeScopes>
                                            </extraProperties>
                                            <hide>
                                                <contributors>
                                                    <contributor>GitHub</contributor>
                                                    <contributor>dependabot[bot]</contributor>
                                                    <contributor>bot</contributor>
                                                    <contributor>jreleaserbot</contributor>
                                                    <contributor>smallrye-ci</contributor>
                                                </contributors>
                                            </hide>
                                        </changelog>
                                        <discussionCategoryName>Announcements</discussionCategoryName>
                                    </github>
                                </release>
                            </jreleaser>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
