<?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>0.14.0</version>
    </parent>

    <artifactId>mutiny</artifactId>
    <name>SmallRye Mutiny :: Core library</name>
    <description>Intuitive Event-Driven Reactive Programming Library for Java</description>

    <properties>
        <revapi.skip>false</revapi.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny-test-utils</artifactId>
        </dependency>

        <dependency>
            <groupId>io.smallrye.common</groupId>
            <artifactId>smallrye-common-annotation</artifactId>
            <version>${smallrye-common-annotation.version}</version>
        </dependency>

        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>reactive-streams-junit5-tck</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams-tck</artifactId>
            <version>${reactive-streams.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <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>
                            <!-- Disable TestNG -->
                            <testNGArtifactName>none:none</testNGArtifactName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.moditect</groupId>
                <artifactId>moditect-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-module-infos</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                            <module>
                                <moduleInfoFile>src/main/module/module-info.java</moduleInfoFile>
                            </module>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.revapi</groupId>
                <artifactId>revapi-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <id>java-9+</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <!-- wonderful reliability of javadoc used with modules breaking on non exposed packages -->
                            <source>8</source>
                            <release>8</release>
                            <detectJavaApiLink>false</detectJavaApiLink>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>