<?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>com.kubling</groupId>
    <artifactId>kubling-core-parent</artifactId>
    <version>26.2</version>
    <name>Kubling Core and Client</name>
    <packaging>pom</packaging>

    <description>Shared runtime types, protocol contracts, and JVM clients for Kubling</description>

    <parent>
        <groupId>org.basepom</groupId>
        <artifactId>basepom-foundation</artifactId>
        <version>68</version>
    </parent>

    <scm>
        <connection>scm:git:git://github.com/kubling-community/kubling-core.git</connection>
        <developerConnection>scm:git:ssh://github.com:kubling-community/kubling-core.git</developerConnection>
        <url>https://github.com/kubling-community/kubling-core/tree/master</url>
    </scm>

    <url>https://kubling.com</url>
    <developers>
        <developer>
            <name>Ignacio Soubelet</name>
            <id>nsoubelet</id>
            <organization>Kubling</organization>
        </developer>
    </developers>

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

    <properties>
        <!-- Public artifacts target Java 21. -->
        <project.build.targetJdk>21</project.build.targetJdk>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <version.org.hibernate.core>6.6.35.Final</version.org.hibernate.core>
        <version.github.wnameless.json.json-base>2.4.3</version.github.wnameless.json.json-base>
        <version.commons-text>1.12.0</version.commons-text>
        <version.commons-lang3>3.18.0</version.commons-lang3>
        <version.commons-vfs2>2.10.0</version.commons-vfs2>
        <version.commons-logging>1.3.4</version.commons-logging>
        <version.commons-compress>1.28.0</version.commons-compress>
        <version.commons-io>2.21.0</version.commons-io>
        <version.jackson.core>2.21.5</version.jackson.core>
        <version.google.guava>33.5.0-jre</version.google.guava>
        <version.google.gson>2.10.1</version.google.gson>
        <version.opentelemetry>1.62.0</version.opentelemetry>
        <version.jcip-annotations>1.0-1</version.jcip-annotations>
        <version.hikaricp>6.3.3</version.hikaricp>
        <version.slf4j>2.0.17</version.slf4j>
        <version.logback>1.5.34</version.logback>

        <version.junit>5.12.2</version.junit>
        <version.org.mockito>5.21.0</version.org.mockito>
        <version.hamcrest>2.2</version.hamcrest>

        <version.testcontainers>2.0.3</version.testcontainers>
        <version.testcontainers-jdbc>1.21.4</version.testcontainers-jdbc>

        <version.assertj>3.27.7</version.assertj>
    </properties>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <basepom.check.skip-dependency-versions-check>false</basepom.check.skip-dependency-versions-check>
                <basepom.check.skip-javadoc>false</basepom.check.skip-javadoc>
                <basepom.check.fail-javadoc>false</basepom.check.fail-javadoc>
            </properties>
        </profile>
        <profile>
            <id>driver-release</id>
            <modules>
                <module>build</module>
            </modules>
        </profile>

        <profile>
            <id>release</id>
            <modules>
                <module>build</module>
            </modules>
            <properties>
                <basepom.check.skip-javadoc>false</basepom.check.skip-javadoc>
                <basepom.check.fail-javadoc>false</basepom.check.fail-javadoc>
                <basepom.javadoc.skip>false</basepom.javadoc.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.11.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dev</id>
            <properties>
                <skipTests>true</skipTests>
                <basepom.check.skip-all>true</basepom.check.skip-all>
            </properties>
            <modules>
                <module>build</module>
            </modules>
        </profile>
    </profiles>

    <dependencyManagement>

        <dependencies>

            <dependency>
                <groupId>com.kubling</groupId>
                <artifactId>kubling-common-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.kubling</groupId>
                <artifactId>kubling-common-core</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.kubling</groupId>
                <artifactId>kubling-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.kubling</groupId>
                <artifactId>kubling-hibernate-dialect</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.kubling</groupId>
                <artifactId>kubling-test-container</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hibernate.orm</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${version.org.hibernate.core}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.spec.javax.transaction</groupId>
                        <artifactId>jboss-transaction-api_1.2_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.activation</groupId>
                        <artifactId>javax.activation-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jakarta.activation</groupId>
                        <artifactId>jakarta.activation-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>


            <dependency>
                <groupId>jakarta.activation</groupId>
                <artifactId>jakarta.activation-api</artifactId>
                <version>2.1.2</version>
            </dependency>

            <dependency>
                <groupId>com.github.wnameless.json</groupId>
                <artifactId>json-base</artifactId>
                <version>${version.github.wnameless.json.json-base}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${version.commons-text}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${version.commons-lang3}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-vfs2</artifactId>
                <version>${version.commons-vfs2}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${version.commons-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${version.commons-compress}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${version.commons-io}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${version.jackson.core}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${version.jackson.core}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.google.guava}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${version.google.gson}</version>
            </dependency>

            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-api</artifactId>
                <version>${version.opentelemetry}</version>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-context</artifactId>
                <version>${version.opentelemetry}</version>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-sdk</artifactId>
                <version>${version.opentelemetry}</version>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-sdk-testing</artifactId>
                <version>${version.opentelemetry}</version>
            </dependency>

            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>${version.hikaricp}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${version.logback}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${version.junit}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.org.mockito}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${version.hamcrest}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>${version.hamcrest}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${version.testcontainers}</version>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>jdbc</artifactId>
                <version>${version.testcontainers-jdbc}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.assertj}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>

    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>

        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>3.10.0</version>
                <configuration>
                    <java>
                        <removeUnusedImports/>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <id>remove-unused-imports</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <!-- Fixes how test resources of a project can be used in projects dependent on it -->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-rar-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <configLocation>checkstyle.xml</configLocation>
                        <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>8.4.0</version>
                    <configuration>
                        <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>

    </build>

    <modules>
        <module>common-core</module>
        <module>client</module>
        <module>test-container</module>
        <module>hibernate-dialect</module>
    </modules>

</project>
