<?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>
    <parent>
        <groupId>ai.wanaku</groupId>
        <artifactId>wanaku</artifactId>
        <version>0.1.1-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>parent</artifactId>
    <name>Wanaku :: Parent</name>
    <packaging>pom</packaging>

    <properties>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <!-- Plugins -->
        <maven-assembly-plugin.version>3.8.0</maven-assembly-plugin.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
        <maven-failsafe-plugin.version>3.5.5</maven-failsafe-plugin.version>
        <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
        <maven-plugin-plugin.version>3.8.1</maven-plugin-plugin.version>
        <maven-resources-plugin.version>3.4.0</maven-resources-plugin.version>
        <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
        <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
        <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
        <maven-site-plugin.version>3.21.0</maven-site-plugin.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
        <executable-suffix/>
        <distribution.directory>${project.build.directory}/distributions</distribution.directory>

        <!-- Container stuff -->
        <quarkus.container-image.registry>quay.io</quarkus.container-image.registry>
        <quarkus.container-image.group>wanaku</quarkus.container-image.group>
        <quarkus.container-image.tag>latest</quarkus.container-image.tag>
        <quarkus.container-image.build>false</quarkus.container-image.build>
        <quarkus.container-image.push>false</quarkus.container-image.push>

        <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
        <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>

        <!-- Deps -->
        <quarkus.platform.version>3.33.1</quarkus.platform.version>
        <jackson.version>2.21.2</jackson.version>
        <junit-jupiter.version>5.14.4</junit-jupiter.version>
        <quarkus-mcp-server.version>1.12.0</quarkus-mcp-server.version>
        <quarkus-oidc-proxy.version>0.5.0</quarkus-oidc-proxy.version>
        <camel.version>4.18.1</camel.version>
        <picocli.version>4.7.7</picocli.version>
        <langchain4j.version>1.13.0</langchain4j.version>
        <langchain4j-mcp.version>1.13.0-beta23</langchain4j-mcp.version>
        <quarkus-quinoa.version>2.8.1</quarkus-quinoa.version>
        <testcontainers.version>2.0.5</testcontainers.version>
        <docker-java.version>3.7.1</docker-java.version>
        <commons-pool2.version>2.13.1</commons-pool2.version>
        <jsonassert.version>1.5.3</jsonassert.version>
        <swagger-core.version>2.2.45</swagger-core.version>
        <jline.version>3.30.6</jline.version>
        <swagger-parser.version>2.1.41</swagger-parser.version>
        <quarkus-infinispan-embedded.version>2.0.1</quarkus-infinispan-embedded.version>
        <!-- TEMPORARY: quarkus-infinispan-embedded wrongly set infinispan to 16.0.9
          remove this infinispan version and bom once there is a quarkus-infinispan-embedded release
          to fix the infinispan version.
          https://github.com/quarkiverse/quarkus-infinispan-embedded/discussions/68-->
        <infinispan.version>16.0.8</infinispan.version>
        <assertj.version>3.27.7</assertj.version>
        <juniversalchardet.version>1.0.3</juniversalchardet.version>
        <jansi.version>2.4.3</jansi.version>
        <jna.version>5.18.1</jna.version>
        <commons-logging.version>1.3.5</commons-logging.version>
        <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
        <spotless-maven-plugin.version>3.5.1</spotless-maven-plugin.version>
        <quarkus-operator-sdk.version>7.7.4</quarkus-operator-sdk.version>
        <quarkus-helm.version>1.4.0</quarkus-helm.version>
        <wanaku-capabilities-sdk.version>0.1.1-SNAPSHOT</wanaku-capabilities-sdk.version>
        <commonmark.version>0.28.0</commonmark.version>
        <oauth2-oidc-sdk.version>11.37.1</oauth2-oidc-sdk.version>
        <operator-framework.version>5.3.3</operator-framework.version>
        <palantir-format.version>2.71.0</palantir-format.version>

        <assembly.descriptor>src/main/assembly/assembly.xml</assembly.descriptor>
        <dist.final.name>${project.artifactId}-${project.version}</dist.final.name>

    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>${quarkus.platform.artifact-id}</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>quarkus-operator-sdk-bom</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-bom</artifactId>
                <version>${infinispan.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>dev.langchain4j</groupId>
                <artifactId>langchain4j-bom</artifactId>
                <version>${langchain4j.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>ai.wanaku.sdk</groupId>
                <artifactId>capabilities-bom</artifactId>
                <version>${wanaku-capabilities-sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit-jupiter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.github.docker-java</groupId>
                <artifactId>docker-java-api</artifactId>
                <version>${docker-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.docker-java</groupId>
                <artifactId>docker-java-core</artifactId>
                <version>${docker-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.docker-java</groupId>
                <artifactId>docker-java-transport</artifactId>
                <version>${docker-java.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.docker-java</groupId>
                <artifactId>docker-java-transport-zerodep</artifactId>
                <version>${docker-java.version}</version>
            </dependency>

            <dependency>
                <groupId>info.picocli</groupId>
                <artifactId>picocli</artifactId>
                <version>${picocli.version}</version>
            </dependency>

            <dependency>
                <groupId>io.swagger.parser.v3</groupId>
                <artifactId>swagger-parser</artifactId>
                <version>${swagger-parser.version}</version>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-localstack</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <phase>test</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>${quarkus.platform.group-id}</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${quarkus.platform.version}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build</goal>
                                <goal>generate-code</goal>
                                <goal>generate-code-tests</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-parameters</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>${spotless-maven-plugin.version}</version>
                    <configuration>
                        <java>
                            <palantirJavaFormat>
                                <version>${palantir-format.version}</version>
                            </palantirJavaFormat>
                            <removeUnusedImports/>
                            <formatAnnotations/>
                            <forbidWildcardImports/>

                            <excludes>
                                <exclude>**/*.properties</exclude>
                                <exclude>**/*.proto</exclude>
                            </excludes>

                            <importOrder>
                                <wildcardsLast>true</wildcardsLast>
                                <order>
                                    jakarta|javax,org.w3c|org.xml,java|org|io|,,\#,org.junit|org.mockito|\#org.assertj|\#org.junit|\#org.mockito
                                </order>
                            </importOrder>
                        </java>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>apply</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
