<?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-spring-boot-starter-parent</artifactId>
  <version>5.6.0</version>
  <packaging>pom</packaging>
  <name>Java Operator SDK Spring Boot Starter - Parent</name>
  <description>Spring Boot Starter for Java Operator SDK</description>
  <url>https://github.com/java-operator-sdk/operator-framework-spring-boot-starter</url>

  <licenses>
    <license>
      <name>Apache 2 License</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Daniel Lavoie</name>
      <email>dlavoie@live.ca</email>
    </developer>
    <developer>
      <name>Adam Sandor</name>
      <email>adam.sandor@container-solutions.com</email>
    </developer>
    <developer>
      <name>Attila Meszaros</name>
      <email>csviri@gmail.com</email>
    </developer>
  </developers>

  <modules>
    <module>starter</module>
    <module>starter-test</module>
    <module>samples</module>
  </modules>

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

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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>17</java.version>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.compiler.release>17</maven.compiler.release>
    <spotless.version>2.43.0</spotless.version>
    <spring-boot.version>3.3.4</spring-boot.version>
    <josdk.version>4.9.5</josdk.version>
    <surefire.version>3.5.0</surefire.version>
    <fabric8-client.version>6.13.4</fabric8-client.version>
    <jenvtest.version>0.9.7</jenvtest.version>
    <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
    <maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-client-bom</artifactId>
        <version>${fabric8-client.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework-spring-boot-starter-test</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>operator-framework</artifactId>
        <version>${josdk.version}</version>
      </dependency>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-server-mock</artifactId>
        <version>${fabric8-client.version}</version>
      </dependency>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>openshift-client</artifactId>
        <version>${fabric8-client.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>jenvtest</artifactId>
        <version>${jenvtest.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.javaoperatorsdk</groupId>
        <artifactId>jenvtest-fabric8-client-support</artifactId>
        <version>${jenvtest.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring-boot.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.version}</version>
        <configuration>
          <pom>
            <includes>
              <include>pom.xml</include>
              <inclide>./**/pom.xml</inclide>
            </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-surefire-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/*IT.java</exclude>
                <exclude>**/*E2E.java</exclude>
              </excludes>
            </configuration>
          </plugin>
          <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>
            <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>
            <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>
