<?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>smallrye-reactive-streams-operators-project</artifactId>
        <version>1.0.5</version>
    </parent>

    <artifactId>smallrye-reactive-streams-operators</artifactId>

    <packaging>jar</packaging>

    <build>
        <defaultGoal>clean install</defaultGoal>

        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <configuration>
                            <archive>
                                <!-- Generate a jar INDEX.LIST -->
                                <index>true</index>
                                <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                                <manifestEntries>
                                    <Maven-Group-Id>${project.groupId}</Maven-Group-Id>
                                    <Maven-Artifact-Id>${project.artifactId}</Maven-Artifact-Id>
                                    <Maven-Version>${project.version}</Maven-Version>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-bnd-process</id>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <bnd><![CDATA[
          Import-Package: *
          Export-Package: io.smallrye.reactive.streams.spi, io.smallrye.reactive.streams
          Private-Package: io.smallrye.reactive.streams*
          ]]></bnd>
                </configuration>
            </plugin>

            <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>
                            <excludes>
                                <exclude>**/me/escoffier/microprofile/streams/*</exclude>
                                <exclude>**/tck/SubscriberWhitebox*</exclude>
                            </excludes>
                            <junitArtifactName>none:none</junitArtifactName>
                        </configuration>
                    </execution>
                </executions>
            </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>
    </profiles>
</project>
