<?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.vertx</groupId>
    <artifactId>vertx-parent</artifactId>
    <version>22</version>
  </parent>

  <artifactId>vertx-rx</artifactId>
  <version>4.5.21</version>
  <packaging>pom</packaging>

  <name>Vert.x Reactive Extensions</name>

  <scm>
    <connection>scm:git:git@github.com:vert-x3/vertx-rx.git</connection>
    <developerConnection>scm:git:git@github.com:vert-x3/vertx-rx.git</developerConnection>
    <url>git@github.com:vert-x3/vertx-rx.git</url>
  </scm>

  <modules>
    <module>rx-gen</module>
    <module>rx-java-gen</module>
    <module>rx-java2-gen</module>
    <module>rx-java3-gen</module>
    <module>rx-java</module>
    <module>rx-java2</module>
    <module>rx-java3</module>
    <module>rx-junit5-providers</module>
  </modules>

  <properties>
    <micrometer.version>1.9.5</micrometer.version>
  </properties>

  <dependencyManagement>

    <dependencies>
      <dependency>
        <groupId>io.reactivex</groupId>
        <artifactId>rxjava</artifactId>
        <version>1.3.8</version>
      </dependency>
      <dependency>
        <groupId>io.reactivex.rxjava2</groupId>
        <artifactId>rxjava</artifactId>
        <version>2.2.21</version>
        <exclusions>
          <exclusion>
            <groupId>io.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>io.reactivex.rxjava3</groupId>
        <artifactId>rxjava</artifactId>
        <version>3.0.13</version>
        <exclusions>
          <exclusion>
            <groupId>io.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.reactivestreams</groupId>
        <artifactId>reactive-streams</artifactId>
        <version>1.0.3</version>
      </dependency>
      <dependency>
        <groupId>io.reactivex</groupId>
        <artifactId>rxgroovy</artifactId>
        <version>1.0.3</version>
      </dependency>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <executions>
            <execution>
              <id>process-asciidoc</id>
              <goals>
                <goal>process-asciidoc</goal>
              </goals>
              <phase>package</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <executions>
            <execution>
              <id>package-docs</id>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
              </goals>
              <configuration>
                <attach>true</attach>
                <descriptors>
                  <descriptor>${basedir}/../assembly/docs.xml</descriptor>
                </descriptors>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>

      <!-- Set logging -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>set-system-properties</goal>
            </goals>
            <configuration>
              <properties>
                <property>
                  <name>java.util.logging.SimpleFormatter.format</name>
                  <value>%4$s: %3$s - %5$s %6$s%n</value>
                </property>
              </properties>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>ensure-java-8-apis</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <release>8</release>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
