<?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.reactive</groupId>
        <artifactId>mutiny-project</artifactId>
        <version>2.9.5</version>
    </parent>

    <artifactId>mutiny-reactive-streams-operators</artifactId>
    <name>SmallRye Mutiny - MicroProfile Reactive Streams Operators implementation</name>

    <properties>
        <version.surefire.plugin>2.22.2</version.surefire.plugin>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
            <artifactId>microprofile-reactive-streams-operators-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
            <artifactId>microprofile-reactive-streams-operators-core</artifactId>
            <version>${microprofile-reactive-streams.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <version>${jakarta.enterprise.cdi-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>${jakarta.annotation-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
            <artifactId>microprofile-reactive-streams-operators-tck</artifactId>
            <version>${microprofile-reactive-streams.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny-zero-flow-adapters</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny-test-utils</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- TestNG running in JUnit5 -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.support</groupId>
            <artifactId>testng-engine</artifactId>
            <version>${testng-junit5-engine.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <excludes>
                                <exclude>**/tck/*</exclude>
                            </excludes>
                            <testNGArtifactName>none:none</testNGArtifactName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>tck</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/tck/ReactiveStreamsEngineImplTck</include>
                            </includes>
                            <junitArtifactName>none:none</junitArtifactName>
                            <properties>
                                <configurationParameters>
                                    testng.useDefaultListeners = true
                                    testng.outputDirectory = ${project.build.directory}/testng-reports
                                    testng.verbose = 2
                                </configurationParameters>
                            </properties>
                        </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>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <properties>
                <argLine>@{jacocoArgLine}</argLine>
            </properties>

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

        <profile>
            <id>tck-with-context-propagation</id>
            <activation>
                <property>
                    <name>!disable.tck-with-cp</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.smallrye.reactive</groupId>
                    <artifactId>mutiny-smallrye-context-propagation</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>io.smallrye</groupId>
                    <artifactId>smallrye-context-propagation</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>io.smallrye.config</groupId>
                    <artifactId>smallrye-config</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>


</project>