<?xml version="1.0"?>
<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>
    <groupId>io.websitecd.operator</groupId>
    <artifactId>operator-root</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <url>https://github.com/websitecd/operator</url>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/websitecd/operator.git</connection>
        <developerConnection>scm:git:git@github.com:websitecd/operator.git</developerConnection>
        <url>https://github.com/websitecd/operator.git</url>
        <tag>1.2.0</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>jbossorg-dxp</id>
            <name>DXP Maven Releases</name>
            <url>https://repository.jboss.org/nexus/content/repositories/DXP/</url>
        </repository>
    </distributionManagement>

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

        <maven.compiler.parameters>true</maven.compiler.parameters>
        <surefire-plugin.version>2.22.2</surefire-plugin.version>
        <compiler-plugin.version>3.8.1</compiler-plugin.version>

        <!-- Be sure that mvn clean install and also mvn quarkus:dev works !!! -->
        <quarkus.platform.version>1.12.2.Final</quarkus.platform.version>
        <snakeyaml.version>1.28</snakeyaml.version>
        <fabric8.client.version>5.0.1</fabric8.client.version>

        <!-- By default just do maven install and let github to do the deploy on release -->
        <release.goal>install</release.goal>
    </properties>
    <dependencyManagement>
        <dependencies>
            <!-- Remove it once client is upgraded to 5.1.0 in quarkus -->
            <!-- https://github.com/quarkusio/quarkus/issues/15250 -->
<!--            <dependency>-->
<!--                <groupId>io.fabric8</groupId>-->
<!--                <artifactId>kubernetes-client-bom</artifactId>-->
<!--                <version>5.1.1</version>-->
<!--                <type>pom</type>-->
<!--                <scope>import</scope>-->
<!--            </dependency>-->
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-universe-bom</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>config</module>
        <module>config-validator</module>
        <module>service</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>${release.goal}</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
