<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2021-2024 the original author or authors.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>dk.cloudcreate.essentials</groupId>
  <artifactId>parent</artifactId>
  <version>0.40.16</version>
  <packaging>pom</packaging>
  <name>essentials-parent</name>
  <description>Essentials is a set of Java version 17 (and later) building blocks built from the ground up to have no
        dependencies on other libraries, unless explicitly mentioned.

        The Essentials philosophy is to provide high level building blocks and coding constructs that allows for concise
        and strongly typed code, which doesn't depend on other libraries or frameworks, but instead allows easy integrations
        with many of the most popular libraries and frameworks such as Jackson, Spring Boot, Spring Data, JPA, etc.</description>
  <url>https://github.com/cloudcreate-dk/essentials</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Jeppe Cramon</name>
      <url>https://github.com/cloudcreate-dk</url>
      <organization>Cloud Create ApS</organization>
      <organizationUrl>https://www.cloudcreate.dk</organizationUrl>
    </developer>
  </developers>
  <modules>
    <module>shared</module>
    <module>types</module>
    <module>types-jackson</module>
    <module>types-springdata-mongo</module>
    <module>types-springdata-jpa</module>
    <module>types-jdbi</module>
    <module>types-avro</module>
    <module>types-spring-web</module>
    <module>immutable</module>
    <module>immutable-jackson</module>
    <module>reactive</module>
    <module>components/foundation</module>
    <module>components/foundation-types</module>
    <module>components/foundation-test</module>
    <module>components/eventsourced-aggregates</module>
    <module>components/spring-boot-starter-postgresql</module>
    <module>components/spring-boot-starter-postgresql-event-store</module>
    <module>components/spring-boot-starter-mongodb</module>
    <module>components/postgresql-distributed-fenced-lock</module>
    <module>components/postgresql-event-store</module>
    <module>components/postgresql-queue</module>
    <module>components/spring-postgresql-event-store</module>
    <module>components/springdata-mongo-distributed-fenced-lock</module>
    <module>components/springdata-mongo-queue</module>
    <module>components/kotlin-eventsourcing</module>
    <module>components/postgresql-document-db</module>
  </modules>
  <scm>
    <connection>scm:https://github.com/cloudcreate-dk/essentials-project.git</connection>
    <developerConnection>scm:https://github.com/cloudcreate-dk/essentials-project.git</developerConnection>
    <url>https://github.com/cloudcreate-dk/essentials-project</url>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <jackson-bom.version>2.18.0</jackson-bom.version>
    <junit-bom.version>5.11.1</junit-bom.version>
    <kotlin.version>2.0.20</kotlin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <json-smart.version>2.5.1</json-smart.version>
    <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
    <maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
    <slf4j.version>2.0.16</slf4j.version>
    <avro.version>1.12.0</avro.version>
    <logback.version>1.5.8</logback.version>
    <jdbi3-bom.version>3.45.4</jdbi3-bom.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
    <spring-data-mongodb.version>4.2.10</spring-data-mongodb.version>
    <log4j-to-slf4j.version>2.24.0</log4j-to-slf4j.version>
    <versions-maven-plugin.version>2.17.1</versions-maven-plugin.version>
    <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
    <commons-compress.version>1.27.1</commons-compress.version>
    <maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
    <revision>DEV-SNAPSHOT</revision>
    <mongodb-driver-sync.version>4.11.4</mongodb-driver-sync.version>
    <netty-bom.version>4.1.113.Final</netty-bom.version>
    <reactor-bom.version>2023.0.10</reactor-bom.version>
    <skipDependencyCheck>false</skipDependencyCheck>
    <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
    <maven-surefire-plugin.version>3.5.0</maven-surefire-plugin.version>
    <postgresql.version>42.7.4</postgresql.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <xmlunit-core.version>2.10.0</xmlunit-core.version>
    <maven-install-plugin.version>3.1.3</maven-install-plugin.version>
    <micrometer-tracing.version>1.2.10</micrometer-tracing.version>
    <maven-project-info-reports-plugin.version>3.7.0</maven-project-info-reports-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <mockito-bom.version>5.14.0</mockito-bom.version>
    <spring-boot.version>3.2.10</spring-boot.version>
    <maven-dependency-plugin.version>3.8.0</maven-dependency-plugin.version>
    <dependency-check-maven.version>10.0.4</dependency-check-maven.version>
    <spring-data-jpa.version>3.2.10</spring-data-jpa.version>
    <dokka.version>1.9.20</dokka.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <assertj.version>3.26.3</assertj.version>
    <micrometer.version>1.12.10</micrometer.version>
    <maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
    <json-path.version>2.9.0</json-path.version>
    <objenesis.version>3.4</objenesis.version>
    <maven-failsafe-plugin.version>3.5.0</maven-failsafe-plugin.version>
    <snakeyaml.version>2.3</snakeyaml.version>
    <java.version>17</java.version>
    <spring-framework-bom.version>6.1.13</spring-framework-bom.version>
    <minimum-maven-version>3.8.8</minimum-maven-version>
    <awaitility.version>4.2.2</awaitility.version>
    <testcontainers-bom.version>1.20.1</testcontainers-bom.version>
    <maven-site-plugin.version>3.20.0</maven-site-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-bom</artifactId>
        <version>${netty-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-bom</artifactId>
        <version>${testcontainers-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jdbi</groupId>
        <artifactId>jdbi3-bom</artifactId>
        <version>${jdbi3-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-bom</artifactId>
        <version>${reactor-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${spring-framework-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-bom</artifactId>
        <version>${mockito-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>${xmlunit-core.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>${awaitility.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <targetPath>META-INF</targetPath>
        <directory>${maven.multiModuleProjectDirectory}</directory>
        <includes>
          <include>LICENSE.txt</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <targetPath>META-INF</targetPath>
        <directory>${maven.multiModuleProjectDirectory}</directory>
        <includes>
          <include>LICENSE.txt</include>
        </includes>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <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>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
          <executions>
            <execution>
              <id>dokka-jar</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <classifier>javadoc</classifier>
                <classesDirectory>${project.build.directory}/dokka</classesDirectory>
                <skipIfEmpty>true</skipIfEmpty>
                <archive>
                  <manifestEntries>
                    <License>Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt</License>
                  </manifestEntries>
                </archive>
              </configuration>
            </execution>
          </executions>
          <configuration>
            <archive>
              <manifestEntries>
                <License>Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt</License>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <archive>
                  <manifestEntries>
                    <License>Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt</License>
                  </manifestEntries>
                </archive>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <doclint>none</doclint>
                <archive>
                  <manifestEntries>
                    <License>Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt</License>
                  </manifestEntries>
                </archive>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <compilerArgs>
              <arg>-parameters</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versions-maven-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>display-dependency-updates</goal>
              <goal>display-plugin-updates</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rulesUri>file:///${maven.multiModuleProjectDirectory}/versions-update-rules.xml</rulesUri>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven-enforcer-plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>${minimum-maven-version}</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>${java.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>${dependency-check-maven.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipTestScope>false</skipTestScope>
          <failBuildOnCVSS>0</failBuildOnCVSS>
          <suppressionFile>${maven.multiModuleProjectDirectory}/project-suppression.xml</suppressionFile>
          <skip>${skipDependencyCheck}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>${flatten-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <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://s01.oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <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>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.jetbrains.dokka</groupId>
            <artifactId>dokka-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>test-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.jetbrains.dokka</groupId>
            <artifactId>dokka-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
