<?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>

  <groupId>io.javaoperatorsdk</groupId>
  <artifactId>operator-framework-bom</artifactId>
  <version>5.0.3</version>
  <packaging>pom</packaging>
  <name>Operator SDK - Bill of Materials</name>
  <description>Java SDK for implementing Kubernetes operators</description>
  <url>https://github.com/operator-framework/java-operator-sdk</url>

  <licenses>
    <license>
      <name>Apache 2 License</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Attila Meszaros</name>
      <email>csviri@gmail.com</email>
    </developer>
    <developer>
      <name>Christophe Laprun</name>
      <email>claprun@redhat.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/java-operator-sdk/java-operator-sdk.git</connection>
    <developerConnection>scm:git:git@github.com/java-operator-sdk/java-operator-sdk.git</developerConnection>
    <url>https://github.com/operator-framework/java-operator-sdk/tree/master</url>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <spotless.version>2.44.3</spotless.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>micrometer-support</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework-junit-5</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.version}</version>
        <configuration>
          <pom>
            <includes>
              <include>pom.xml</include>
              <include>./**/pom.xml</include>
            </includes>
            <sortPom></sortPom>
          </pom>
          <java>
            <eclipse>
              <file>contributing/eclipse-google-style.xml</file>
            </eclipse>
            <importOrder>
              <file>contributing/eclipse.importorder</file>
            </importOrder>
            <removeUnusedImports></removeUnusedImports>
          </java>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
