<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>
  <groupId>org.reaktivity</groupId>
  <artifactId>ry-bom</artifactId>
  <packaging>pom</packaging>
  <version>0.647</version>
  <name>Reaktivity BOM for Java Projects</name>
  <description>Reaktivity BOM for Java Projects</description>
  <url>https://github.com/reaktivity/ry-bom.java</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>reaktivity.org</id>
      <name>The Reaktivity Project Contributors</name>
      <url>http://reaktivity.org/</url>
      <organization>The Reaktivity Project</organization>
      <organizationUrl>http://reaktivity.org/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/reaktivity/ry-bom.java</connection>
    <developerConnection>scm:git:https://github.com/reaktivity/ry-bom.java</developerConnection>
    <url>https://github.com/reaktivity/ry-bom.java</url>
  </scm>

  <repositories>
    <repository>
      <id>github</id>
      <url>https://maven.pkg.github.com/reaktivity/packages/</url>
    </repository>
  </repositories>

  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>ry</artifactId>
        <version>0.57</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>ry-start</artifactId>
        <version>0.6</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>ry-tune</artifactId>
        <version>0.1</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>ry-load</artifactId>
        <version>0.1</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>ry-stop</artifactId>
        <version>0.1</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>reaktor</artifactId>
        <version>0.174</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-echo</artifactId>
        <version>0.26</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-fan</artifactId>
        <version>0.24</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-flow</artifactId>
        <version>0.22</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-tcp</artifactId>
        <version>0.117</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-tls</artifactId>
        <version>0.185</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-http</artifactId>
        <version>0.162</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-ws</artifactId>
        <version>0.83</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-kafka</artifactId>
        <version>0.291</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-sse</artifactId>
        <version>0.90</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-mqtt</artifactId>
        <version>0.46</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-amqp</artifactId>
        <version>0.45</version>
      </dependency>
      <dependency>
        <groupId>org.reaktivity</groupId>
        <artifactId>nukleus-proxy</artifactId>
        <version>0.14</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>release</id>

      <distributionManagement>
        <downloadUrl>https://maven.pkg.github.com/reaktivity/ry-bom.java/</downloadUrl>
        <repository>
          <id>github</id>
          <url>https://maven.pkg.github.com/reaktivity/ry-bom.java/</url>
        </repository>
        <snapshotRepository>
          <id>github</id>
          <url>https://maven.pkg.github.com/reaktivity/ry-bom.java/</url>
        </snapshotRepository>
      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots</id>
                <phase>validate</phase>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed!</message>
                    </requireReleaseDeps>
                    <requireJavaVersion>
                      <version>[13,14)</version>
                    </requireJavaVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>github.packages</id>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.1.2</version>
            <configuration>
              <outputDirectory>${project.build.directory}</outputDirectory>
              <overWriteReleases>true</overWriteReleases>
              <artifactItems>
                <artifact>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <type>pom</type>
                </artifact>
              </artifactItems>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>ossrh</id>

      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
