<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>

    <url>https://github.com/jeap-admin-ch/jeap-internal-spring-boot-parent</url>
    <scm>
        <url>https://github.com/jeap-admin-ch/jeap-internal-spring-boot-parent</url>
        <connection>scm:git:git://github.com/jeap-admin-ch/jeap-internal-spring-boot-parent.git</connection>
        <developerConnection>scm:git:ssh://github.com:jeap-admin-ch/jeap-internal-spring-boot-parent.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>BIT</name>
            <email>jeap-community@bit.admin.ch</email>
            <organization>Federal Office of Information Technology, Systems and Telecommunication FOITT</organization>
            <organizationUrl>https://www.bit.admin.ch/</organizationUrl>
        </developer>
    </developers>

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

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <!-- Also update the property spring-boot.version! -->
        <version>4.0.6</version>
    </parent>

    <groupId>ch.admin.bit.jeap</groupId>
    <artifactId>jeap-internal-spring-boot-parent</artifactId>
    <version>7.0.7-alpha-springboot4</version>
    <name>jeap-internal-spring-boot-parent</name>
    <description>
        A common parent project for jEAP libs. Does not include any jEAP dependencies to avoid circular dependencies.
    </description>
    <packaging>pom</packaging>

    <properties>
        <java.version>25</java.version>
        <maven.compiler.release>25</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Also update the spring-boot-dependencies parent version! -->
        <!-- When updating, check if any 'Version overrides due to CVEs' below can be removed -->
        <spring-boot.version>4.0.6</spring-boot.version>
        <spring-cloud.version>2025.1.1</spring-cloud.version>
        <lombok.maven.version>1.18.20.0</lombok.maven.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
        <git-commit-id-maven-plugin.version>9.0.2</git-commit-id-maven-plugin.version>
        <shedlock.version>7.7.0</shedlock.version>
        <commons-collections4.version>4.5.0</commons-collections4.version>
        <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
        <exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
        <pact-jvm.version>4.6.20</pact-jvm.version>
        <togglz.version>4.6.1</togglz.version>
        <aws.sdk.version>2.42.36</aws.sdk.version>
        <bcpkix-jdk18on.version>1.84</bcpkix-jdk18on.version>
        <bcprov-jdk18on.version>1.84</bcprov-jdk18on.version>
        <org.honton.chas-license-maven-plugin.version>0.0.6</org.honton.chas-license-maven-plugin.version>
        <org.codehaus.mojo-license-maven-plugin.version>2.7.1</org.codehaus.mojo-license-maven-plugin.version>
        <jeap-license-template.version>1.0.3</jeap-license-template.version>
        <AmazonCorrettoCryptoProvider.version>2.5.0</AmazonCorrettoCryptoProvider.version>
        <jeap-central-publishing-maven-plugin.version>0.7.0.1</jeap-central-publishing-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <protobuf-java.version>4.34.1</protobuf-java.version>
        <testcontainers.version>2.0.5</testcontainers.version>
        <rest-assured.version>6.0.0</rest-assured.version>
        <!-- Config -->
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <maven-central-autopublish>true</maven-central-autopublish>
        <maven-central-wait-until>validated</maven-central-wait-until>
        <!-- Test config -->
        <skip.surefire.tests>false</skip.surefire.tests>
        <skip.failsafe.tests>false</skip.failsafe.tests>
        <jeap.pact.provider.consumerversionselectors.raw>[{"mainBranch":true}, {"matchingBranch": true}, {"deployedOrReleased": true}]</jeap.pact.provider.consumerversionselectors.raw>

        <!-- managed dependencies caused by vulnerabilities, version overrides due to CVEs -->
        <tomcat-embed-core.version>11.0.21</tomcat-embed-core.version>
        <jackson-bom.version>3.1.1</jackson-bom.version>

        <!-- Override due to CVE-2026-42198 -->
        <postgresql.version>42.7.11</postgresql.version>
    </properties>

    <profiles>
        <!-- Profile for enabling the publishing of contracts and verification results in consumer driven contract tests
             during a toolchain pipeline build on Jenkins -->
        <profile>
            <id>cdct-enable-publishing-jenkins</id>
            <activation>
                <property>
                    <!-- Automatic activation of the profile when a build is run by the toolchain build pipeline on Jenkins.
                         This is a bit of a hack. We base the activation of this profile on the existence of a property
                         that is set by the maven settings.xml used by the toolchain build pipeline. This allows adding
                         the Pact configuration to builds without the need for changing the toolchain build pipeline.
                         We plan to create our own build pipeline soon and Pact will then be built into the build
                         pipeline directly. -->
                    <name>releaseRepositoryId</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- Enabling the publishing of consumer contracts -->
                        <plugin>
                            <groupId>au.com.dius.pact.provider</groupId>
                            <artifactId>maven</artifactId>
                            <version>${pact-jvm.version}</version>
                            <configuration>
                                <skipPactPublish>false</skipPactPublish>
                            </configuration>
                            <executions>
                                <execution>
                                    <!-- publishing must happen after the consumer pact tests create the pact files -->
                                    <phase>install</phase>
                                    <goals>
                                        <goal>publish</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        <!-- Enabling the publishing of provider contract verifications -->
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <systemPropertyVariables>
                                    <pact.verifier.publishResults>true</pact.verifier.publishResults>
                                </systemPropertyVariables>
                                <argLine>
                                    ${argLine}
                                    -Djdk.attach.allowAttachSelf=true
                                    -XX:+EnableDynamicAgentLoading
                                    -Xshare:off
                                </argLine>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!-- Profile for enabling the publishing of contracts and verification results in consumer driven contract tests
             during local builds -->
        <profile>
            <id>cdct-enable-publishing-local</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- Enabling the publishing of consumer contracts -->
                        <plugin>
                            <groupId>au.com.dius.pact.provider</groupId>
                            <artifactId>maven</artifactId>
                            <version>${pact-jvm.version}</version>
                            <configuration>
                                <skipPactPublish>false</skipPactPublish>
                            </configuration>
                            <executions>
                                <execution>
                                    <!-- publishing must happen after the consumer pact tests create the pact files -->
                                    <phase>install</phase>
                                    <goals>
                                        <goal>publish</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        <!-- Enabling the publishing of provider contract verifications -->
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <systemPropertyVariables>
                                    <pact.verifier.publishResults>true</pact.verifier.publishResults>
                                </systemPropertyVariables>
                                <argLine>
                                    ${argLine}
                                    -Djdk.attach.allowAttachSelf=true
                                    -XX:+EnableDynamicAgentLoading
                                    -Xshare:off
                                </argLine>
                            </configuration>
                        </plugin>
                        <!-- Making sure that the repository is not dirty, i.e. that the git commit hash appended to consumer
                         and provider versions is valid -->
                        <plugin>
                            <groupId>io.github.git-commit-id</groupId>
                            <artifactId>git-commit-id-maven-plugin</artifactId>
                            <version>${git-commit-id-maven-plugin.version}</version>
                            <executions>
                                <execution>
                                    <id>check-git-not-dirty</id>
                                    <goals>
                                        <goal>validateRevision</goal>
                                    </goals>
                                    <phase>compile</phase>
                                    <configuration>
                                        <validationProperties>
                                            <validationProperty>
                                                <name>validating git dirty</name>
                                                <value>${git.dirty}</value>
                                                <shouldMatchTo>false</shouldMatchTo>
                                            </validationProperty>
                                        </validationProperties>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!-- Bump patch version X to X+1 (n.n.X). Usage: mvn -Pbump-patch-version -N validate -->
        <profile>
            <id>bump-patch-version</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>${build-helper-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>parse-version-as-input-to-increase-version</id>
                                <goals>
                                    <goal>parse-version</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>increase-version</id>
                                <goals>
                                    <goal>set</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}${version-bump-postfix}</newVersion>
                                    <generateBackupPoms>false</generateBackupPoms>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Bump minor version X to X+1 (n.X.n). Usage: mvn -Pbump-minor-version -N validate -->
        <profile>
            <id>bump-minor-version</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>${build-helper-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>parse-version-as-input-to-increase-version</id>
                                <goals>
                                    <goal>parse-version</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>increase-version</id>
                                <goals>
                                    <goal>set</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <newVersion>${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0${parsedVersion.qualifier?}</newVersion>
                                    <generateBackupPoms>false</generateBackupPoms>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Bump major version X to X+1 (X.n.n). Usage: mvn -Pbump-major-version -N validate -->
        <profile>
            <id>bump-major-version</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>${build-helper-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>parse-version-as-input-to-increase-version</id>
                                <goals>
                                    <goal>parse-version</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>increase-version</id>
                                <goals>
                                    <goal>set</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <newVersion>${parsedVersion.nextMajorVersion}.0.0${parsedVersion.qualifier?}</newVersion>
                                    <generateBackupPoms>false</generateBackupPoms>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>internal-parent-build-only</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- Check third-party license compliance -->
                    <plugin>
                        <groupId>org.honton.chas</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                    </plugin>
                    <!-- Generate third-party license list -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>maven-central-publish</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <gpgArguments>
                                <!-- Note: These arguments are required for gpg 2.1+ -->
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                            <bestPractices>true</bestPractices>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>ch.admin.bit.jeap</groupId>
                        <artifactId>jeap-central-publishing-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>central-publish</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>publish</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <publishingServerId>maven-central</publishingServerId>
                            <autoPublish>${maven-central-autopublish}</autoPublish>
                            <skipPublishing>false</skipPublishing>
                            <waitPollingInterval>15</waitPollingInterval>
                            <ignorePublishedComponents>true</ignorePublishedComponents>
                            <deploymentName>${project.artifactId}-${project.version}</deploymentName>
                            <waitUntil>${maven-central-wait-until}</waitUntil>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>after-publish-validation-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                                <configuration>
                                    <deployAtEnd>true</deployAtEnd>
                                </configuration>
                            </execution>
                            <!-- The built-in execution must be disabled as it would run before the
                            central-publishing-maven-plugin. We want to validate central deployments before deploying
                             to the jEAP repository. -->
                            <execution>
                                <id>default-deploy</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- General dependencies for all projects -->
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- Override due to CVE-2026-42198 -->
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgresql.version}</version>
            </dependency>
            <!-- Managed tomcat-embed-core will be removed with JEAP-6467 -->
            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-core</artifactId>
                <version>${tomcat-embed-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons-collections4.version}</version>
            </dependency>
            <dependency>
                <groupId>net.javacrumbs.shedlock</groupId>
                <artifactId>shedlock-spring</artifactId>
                <version>${shedlock.version}</version>
            </dependency>
            <dependency>
                <groupId>net.javacrumbs.shedlock</groupId>
                <artifactId>shedlock-provider-jdbc-template</artifactId>
                <version>${shedlock.version}</version>
            </dependency>

            <!-- SPRING -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Togglz-->
            <dependency>
                <groupId>org.togglz</groupId>
                <artifactId>togglz-spring-boot-starter</artifactId>
                <version>${togglz.version}</version>
            </dependency>
            <dependency>
                <groupId>org.togglz</groupId>
                <artifactId>togglz-spring-security</artifactId>
                <version>${togglz.version}</version>
            </dependency>

            <!-- PACT -->
            <dependency>
                <groupId>au.com.dius.pact.consumer</groupId>
                <artifactId>junit5</artifactId>
                <version>${pact-jvm.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>au.com.dius.pact.provider</groupId>
                <artifactId>junit5</artifactId>
                <version>${pact-jvm.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Bouncy Castle -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk18on</artifactId>
                <version>${bcpkix-jdk18on.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>

            <!-- AWS SDK -->
            <dependency>
                <groupId>software.amazon.awssdk</groupId>
                <artifactId>bom</artifactId>
                <version>${aws.sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Amazon Corretto Crypto Provider -->
            <dependency>
                <groupId>software.amazon.cryptools</groupId>
                <artifactId>AmazonCorrettoCryptoProvider</artifactId>
                <version>${AmazonCorrettoCryptoProvider.version}</version>
                <classifier>linux-x86_64</classifier>
            </dependency>
            <dependency>
                <groupId>software.amazon.cryptools</groupId>
                <artifactId>AmazonCorrettoCryptoProvider</artifactId>
                <version>${AmazonCorrettoCryptoProvider.version}</version>
                <classifier>linux-aarch_64</classifier>
            </dependency>
            <dependency>
                <groupId>software.amazon.cryptools</groupId>
                <artifactId>AmazonCorrettoCryptoProvider</artifactId>
                <version>${AmazonCorrettoCryptoProvider.version}</version>
                <classifier>osx-x86_64</classifier>
            </dependency>
            <dependency>
                <groupId>software.amazon.cryptools</groupId>
                <artifactId>AmazonCorrettoCryptoProvider</artifactId>
                <version>${AmazonCorrettoCryptoProvider.version}</version>
                <classifier>osx-aarch_64</classifier>
            </dependency>
            <!-- Managed protobuf-java dependency, tracked by jEAP team -->
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-java</artifactId>
                <version>${protobuf-java.version}</version>
            </dependency>
            <!-- Manages org.testcontainers artifacts -->
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Manages rest-assured explicitly -->
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>${rest-assured.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <finalName>${project.artifactId}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build-info</goal>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <parameters>true</parameters>
                        <proc>full</proc>
                        <compilerArgs>
                            <arg>-Xlint:unchecked</arg>
                            <arg>-Xlint:deprecation</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <skipTests>${skip.surefire.tests}</skipTests>
                        <!-- see: https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class -->
                        <useSystemClassLoader>false</useSystemClassLoader>
                        <systemPropertyVariables>
                            <!-- PACT provider contract verification configuration by system properties -->
                            <pactbroker.host>pactbroker.bit.admin.ch</pactbroker.host>
                            <pactbroker.scheme>https</pactbroker.scheme>
                            <pactbroker.enablePending>true</pactbroker.enablePending>
                            <pactbroker.consumerversionselectors.rawjson>${jeap.pact.provider.consumerversionselectors.raw}</pactbroker.consumerversionselectors.rawjson>
                            <pactbroker.providerBranch>${git.branch}</pactbroker.providerBranch>
                            <pact.provider.version>${project.version}-${git.commit.id.abbrev}</pact.provider.version>
                            <pact.provider.branch>${git.branch}</pact.provider.branch>
                            <pact.verifier.publishResults>false</pact.verifier.publishResults>
                            <pact_do_not_track>true</pact_do_not_track>
                            <pact.mockserver.addCloseHeader>true</pact.mockserver.addCloseHeader>
                        </systemPropertyVariables>
                        <argLine>
                            ${argLine}
                            -Djdk.attach.allowAttachSelf=true
                            -XX:+EnableDynamicAgentLoading
                            -Xshare:off
                        </argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                    <!-- This configuration is needed as the normal JUnit-Handler does not find the
                         classes in the spring fat jar-->
                    <configuration>
                        <classpathDependencyExcludes>
                            <classpathDependencyExcludes>${project.groupId}:${project.artifactId}
                            </classpathDependencyExcludes>
                        </classpathDependencyExcludes>
                        <additionalClasspathElements>
                            <additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
                        </additionalClasspathElements>
                        <skipITs>${skip.failsafe.tests}</skipITs>
                        <argLine>
                            ${argLine}
                            -Djdk.attach.allowAttachSelf=true
                            -XX:+EnableDynamicAgentLoading
                            -Xshare:off
                        </argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- PACT consumer contract publication configuration-->
                <plugin>
                    <groupId>au.com.dius.pact.provider</groupId>
                    <artifactId>maven</artifactId>
                    <version>${pact-jvm.version}</version>
                    <configuration>
                        <pactDirectory>${project.build.directory}/pacts</pactDirectory>
                        <pactBrokerUrl>https://pactbroker.bit.admin.ch/</pactBrokerUrl>
                        <projectVersion>${project.version}-${git.commit.id.abbrev}</projectVersion>
                        <branchName>${git.branch}</branchName>
                        <skipPactPublish>true</skipPactPublish>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.honton.chas</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${org.honton.chas-license-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>default-cli</id>
                            <goals>
                                <goal>compliance</goal>
                            </goals>
                            <phase>validate</phase>
                            <configuration>
                                <acceptableLicenses>
                                    <!-- Accept permissive (weak copyleft) licenses for dependencies -->
                                    <!-- From https://github.com/chonton/license-maven-plugin/blob/main/src/main/resources/osi-permissive.xml -->
                                    <license>
                                        <name>
                                            ((The\s+)?Apache\s+(Software\s+)?License\s*(,\s*Version\s+)?2\.0)|(Apache-2\.0)
                                        </name>
                                        <url>
                                            (https?://www\.apache\.org/licenses/LICENSE-2\.0(\.txt|\.html)?)|(https?://opensource\.org/licenses/Apache-2\.0)
                                        </url>
                                    </license>
                                    <license>
                                        <name>
                                            ((The\s+)?3-Clause\s+BSD\s+License)|(New\s+BSD\s+License)|(Modified\s+BSD\s+License)|(BSD-3-Clause)
                                        </name>
                                        <url>https?://opensource\.org/licenses/BSD-3-Clause</url>
                                    </license>
                                    <license>
                                        <name>
                                            ((The\s+)?2-Clause\s+BSD\s+License)|(Simplified\s+BSD\s+License)|(FreeBSD\s+License)|(BSD-2-Clause)
                                        </name>
                                        <url>https?://opensource\.org/licenses/BSD-2-Clause</url>
                                    </license>
                                    <license>
                                        <name>(GNU\s+Library\s+General\s+Public\s+License\s*,\s*version\s+2)|(LGPL-2\.0)
                                        </name>
                                        <url>https?://www\.gnu\.org/old-licenses/lgpl-2\.0(\.[a-z]{2})?\.html</url>
                                    </license>
                                    <license>
                                        <name>
                                            (GNU\s+Lesser\s+General\s+Public\s+License\s*,\s*version\s+2\.1)|(LGPL-2\.1)
                                        </name>
                                        <url>https?://www\.gnu\.org/old-licenses/lgpl-2\.1(\.[a-z]{2})?\.html</url>
                                    </license>
                                    <license>
                                        <name>
                                            (GNU\s+Lesser\s+(General\s+)?Public\s+License\s*(,\s*version\s+3)?)|(LGPL-3\.0)
                                        </name>
                                        <url>https?://www\.gnu\.org/licenses/lgpl-3\.0(\.[a-z]{2})?\.html</url>
                                    </license>
                                    <license>
                                        <name>((The\s+)?MIT\s+License)|(MIT)</name>
                                        <url>https?://opensource\.org/licenses/MIT</url>
                                    </license>
                                    <license>
                                        <name>(Mozilla\s+Public\s+License\s+2\.0)|(MPL(-|\s)2\.0)</name>
                                        <url>https?://www\.mozilla\.org/([a-z]+-[A-Z]+/)?MPL/?</url>
                                    </license>
                                    <license>
                                        <name>(Common\s+Development\s+and\s+Distribution\s+License\s+1\.0)|(CDDL-1\.0)
                                        </name>
                                        <url>https?://opensource\.org/licenses/CDDL-1\.0</url>
                                    </license>
                                    <license>
                                        <name>(Eclipse\s+Public\s+License\s+v?1\.0)|(EPL-1\.0)</name>
                                        <url>https?://www\.eclipse\.org/legal/epl-v10\.html</url>
                                    </license>
                                    <license>
                                        <name>(Eclipse\s+Public\s+License\s+(v|v\.)?\s*2\.0)|(EPL-2\.0)</name>
                                        <url>https?://www\.eclipse\.org/legal/epl-v20\.html</url>
                                    </license>
                                    <license>
                                        <name>Eclipse Public License.*2.0</name>
                                        <url>https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</url>
                                    </license>
                                    <!-- Added for jEAP -->
                                    <!-- EDL: Same as BSD 3-Clause -->
                                    <license>
                                        <name>Eclipse Distribution License \(New BSD License\)</name>
                                    </license>
                                    <!-- GPL2 with Classpath Exception (i.e. copyleft does not extend if used as library) -->
                                    <license>
                                        <name>GPL2 w/ CPE</name>
                                        <url>https://www.gnu.org/software/classpath/license.html</url>
                                    </license>
                                    <license>
                                        <name>GNU General Public License (GPL), version 2, with the Classpath exception</name>
                                        <url>http://openjdk.java.net/legal/gplv2.ce.html</url>
                                    </license>
                                    <!-- Bouncy Castle: Same as MIT license -->
                                    <license>
                                        <name>Bouncy Castle Licence</name>
                                        <url>https://www.bouncycastle.org/licence.html</url>
                                    </license>
                                </acceptableLicenses>
                                <artifact>true</artifact>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${org.codehaus.mojo-license-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>ch.admin.bit.jeap</groupId>
                            <artifactId>jeap-license-template</artifactId>
                            <version>${jeap-license-template.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>default-cli</id>
                            <goals>
                                <goal>aggregate-add-third-party</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.basedir}</outputDirectory>
                                <thirdPartyFilename>THIRD-PARTY-LICENSES.md</thirdPartyFilename>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-third-party</id>
                            <goals>
                                <goal>add-third-party</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <fileTemplate>/ch/admin/bit/jeap/third-party.md.ftl</fileTemplate>
                        <useMissingFile>true</useMissingFile>
                        <useRepositoryMissingFiles>false</useRepositoryMissingFiles>
                        <failOnMissing>true</failOnMissing>
                        <acceptPomPackaging>true</acceptPomPackaging>
                        <deployMissingFile>false</deployMissingFile>
                        <licenseMerges>
                            <!-- Avoid line breaks in the licenseMerge tags! -->
                            <licenseMerge>Apache License Version 2.0|Apache License, Version 2.0|The Apache Software License, Version 2.0|Apache Public License 2.0|Apache 2|Apache-2.0|Apache 2.0|Apache 2.0 License|Apache License 2.0|Apache Software License, version 2.0|The Apache License, Version 2.0|Apache License, version 2.0</licenseMerge>
                            <licenseMerge>MIT License|MIT license|The MIT License|MIT|The MIT License (MIT)|MIT-0</licenseMerge>
                            <licenseMerge>Mozilla Public License, Version 2.0|MPL 2.0</licenseMerge>
                            <licenseMerge>GNU General Public License, version 2 (GPL2), with the classpath exception|GPL2 w/ CPE|GNU General Public License (GPL), version 2, with the Classpath exception</licenseMerge>
                            <licenseMerge>Eclipse Public License, Version 1.0|Eclipse Public License 1.0|Eclipse Public License - v 1.0|EPL 1.0</licenseMerge>
                            <licenseMerge>Eclipse Public License v2.0|Eclipse Public License v. 2.0|Eclipse Public License - v 2.0|EPL 2.0</licenseMerge>
                            <licenseMerge>Eclipse Distribution License - v 1.0|Eclipse Distribution License v. 1.0|Eclipse Distribution License (New BSD License)|EDL 1.0</licenseMerge>
                            <licenseMerge>Common Development and Distribution License (CDDL) v1.0|COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0</licenseMerge>
                            <licenseMerge>BSD 2-Clause License|BSD-2-Clause</licenseMerge>
                            <licenseMerge>BSD License 3|BSD-3-Clause</licenseMerge>
                            <licenseMerge>Public Domain|Public Domain, per Creative Commons CC0</licenseMerge>
                        </licenseMerges>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>ch.admin.bit.jeap</groupId>
                    <artifactId>jeap-central-publishing-maven-plugin</artifactId>
                    <version>${jeap-central-publishing-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                        <configuration>
                            <deployAtEnd>true</deployAtEnd>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <version>${git-commit-id-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>generate-git-properties</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                    <offline>true</offline>
                    <useNativeGit>true</useNativeGit>
                    <abbrevLength>12</abbrevLength>
                    <includeOnlyProperties>
                        <!-- Limit the default set of properties, plugin execution can take a long time otherwise -->
                        <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
                        <includeOnlyProperty>^git.branch$</includeOnlyProperty>
                        <includeOnlyProperty>^git.dirty</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.id.*$</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
                    </includeOnlyProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>${lombok.maven.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombok.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                    <outputDirectory>${project.basedir}/target/delombok</outputDirectory>
                    <addOutputDirectory>false</addOutputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>delombok</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.basedir}/target/delombok;${project.basedir}/target/generated-sources</sourcepath>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </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.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>${releaseRepositoryId}</id>
            <name>${releaseRepositoryName}</name>
            <url>${releaseRepositoryUrl}</url>
        </repository>
        <snapshotRepository>
            <id>${snapshotRepositoryId}</id>
            <name>${snapshotRepositoryName}</name>
            <!--suppress UnresolvedMavenProperty -->
            <url>${snapshotRepositoryUrl}</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <!-- Confluent Repository: This repository is required for accessing Confluent dependencies in OSS context. -->
        <repository>
            <id>confluent</id>
            <name>Confluent Repository</name>
            <url>https://packages.confluent.io/maven/</url>
        </repository>
    </repositories>
</project>
