<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>org.dizitart</groupId>
    <artifactId>nitrite-java</artifactId>
    <version>4.3.0</version>
    <packaging>pom</packaging>

    <name>Nitrite Database</name>
    <description>Nitrite is an open source embedded NoSQL database for Java.</description>

    <url>https://nitrite.dizitart.com</url>

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

    <developers>
        <developer>
            <name>Anindya Chatterjee</name>
            <email>anidotnet@gmail.com</email>
            <organization>Dizitart</organization>
            <organizationUrl>https://nitrite.dizitart.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/nitrite/nitrite-java.git</connection>
        <developerConnection>scm:git:https://github.com/nitrite/nitrite-java.git</developerConnection>
        <url>https://github.com/nitrite/nitrite-java.git</url>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>nitrite</module>
        <module>nitrite-bom</module>
        <module>nitrite-jackson-mapper</module>
        <module>nitrite-mvstore-adapter</module>
        <module>nitrite-rocksdb-adapter</module>
        <module>nitrite-spatial</module>
        <module>nitrite-support</module>
        <module>potassium-nitrite</module>
    </modules>

    <properties>
        <maven.compiler.release>11</maven.compiler.release>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jackson.version>2.17.1</jackson.version>
        <slf4j.version>2.0.13</slf4j.version>
        <jasypt.version>1.9.3</jasypt.version>
        <h2.version>2.2.224</h2.version>
        <rocksdb.version>9.2.1</rocksdb.version>
        <kryo5.version>5.5.0</kryo5.version>
        <jts.version>1.19.0</jts.version>
        <commons-codec.version>1.17.0</commons-codec.version>
        <commons-io.version>2.16.1</commons-io.version>
        <kotlin.version>2.0.0</kotlin.version>
        <kotlinx-serialization.version>1.7.1</kotlinx-serialization.version>
        <kotlinx-datetime.version>0.6.0</kotlinx-datetime.version>
        <lombok.version>1.18.34</lombok.version>
        <lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
        <junit.version>4.13.2</junit.version>
        <mockito.version>5.12.0</mockito.version>
        <podam.version>8.0.2.RELEASE</podam.version>
        <log4j.version>2.23.1</log4j.version>
        <awaitility.version>4.2.1</awaitility.version>
        <joda-time.version>2.12.7</joda-time.version>
        <meanbean.version>2.0.3</meanbean.version>
        <snakeyaml.version>2.2</snakeyaml.version>
        <jakarta.xml.bind-api.version>4.0.2</jakarta.xml.bind-api.version>
        <jaxb-impl.version>4.0.5</jaxb-impl.version>
        <javafaker.version>1.0.2</javafaker.version>
        <guava.version>33.2.1-jre</guava.version>
        <threetenbp.version>1.6.9</threetenbp.version>

        <error-prone.version>2.28.0</error-prone.version>
        <jacoco.version>0.8.12</jacoco.version>
        <surefire.version>3.3.0</surefire.version>
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <dokka.version>1.9.20</dokka.version>
        <animal-sniffer.version>1.23</animal-sniffer.version>
        <api-level-24.version>7.0_r2</api-level-24.version>
        <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Jackson Dependencies -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-kotlin</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!-- Kotlin Dependencies -->
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-reflect</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-serialization-json</artifactId>
                <version>${kotlinx-serialization.version}</version>
            </dependency>

            <!-- Commons Dependencies -->
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons-codec.version}</version>
            </dependency>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2-mvstore</artifactId>
                <version>${h2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.rocksdb</groupId>
                <artifactId>rocksdbjni</artifactId>
                <version>${rocksdb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.esotericsoftware.kryo</groupId>
                <artifactId>kryo5</artifactId>
                <version>${kryo5.version}</version>
            </dependency>
            <dependency>
                <groupId>org.locationtech.jts</groupId>
                <artifactId>jts-core</artifactId>
                <version>${jts.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>${jasypt.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Test Dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>uk.co.jemos.podam</groupId>
                <artifactId>podam</artifactId>
                <version>${podam.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.javafaker</groupId>
                <artifactId>javafaker</artifactId>
                <version>${javafaker.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.yaml</groupId>
                        <artifactId>snakeyaml</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda-time.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.meanbean</groupId>
                <artifactId>meanbean</artifactId>
                <version>${meanbean.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>${jakarta.xml.bind-api.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>${jaxb-impl.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.threeten</groupId>
                <artifactId>threetenbp</artifactId>
                <version>${threetenbp.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test</artifactId>
                <version>${kotlin.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-test-junit</artifactId>
                <version>${kotlin.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-datetime-jvm</artifactId>
                <version>${kotlinx-datetime.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>${lombok-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>delombok</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>delombok</goal>
                            </goals>
                            <configuration>
                                <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                                <outputDirectory>${project.build.directory}/delombok</outputDirectory>
                                <addOutputDirectory>false</addOutputDirectory>
                                <formatPreferences>
                                    <javaLangAsFQN>skip</javaLangAsFQN>
                                </formatPreferences>
                                <verbose>false</verbose>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <release>${maven.compiler.release}</release>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <compilerArgs>
                            <arg>-XDcompilePolicy=simple</arg>
                            <arg>-Xlint:-options</arg>
                        </compilerArgs>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>com.google.errorprone</groupId>
                                <artifactId>error_prone_core</artifactId>
                                <version>${error-prone.version}</version>
                            </path>
                            <path>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <configuration>
                        <sourcepath>${project.build.directory}/delombok</sourcepath>
                        <doclint>none</doclint>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                            <show>public</show>
                        </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>${animal-sniffer.version}</version>
                    <configuration>
                        <jdk>${maven.compiler.release}</jdk>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-android-compat</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <signature>
                                    <groupId>net.sf.androidscents.signature</groupId>
                                    <artifactId>android-api-level-24</artifactId>
                                    <version>${api-level-24.version}</version>
                                </signature>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <compilerPlugins>
                            <plugin>kotlinx-serialization</plugin>
                        </compilerPlugins>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-serialization</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <version>${dokka.version}</version>
                    <executions>
                        <execution>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>dokka</goal>
                                <goal>javadoc</goal>
                                <goal>javadocJar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <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>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <!-- Repository for snapshots -->
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <!-- Repository for releases -->
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
    </repositories>

</project>
