<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.telicent.smart-caches</groupId>
    <artifactId>parent</artifactId>
    <version>1.2.1</version>
    <modules>
        <module>projectors-core</module>
        <module>projector-driver</module>
        <module>cli</module>
        <module>event-sources</module>
        <module>jaxrs-base-server</module>
        <module>observability-core</module>
        <module>configurator</module>
        <module>jwt-auth-common</module>
        <module>data-security-parent</module>
        <module>action-tracker</module>
        <module>benchmarks</module>
        <module>distribution-lifecycle</module>
    </modules>
    <packaging>pom</packaging>
    <name>Telicent Smart Caches - Parent</name>
    <description>Provides common libraries for building Java based Smart Caches for the Telicent Core platform
    </description>
    <url>https://github.com/telicent-oss/smart-caches-core</url>

    <developers>
        <developer>
            <name>Telicent Developers</name>
            <email>opensource@telicent.io</email>
            <organization>Telicent Ltd</organization>
            <organizationUrl>https://telicent.io</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/telicent-oss/smart-caches-core</connection>
        <developerConnection>scm:git:ssh://git@github.com/telicent-oss/smart-caches-core</developerConnection>
        <url>https://github.com/telicent-oss/smart-caches-core</url>
        <tag>1.2.1</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <name>Maven Central Snapshots</name>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <!--
        Compiler Configuration
        -->
        <jdk.version>21</jdk.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- License Plugin Configuration -->
        <!--
        Note that all submodules need to declare this appropriately as well so that the plugin can correctly find
        the header.txt file in this top directory even when run on a submodule -->
        <license.header.path>${project.basedir}</license.header.path>

        <!-- Code Coverage Configuration -->
        <!--
        Controls the minimum code coverage ratio that modules which have opted into code coverage enforcement are
        required to meet.  If a submodule wants to increase/decrease this value they can do so by redefining this
        property in their pom.xml
        -->
        <coverage.minimum>0.8</coverage.minimum>

        <!-- Javadoc Configuration -->
        <javadoc.failOnWarnings>true</javadoc.failOnWarnings>

        <!-- Dependency Analyze Configuration -->
        <analyze.failOnWarnings>false</analyze.failOnWarnings>

        <!-- Name used for Maven Central Deployments -->
        <central.deployment.name>SC Core Libs ${project.version}</central.deployment.name>

        <!-- Whether JAR modules should skip publishing test and test-sources JARs -->
        <!--
        This can be set to false in modules whose tests contain any reusable code to ensure the publishing of the test
        and test-sources JARs.  Having the default be true reduces unnecessary published artifacts for modules whose
        tests are entirely self-contained and not reused elsewhere.
        -->
        <skip.testJars>true</skip.testJars>

        <!-- Parallel Testing -->
        <!--
        Controls how many JVM forks are used for parallel testing in some modules, set to a conservative 2 which offers
        decent reductions in test time but avoids overloading the developers machine especially when parallel tests are
        spinning up containers
        -->
        <test.maxForks>2</test.maxForks>

        <!-- Plugin Versions -->
        <plugin.assembly>3.8.0</plugin.assembly>
        <plugin.central>0.11.0</plugin.central>
        <plugin.clean>3.5.0</plugin.clean>
        <plugin.compiler>3.15.0</plugin.compiler>
        <plugin.cyclonedx>2.9.3</plugin.cyclonedx>
        <plugin.dependency>3.11.0</plugin.dependency>
        <plugin.enforcer>3.6.3</plugin.enforcer>
        <plugin.exec>3.6.3</plugin.exec>
        <plugin.failsafe>3.5.6</plugin.failsafe>
        <plugin.gpg>3.2.8</plugin.gpg>
        <plugin.jacoco>0.8.15</plugin.jacoco>
        <plugin.jar>3.5.1</plugin.jar>
        <plugin.javadoc>3.12.0</plugin.javadoc>
        <plugin.license>5.1.1</plugin.license>
        <plugin.shade>3.6.2</plugin.shade>
        <plugin.sonar>5.7.0.6970</plugin.sonar>
        <plugin.source>3.4.0</plugin.source>
        <plugin.surefire>3.5.6</plugin.surefire>
        <plugin.versions>2.21.0</plugin.versions>

        <!-- SonarQube analysis, invoked from CI via mvn sonar:sonar -->
        <sonar.projectKey>telicent-oss_smart-caches-core</sonar.projectKey>

        <!-- Dependency Versions -->
        <dependency.airline>3.3.0</dependency.airline>
        <dependency.awaitility>4.3.0</dependency.awaitility>
        <dependency.caffeine>3.2.4</dependency.caffeine>
        <dependency.commons-collections>4.6.0</dependency.commons-collections>
        <dependency.commons-io>2.22.0</dependency.commons-io>
        <dependency.commons-lang>3.20.0</dependency.commons-lang>
        <dependency.grizzly>4.0.2</dependency.grizzly>
        <dependency.jackson>2.22.1</dependency.jackson>
        <dependency.jackson-annotations>2.22</dependency.jackson-annotations>
        <dependency.jackson3>3.2.1</dependency.jackson3>
        <dependency.jakarta.annotation>3.0.0</dependency.jakarta.annotation>
        <dependency.jakarta-inject>2.0.1.MR</dependency.jakarta-inject>
        <dependency.jakarta.validation>3.1.1</dependency.jakarta.validation>
        <dependency.jakarta.ws.rs>3.1.0</dependency.jakarta.ws.rs>
        <dependency.jena>6.2.0</dependency.jena>
        <dependency.jersey>3.1.12</dependency.jersey>
        <dependency.jetbrains-annotations>26.0.2</dependency.jetbrains-annotations>
        <dependency.jjwt>0.13.0</dependency.jjwt>
        <dependency.jwt-auth>4.1.4</dependency.jwt-auth>
        <dependency.kafka>3.9.2</dependency.kafka>
        <dependency.logback>1.6.1</dependency.logback>
        <dependency.lombok>1.18.46</dependency.lombok>
        <dependency.lz4>1.11.2</dependency.lz4>
        <dependency.mockito>5.23.0</dependency.mockito>
        <dependency.opentelemetry.agent>2.28.1</dependency.opentelemetry.agent>
        <dependency.opentelemetry.sdk>1.64.0</dependency.opentelemetry.sdk>
        <dependency.rdf-abac>3.1.5</dependency.rdf-abac>
        <dependency.fuseki-kafka>3.1.0</dependency.fuseki-kafka>
        <dependency.resilience4j>2.4.0</dependency.resilience4j>
        <dependency.servlet>6.1.0</dependency.servlet>
        <dependency.slf4j>2.0.18</dependency.slf4j>
        <dependency.slf4j-test>3.0.3</dependency.slf4j-test>
        <dependency.testcontainers>1.21.4</dependency.testcontainers>
        <dependency.testng>7.12.0</dependency.testng>
        <!-- CVE-2026-49268 - Apache Shiro is a transitive dependency of Apache Jena -->
        <dependency.shiro>2.2.1</dependency.shiro>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Jena for RDF processing -->
            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-arq</artifactId>
                <version>${dependency.jena}</version>
                <exclusions>
                    <!-- Excluded due to upstream issue with being in compile scope by mistake -->
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-rdfpatch</artifactId>
                <version>${dependency.jena}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-base</artifactId>
                <version>${dependency.jena}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-core</artifactId>
                <version>${dependency.jena}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-fuseki-core</artifactId>
                <version>${dependency.jena}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-fuseki-main</artifactId>
                <version>${dependency.jena}</version>
            </dependency>

            <!-- RDF ABAC -->
            <dependency>
                <groupId>io.telicent.jena</groupId>
                <artifactId>rdf-abac-core</artifactId>
                <version>${dependency.rdf-abac}</version>
            </dependency>

            <!-- Jackson for serialization to JSON/YAML etc -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${dependency.jackson}</version>
            </dependency>

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

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

            <dependency>
                <groupId>tools.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${dependency.jackson3}</version>
            </dependency>

            <!-- TestNG and Mockito for testing -->
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${dependency.testng}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${dependency.mockito}</version>
            </dependency>

            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${dependency.testcontainers}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-compress</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

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

            <!--
            SLF4J and a concrete implementation for Logging

            Plus bring in a mock SLF4J harness that lets us test our logging output is as expected
            -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${dependency.slf4j}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${dependency.slf4j}</version>
            </dependency>

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

            <dependency>
                <groupId>com.github.valfirst</groupId>
                <artifactId>slf4j-test</artifactId>
                <version>${dependency.slf4j-test}</version>
            </dependency>

            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${dependency.caffeine}</version>
            </dependency>

            <!-- Kafka for Event Sourcing -->
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${dependency.kafka}</version>
            </dependency>
            <!-- Alternative fork of lz4-java due to original being abandoned and subject to CVEs -->
            <dependency>
                <groupId>at.yawk.lz4</groupId>
                <artifactId>lz4-java</artifactId>
                <version>${dependency.lz4}</version>
            </dependency>

            <!-- Apache Commons Libraries for Utilities -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${dependency.commons-lang}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${dependency.commons-collections}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${dependency.commons-io}</version>
            </dependency>

            <!-- Airline for CLIs -->
            <dependency>
                <groupId>com.github.rvesse</groupId>
                <artifactId>airline</artifactId>
                <version>${dependency.airline}</version>
            </dependency>

            <!-- JAX-RS related dependencies -->
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${dependency.servlet}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <version>${dependency.jakarta.ws.rs}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${dependency.jakarta.annotation}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet-core</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-json-jackson</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.inject</groupId>
                <artifactId>jersey-hk2</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.ext</groupId>
                <artifactId>jersey-bean-validation</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-client</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-server</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-grizzly2-http</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-grizzly2-servlet</artifactId>
                <version>${dependency.jersey}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-framework</artifactId>
                <version>${dependency.grizzly}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-http-server</artifactId>
                <version>${dependency.grizzly}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-http-servlet</artifactId>
                <version>${dependency.grizzly}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-http</artifactId>
                <version>${dependency.grizzly}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
                <version>${dependency.jakarta-inject}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${dependency.jakarta.validation}</version>
            </dependency>

            <dependency>
                <groupId>io.telicent.public</groupId>
                <artifactId>jwt-servlet-auth-jaxrs3</artifactId>
                <version>${dependency.jwt-auth}</version>
            </dependency>

            <dependency>
                <groupId>io.telicent.public</groupId>
                <artifactId>jwt-servlet-auth-aws</artifactId>
                <version>${dependency.jwt-auth}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-api</artifactId>
                <version>${dependency.jjwt}</version>
            </dependency>

            <dependency>
                <groupId>io.telicent.public</groupId>
                <artifactId>jwt-servlet-auth-core</artifactId>
                <version>${dependency.jwt-auth}</version>
            </dependency>

            <!-- resilience4j -->
            <dependency>
                <groupId>io.github.resilience4j</groupId>
                <artifactId>resilience4j-ratelimiter</artifactId>
                <version>${dependency.resilience4j}</version>
            </dependency>

            <dependency>
                <groupId>io.github.resilience4j</groupId>
                <artifactId>resilience4j-retry</artifactId>
                <version>${dependency.resilience4j}</version>
            </dependency>

            <!-- Open Telemetry -->
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-sdk</artifactId>
                <version>${dependency.opentelemetry.sdk}</version>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-api</artifactId>
                <version>${dependency.opentelemetry.sdk}</version>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry.javaagent</groupId>
                <artifactId>opentelemetry-javaagent</artifactId>
                <version>${dependency.opentelemetry.agent}</version>
            </dependency>

            <!-- Lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${dependency.lombok}</version>
            </dependency>

            <!-- CVE-2026-49268 - Apache Shiro is a transitive dependency of Apache Jena -->
            <dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-core</artifactId>
                <version>${dependency.shiro}</version>
            </dependency>
        </dependencies>

    </dependencyManagement>

    <build>

        <plugins>
            <!-- Enforcer Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${plugin.enforcer}</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.8.1</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>17,</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- License Plugin -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${plugin.license}</version>
                <configuration>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>false</aggregate>
                    <useDefaultMapping>true</useDefaultMapping>
                    <strictCheck>true</strictCheck>
                    <licenseSets>
                        <licenseSet>
                            <header>${license.header.path}/header.txt</header>
                            <excludes>
                                <exclude>header.txt</exclude>
                                <exclude>LICENSE</exclude>
                                <exclude>NOTICE</exclude>
                                <exclude>pom.xml</exclude>
                                <exclude>**/pom.xml</exclude>
                                <exclude>.github/**/*</exclude>
                                <exclude>**/test-data/**/*</exclude>
                                <exclude>**/test-certs/*</exclude>
                                <exclude>**/*.version</exclude>
                                <exclude>**/CrossOriginFilter.java</exclude>
                                <exclude>**/*.md</exclude>
                                <exclude>**/*.jpeg</exclude>
                                <exclude>**/template</exclude>
                                <!-- Trivy Cache -->
                                <exclude>.trivy/**</exclude>
                                <exclude>trivy/**</exclude>
                                <!-- GitHub Actions temp files -->
                                <exclude>.images/**</exclude>
                                <exclude>*trivy*</exclude>
                                <exclude>maven-trivy-gating-report.txt</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                    <mapping>
                        <java>JAVADOC_STYLE</java>
                        <shrc>SCRIPT_STYLE</shrc>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <id>check-licenses</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>create-metadata</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>true</doCheck>
                    <doUpdate>true</doUpdate>
                    <outputName>${project.artifactId}.version</outputName>
                    <addOutputDirectoryToResources>true</addOutputDirectoryToResources>
                    <timestampFormat>yyyy-MM-dd HH:mm:ss</timestampFormat>
                    <properties>
                        <artifactId>${project.artifactId}</artifactId>
                        <groupId>${project.groupId}</groupId>
                        <buildEnv>${os.name} ${os.version} (${os.arch})</buildEnv>
                    </properties>
                </configuration>
            </plugin>

            <!-- Compiler Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${plugin.compiler}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <release>${jdk.version}</release>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${dependency.lombok}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <!-- JAR Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${plugin.jar}</version>
                <executions>
                    <execution>
                        <id>create-test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <skipIfEmpty>true</skipIfEmpty>
                            <skip>${skip.testJars}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Source Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${plugin.source}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-test-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <skipSource>${skip.testJars}</skipSource>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- delombok so we can generate Javadoc that references lombok generated types and methods -->
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.18.20.0</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                        <configuration>
                            <!--
                            Note that we aren't building from the delombok'd source, we only need it for Javadoc.  Thus
                            don't add to output directories or the compiler will complain about duplicate class files.
                            -->
                            <addOutputDirectory>false</addOutputDirectory>
                            <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                            <outputDirectory>${project.build.directory}/delombok</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${dependency.lombok}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Javadoc Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${plugin.javadoc}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <javadocVersion>${java.version}</javadocVersion>
                    <sourcepath>${project.build.directory}/delombok/</sourcepath>
                    <quiet>true</quiet>
                    <encoding>UTF-8</encoding>
                    <charset>UTF-8</charset>
                    <docencoding>UTF-8</docencoding>
                    <failOnWarnings>${javadoc.failOnWarnings}</failOnWarnings>
                    <additionalJOptions>
                        <additionalJOption>-Xdoclint:-missing</additionalJOption>
                    </additionalJOptions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
                <version>${plugin.cyclonedx}</version>
                <executions>
                    <execution>
                        <id>build-sbom-cyclonedx</id>
                        <phase>package</phase>
                        <goals>
                            <goal>makeAggregateBom</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputFormat>json</outputFormat>
                    <outputName>${project.artifactId}-${project.version}-bom</outputName>
                    <skipNotDeployed>false</skipNotDeployed>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${plugin.gpg}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${plugin.dependency}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>go-offline</goal>
                            </goals>
                            <configuration>
                                <!--
                                When going offline don't try to resolve internal project dependencies.  This is
                                primarily only a problem when the version gets bumped.  However, in a CI/CD environment
                                this is always needed.
                                -->
                                <excludeGroupIds>io.telicent.smart-caches</excludeGroupIds>
                            </configuration>
                        </execution>
                        <execution>
                            <id>analyze</id>
                            <goals>
                                <goal>analyze-only</goal>
                            </goals>
                            <configuration>
                                <failOnWarning>${analyze.failOnWarnings}</failOnWarning>
                                <ignoredNonTestScopedDependencies>
                                    <ignoredNonTestScopedDependency>org.glassfish.grizzly:grizzly-http
                                    </ignoredNonTestScopedDependency>
                                    <ignoredNonTestScopedDependency>jakarta.ws.rs:jakarta.ws.rs-api
                                    </ignoredNonTestScopedDependency>
                                </ignoredNonTestScopedDependencies>
                                <ignoredUnusedDeclaredDependencies>
                                    <ignoredUnusedDeclaredDependency>org.glassfish.jersey.inject:jersey-hk2
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>
                                        org.glassfish.jersey.media:jersey-media-json-jackson
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>io.opentelemetry:opentelemetry-sdk
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>org.testcontainers:kafka
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>org.slf4j:jul-to-slf4j
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>io.telicent.smart-caches:event-source-kafka
                                    </ignoredUnusedDeclaredDependency>
                                    <ignoredUnusedDeclaredDependency>
                                        io.opentelemetry.javaagent:opentelemetry-javaagent
                                    </ignoredUnusedDeclaredDependency>
                                </ignoredUnusedDeclaredDependencies>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!-- Code Coverage Plugins -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${plugin.jacoco}</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <!--
                                Needs to be true so that if a module invokes Maven surefire/failsafe multiple times,
                                e.g. with different configurations, the coverage from all those runs is combined
                                -->
                                <append>true</append>
                            </configuration>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>require-test-coverage</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <skip>${skipTests}</skip>
                                <rules>
                                    <rule>
                                        <element>BUNDLE</element>
                                        <limits>
                                            <limit>
                                                <counter>CLASS</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>INSTRUCTION</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>METHOD</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>BRANCH</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>LINE</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                            <limit>
                                                <counter>COMPLEXITY</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>${coverage.minimum}</minimum>
                                            </limit>
                                        </limits>
                                    </rule>
                                </rules>
                                <haltOnFailure>true</haltOnFailure>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${plugin.versions}</version>
                    <configuration>
                        <ignoredVersions>.*[-\.]M.*,.*-alpha.*,.*-beta.*,.*-RC.*,.*rc.*</ignoredVersions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${plugin.sonar}</version>
                </plugin>

                <!-- Integration Testing -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${plugin.failsafe}</version>
                    <configuration>
                        <includes>
                            <include>**/*IT.java</include>
                        </includes>
                        <systemPropertyVariables>
                            <project.version>${project.version}</project.version>
                        </systemPropertyVariables>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>telicent-oss</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- Central Publishing Plugin -->
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${plugin.central}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>validated</waitUntil>
                            <!-- Central Publishing can be much slower than old Nexus publishing process -->
                            <waitMaxTime>3600</waitMaxTime>
                            <deploymentName>${central.deployment.name}</deploymentName>
                            <checksums>required</checksums>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <!-- Needed for Apache Jena SNAPSHOTs -->
        <repository>
            <id>apache-snapshots</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
