<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ /*
  ~
  ~   ******************************************************************************
  ~
  ~    Copyright (c) 2023-24 Harman International
  ~
  ~
  ~
  ~    Licensed under the Apache License, Version 2.0 (the "License");
  ~
  ~    you may not use this file except in compliance with the License.
  ~
  ~    You may obtain a copy of the License at
  ~
  ~
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~
  ~    Unless required by applicable law or agreed to in writing, software
  ~
  ~    distributed under the License is distributed on an "AS IS" BASIS,
  ~
  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~
  ~    See the License for the specific language governing permissions and
  ~
  ~    limitations under the License.
  ~
  ~
  ~
  ~    SPDX-License-Identifier: Apache-2.0
  ~
  ~    *******************************************************************************
  ~
  ~  */
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.eclipse.ecsp</groupId>
    <artifactId>streambase</artifactId>
    <version>1.1.0</version>

    <name>StreamBase library</name>
    <description>Enabler for event driven processing and device messaging capabilities</description>
    <url>https://github.com/eclipse-ecsp/streambase</url>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
		<connection>scm:git:https://github.com/eclipse-ecsp/streambase.git</connection>
        <url>https://github.com/eclipse-ecsp/streambase</url>
        <tag>HEAD</tag>
    </scm>
    
   	<developers>
        <developer>
            <id>kaushalaroraharman</id>
            <name>Kaushal Arora</name>
            <email>kaushal.arora@harman.com</email>
        </developer>
        <developer>
            <id>ihussainbadshah</id>
            <name>Hussain Badshah</name>
            <email>Hussain.Badshah@harman.com</email>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/eclipse-ecsp/streambase/issues</url>
    </issueManagement>

	<organization>
        <url>https://github.com/eclipse-ecsp</url>
        <name>eclipse-ecsp</name>
    </organization>

    <properties>
	    <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <kafka.version>3.6.2</kafka.version>
        <zookeeper.version>3.8.4</zookeeper.version>
        <junit.version>5.5.2</junit.version>
        <jackson.version>2.9.8</jackson.version>
        <slf4j.version>2.0.13</slf4j.version>
        <additionalparam>-Xdoclint:none</additionalparam>
        <maven.surefire.version>2.18.1</maven.surefire.version>
        <maven.dependency.version>2.10</maven.dependency.version>
        <spring.test.version>6.1.14</spring.test.version>
        <spring-boot-starter>3.3.3</spring-boot-starter>
        <spring.version>6.1.14</spring.version>
        <embedded.mongodb>3.4.3</embedded.mongodb>
        <junit4.version>4.13.2</junit4.version>
        <nosql.dao.version>1.1.1</nosql.dao.version>
        <cache.enabler.version>1.0.0</cache.enabler.version>
        <transformers.version>1.0.0</transformers.version>
        <utils.version>1.1.1</utils.version>
        <entities.version>1.1.1</entities.version>
        <scala.version>2.13.14</scala.version>
        <curator.version>5.3.0</curator.version>
        <redis.jar.version>2.6.0.5</redis.jar.version>
        <jersey.version>2.34</jersey.version>
        <prometheus.client.version>0.6.0</prometheus.client.version>
        <paho.mqtt.client>1.2.2</paho.mqtt.client>
        <hivemq.mqtt.client>1.3.0</hivemq.mqtt.client>
        <io.confluent.schema-registry.version>7.3.3</io.confluent.schema-registry.version>
        <moquette.broker.version>0.17</moquette.broker.version>
        <testcontainers.version>1.18.3</testcontainers.version>
        <gson.version>2.8.9</gson.version>

	    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
        <sonar.java.source>${java.version}</sonar.java.source>
        <sonar.java.target>${java.version}</sonar.java.target>
        <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco-ut/jacoco.xml
        </sonar.coverage.jacoco.xmlReportPaths>
        <sonar.language>java</sonar.language>
        <jacoco.ut.execution.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec
        </jacoco.ut.execution.data.file>
        <sonar.coverage.exclusions>
            src/main/java/org/eclipse/ecsp/analytics/stream/base/StreamProcessingContext.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/StreamProcessor.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/StreamBaseConstant.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/PropertyNames.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/Abstract*.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/utils/Constants.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/utils/KafkaTestUtils.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/utils/RetryUtils.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/HarmanPersistentPrimitiveMapValueStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/ObjectStateStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/SortedKeyValueStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/MapObjectStateStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/HarmanRocksDBStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/dao/SinkNode.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/JsonStateStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/SerializedKVIterator.java,
            src/main/java/org/eclipse/ecsp/stream/dma/dao/DMAConstants.java,
            src/main/java/org/eclipse/ecsp/stream/dma/handler/DeviceMessageHandler.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/GenericValue.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/EventWrapperForMap.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/EventParser.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/EventParseException.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/EventWrapperForSequence.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/utils/InternalCacheConstants.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/parser/DeviceConnectionStatusParser.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/stores/HarmanPersistentKVStore.java,
            src/main/java/org/eclipse/ecsp/analytics/stream/base/discovery/SPIDiscoveryServiceImpl.java
        </sonar.coverage.exclusions>

        <checkstyle.version>10.13.0</checkstyle.version>
        <maven.checkstyle.version>3.3.1</maven.checkstyle.version>
        <checkstyle.config.location>${project.basedir}/checkstyle.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>${project.basedir}/checkstyle-suppressions.xml
        </checkstyle.suppressions.location>
        <sonar.java.checkstyle.reportPaths>${project.build.directory}/checkstyle-result.xml
        </sonar.java.checkstyle.reportPaths>
        <java.17.options>
            --add-opens=java.base/java.io=ALL-UNNAMED
            --add-opens=java.base/java.lang=ALL-UNNAMED
            --add-opens=java.base/java.math=ALL-UNNAMED
            --add-opens=java.base/java.util=ALL-UNNAMED
            --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
            --add-opens=java.base/java.net=ALL-UNNAMED
            --add-opens=java.base/java.text=ALL-UNNAMED
            --add-opens=java.sql/java.sql=ALL-UNNAMED
            --add-opens java.base/java.time=ALL-UNNAMED
        </java.17.options>

        <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
        <license-tool-plugin.version>1.1.0</license-tool-plugin.version>
        <install-plugin.version>3.1.1</install-plugin.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
    </distributionManagement>
 
    <pluginRepositories>
        <pluginRepository>
            <id>dash-licenses-releases</id>
            <url>https://repo.eclipse.org/content/repositories/dash-licenses-releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    
    <dependencies>	
		<dependency>
    		<groupId>org.testcontainers</groupId>
    		<artifactId>junit-jupiter</artifactId>
    		<version>${testcontainers.version}</version>
    		<scope>test</scope>
    		<exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
		</dependency>
		<dependency>
    		<groupId>org.testcontainers</groupId>
    		<artifactId>mongodb</artifactId>
    		<version>${testcontainers.version}</version>
    		<scope>test</scope>
    		<exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>    		
		</dependency>
		
		<dependency>
    		<groupId>org.testcontainers</groupId>
    		<artifactId>testcontainers</artifactId>
    		<version>${testcontainers.version}</version>
    		<scope>test</scope>
    		<exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
		</dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.kstyrc</groupId>
            <artifactId>embedded-redis</artifactId>
            <version>0.6</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>4.12.0</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <version>4.12.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.squareup.okhttp3</groupId>
                    <artifactId>okhttp</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-epoll</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit4.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-streams</artifactId>
            <version>${kafka.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-migrationsupport</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.esotericsoftware</groupId>
            <artifactId>kryo</artifactId>
            <version>5.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${kafka.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${kafka.version}</version>
            <classifier>test</classifier>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.13</artifactId>
            <version>${kafka.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.kafka</groupId>
                    <artifactId>kafka-metadata</artifactId>
                </exclusion>
                <exclusion>
					  <groupId>commons-logging</groupId>
					  <artifactId>commons-logging</artifactId>
				</exclusion>
				<exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.13</artifactId>
            <version>${kafka.version}</version>
            <classifier>test</classifier>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
            <version>${zookeeper.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-handler</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-epoll</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-test</artifactId>
            <version>${curator.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-streams-scala_2.13</artifactId>
            <version>${kafka.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <!-- This version must be compatible with the Scala version of the Kafka dependency. -->
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-metadata</artifactId>
            <version>${kafka.version}</version>
            <classifier>test</classifier>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core -->
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
            <version>3.2.6</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.4</version>
        </dependency>
        <dependency>
            <groupId>de.javakaffee</groupId>
            <artifactId>kryo-serializers</artifactId>
            <version>0.45</version>
        </dependency>
        <!-- Prometheus Dependencies -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient</artifactId>
            <version>${prometheus.client.version}</version>
        </dependency>
        <!-- Hotspot JVM metrics -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_hotspot</artifactId>
            <version>${prometheus.client.version}</version>
        </dependency>
        <!-- Exposition HTTPServer -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_httpserver</artifactId>
            <version>${prometheus.client.version}</version>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_servlet</artifactId>
            <version>${prometheus.client.version}</version>
        </dependency>
        <!-- Prometheus Dependencies -->

        <!-- Below 3 dependencies javax.xml.bind is needed by KCL worker
            as it is no longer provided from Java 9 -->

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.2.8</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.3.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.3.1</version>
        </dependency>

        <!-- javax.xml.bind is needed by KCL worker as it is no longer provided
            from Java 9 -->

        <!-- added for kinesis stream -->

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.test.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>

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

        <!-- Embedded MongoDB for testing -->
        <dependency>
            <groupId>de.flapdoodle.embed</groupId>
            <artifactId>de.flapdoodle.embed.mongo</artifactId>
            <version>${embedded.mongodb}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-compress</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-lang3</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ecsp</groupId>
            <artifactId>nosql-dao</artifactId>
            <version>${nosql.dao.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>utils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>entities</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ecsp</groupId>
            <artifactId>cache-enabler</artifactId>
            <version>${cache.enabler.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>transformers</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>utils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>entities</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ecsp</groupId>
            <artifactId>transformers</artifactId>
            <version>${transformers.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>utils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>entities</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ecsp</groupId>
            <artifactId>utils</artifactId>
            <version>${utils.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.ecsp</groupId>
                    <artifactId>entities</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.ecsp</groupId>
            <artifactId>entities</artifactId>
            <version>${entities.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.12.4</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.paho</groupId>
            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
            <version>${paho.mqtt.client}</version>
        </dependency>
        <!-- Embedded Mqtt Broker (Moquette) for testing -->
        <dependency>
            <groupId>io.moquette</groupId>
            <artifactId>moquette-broker</artifactId>
            <version>${moquette.broker.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-buffer</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-codec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-resolver</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-handler</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-codec-http</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>1.5.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>${spring-boot-starter}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>33.1.0-jre</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.hivemq/hivemq-mqtt-client -->
        <dependency>
            <groupId>com.hivemq</groupId>
            <artifactId>hivemq-mqtt-client</artifactId>
            <version>${hivemq.mqtt.client}</version>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-buffer</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-codec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-handler</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.reactivestreams</groupId>
                    <artifactId>reactive-streams</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <compilerArgs>
                            <arg>--add-opens=java.base/java.io=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.math=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.util.concurrent=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.net=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.base/java.text=ALL-UNNAMED</arg>
                            <arg>--add-opens=java.sql/java.sql=ALL-UNNAMED</arg>
                        </compilerArgs>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${install-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.cyclonedx</groupId>
                    <artifactId>cyclonedx-maven-plugin</artifactId>
                    <version>2.7.10</version>
                    <configuration>
                        <projectType>application</projectType>
                        <schemaVersion>1.5</schemaVersion>
                        <includeBomSerialNumber>true</includeBomSerialNumber>
                        <includeCompileScope>true</includeCompileScope>
                        <includeProvidedScope>true</includeProvidedScope>
                        <includeRuntimeScope>true</includeRuntimeScope>
                        <includeSystemScope>true</includeSystemScope>
                        <includeTestScope>true</includeTestScope>
                        <includeLicenseText>true</includeLicenseText>
                        <outputFormat>all</outputFormat>
                        <outputDirectory>${project.basedir}/sbom</outputDirectory>
                        <verbose>false</verbose>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>makeAggregateBom</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                            <arg>--batch</arg>
                            <arg>--yes</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.2</version>
                    <executions>
                        <execution>
                            <id>default-test</id>
                            <configuration>
                                <includes>
                                    <include>**/ecsp/cache/redis/*</include>
                                    <include>**/ecsp/dao/utils/*</include>
                                    <include>**/redis/embedded/*</include>
                                    <include>**/analytics/stream/base/utils/EmbeddedMQTTServer.class</include>
                                    <include>**/analytics/stream/base/kafka/EmbeddedKafka.class</include>
                                    <include>**/analytics/stream/base/kafka/EmbeddedZookeeper.class</include>
                                    <include>**/analytics/stream/base/kafka/SingleNodeKafkaCluster.class</include>
                                    <include>**/analytics/stream/base/utils/KafkaStreamsApplicationTestBase.class</include>
                                    <include>**/analytics/stream/base/utils/KafkaStreamsApplicationTestBase$*.class
                                    </include>
                                </includes>
                            </configuration>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>**/jar/</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <minimizeJar>false</minimizeJar>
                            <artifactSet/>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <configuration>
                    <argLine>${surefireArgLine} ${java.17.options}</argLine>
                    <forkMode>pertest</forkMode>
                    <childDelegation>true</childDelegation>
                    <excludedGroups>${excludeTestCaseGroups}</excludedGroups>
                    <excludes>
                        <exclude>**/MqttDispatcherHealthMontiorIntegrationTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.8</version>
                <configuration>
                    <excludes>
                        <exclude>org/eclipse/ecsp/analytics/aws/**/*</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/kcl/**/*</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/StreamProcessingContext.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/StreamProcessor.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/StreamBaseConstant.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/PropertyNames.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/Abstract*.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/utils/Constants.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/utils/KafkaTestUtils.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/utils/RetryUtils.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/dao/SinkNode.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/JsonStateStore.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/SerializedKVIterator.class</exclude>
                        <exclude>org/eclipse/ecsp/stream/dma/dao/DMAConstants.class</exclude>
                        <exclude>org/eclipse/ecsp/stream/dma/handler/DeviceMessageHandler.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/ObjectStateStore.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/SortedKeyValueStore.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/MapObjectStateStore.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/stores/HarmanPersistentPrimitiveMapValueStore.class
                        </exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/parser/GenericValue.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/parser/EventWrapperForMap.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/parser/EventParser.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/parser/EventParseException.class</exclude>
                        <exclude>org/eclipse/ecsp/analytics/stream/base/parser/EventWrapperForSequence.class</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${jacoco.ut.execution.data.file}</destFile>
                            <propertyName>surefireArgLine</propertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${jacoco.ut.execution.data.file}</dataFile>
                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.10.0.2594</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.version}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <outputFileFormat>xml</outputFileFormat>
                            <failOnViolation>true</failOnViolation>
                            <violationSeverity>warning</violationSeverity>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <includeResources>true</includeResources>
                            <includeTestResources>true</includeTestResources>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.dash</groupId>
                <artifactId>license-tool-plugin</artifactId>
                <version>${license-tool-plugin.version}</version>
                <configuration>
                    <includeScope>test</includeScope>
                </configuration>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <goals>
                            <goal>license-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <includeScope>compile</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
		<profile>
            <id>dash</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.dash</groupId>
                        <artifactId>license-tool-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                            <failWhenReviewNeeded>true</failWhenReviewNeeded>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>release</id>
			<properties>
                <maven.test.skip>false</maven.test.skip>
            </properties>
			<distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                    </plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.0</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-javadoc-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>javadoc</id>
			<properties>
                <maven.test.skip>true</maven.test.skip>
            </properties>
			<distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<release>${java.version}</release>
								</configuration>
							</execution>
						</executions>
					</plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
