<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.quarkiverse</groupId>
    <artifactId>quarkiverse-parent</artifactId>
    <version>21</version>
  </parent>
  <groupId>io.quarkiverse.operatorsdk</groupId>
  <artifactId>quarkus-operator-sdk-parent</artifactId>
  <version>7.7.0</version>
  <packaging>pom</packaging>
  <name>Quarkus - Operator SDK - Parent</name>
  <properties>
    <quarkus.version>3.32.3</quarkus.version>
    <java-operator-sdk.version>5.3.0</java-operator-sdk.version>
    <io.quarkiverse.helm.version>1.3.0</io.quarkiverse.helm.version>
  </properties>
  <scm>
    <connection>:git:git@github.com:quarkiverse/quarkus-operator-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:quarkiverse/quarkus-operator-sdk.git</developerConnection>
    <url>https://github.com/quarkiverse/quarkus-operator-sdk</url>
    <tag>7.7.0</tag>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <profiles>
      <profile>
<!-- Quarkus BOM is added automatically via an activated by default profile, this is done so that we can override the Fabric8 client version using the override-fkc profile -->
          <id>quarkus-bom</id>
          <activation>
              <activeByDefault>true</activeByDefault>
              <property>
                  <name>!default</name>
              </property>
          </activation>
          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>io.quarkus</groupId>
                      <artifactId>quarkus-bom</artifactId>
                      <version>${quarkus.version}</version>
                      <type>pom</type>
                      <scope>import</scope>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      </profile>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>!default</name>
        </property>
      </activation>
      <modules>
        <module>bom</module>
        <module>build-parent</module>
        <module>annotations</module>
        <module>common</module>
        <module>common-deployment</module>
        <module>cli</module>
        <module>core</module>
        <module>helm</module>
        <module>bundle-generator</module>
        <module>integration-tests</module>
      </modules>
    </profile>
    <profile>
      <id>quick-build</id>
      <activation>
        <property>
          <name>quickly</name>
        </property>
      </activation>
      <properties>
        <skipTests>true</skipTests>
        <skipITs>true</skipITs>
      </properties>
      <build>
        <defaultGoal>clean install</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-config-doc-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <configuration>
             <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>samples</id>
      <activation>
        <property>
          <name>!skipSamples</name>
        </property>
      </activation>
      <modules>
        <module>samples</module>
      </modules>
    </profile>
    <profile>
      <id>docs</id>
      <activation>
        <property>
          <name>!skipDocs</name>
        </property>
      </activation>
      <modules>
        <module>docs</module>
      </modules>
    </profile>
    <profile>
      <id>native-image</id>
      <activation>
        <property>
          <name>native</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <!-- Needed to skip running the tests in VM mode. Presumably, these have been run before attempting a native build and therefore do not need to run again. -->
              <!-- Pass -DskipTests=false to the build command if you want to run the tests in VM mode anyway -->
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <quarkus.package.type>native</quarkus.package.type>
      </properties>
    </profile>
    <profile>
      <id>use-snapshots</id>
      <repositories>
        <repository>
          <id>central-portal-snapshots</id>
          <name>Central Portal Snapshots</name>
          <url>https://central.sonatype.com/repository/maven-snapshots/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central-portal-snapshots</id>
          <name>Central Portal Snapshots</name>
          <url>https://central.sonatype.com/repository/maven-snapshots/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>

    </profile>
    <profile>
      <id>override-fkc</id>
      <activation>
        <property>
<!-- We need to activate the profile by using the opposite of the property used for the default profiles -->
          <name>default</name>
        </property>
      </activation>
      <dependencyManagement>
        <dependencies>
<!-- Add the FKC BOM before the Quarkus one to override the client version -->
          <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-client-bom</artifactId>
            <version>${fkc.version}</version>
            <scope>import</scope>
            <type>pom</type>
            <optional>true</optional>
          </dependency>
          <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bom</artifactId>
            <version>${quarkus.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <modules>
        <module>bom</module>
        <module>build-parent</module>
        <module>annotations</module>
        <module>common</module>
        <module>common-deployment</module>
        <module>cli</module>
        <module>core</module>
        <module>bundle-generator</module>
        <module>integration-tests</module>
      </modules>
    </profile>
  </profiles>
</project>

