<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>services-dependencies</artifactId>
    <groupId>org.eclipse.ecsp</groupId>
    <version>1.0.0</version>
    <relativePath>pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>api-common</artifactId>
  <packaging>${packaging.type}</packaging>
  <name>api-common</name>
  <version>1.0.0</version>
  <description>api-common is library provides common functionality for exposing Rest APIs</description>
  <url>https://github.com/eclipse-ecsp/api-common</url>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/eclipse-ecsp/api-common/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <id>abhishekkumar-harman</id>
      <name>Abhishek Kumar</name>
      <email>Abhishek.Kumar87@harman.com</email>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/eclipse-ecsp/api-common.git</connection>
    <url>https://github.com/eclipse-ecsp/api-common.git</url>
  </scm>
  <organization>
    <name>eclipse-ecsp</name>
    <url>https://github.com/eclipse-ecsp</url>
  </organization>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.cyclonedx</groupId>
          <artifactId>cyclonedx-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>makeAggregateBom</goal>
              </goals>
            </execution>
          </executions>
          <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>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}</directory>
              <includes>
                <include>**/jar/</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <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.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-unit-test</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven.checkstyle.plugin.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
              <outputFileFormat>xml</outputFileFormat>
              <failsOnError>true</failsOnError>
              <includeTestSourceDirectory>true</includeTestSourceDirectory>
              <includeResources>true</includeResources>
              <includeTestResources>true</includeTestResources>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <skipSource>${skipSource}</skipSource>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skip>${skipJavadocs}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eclipse.dash</groupId>
        <artifactId>license-tool-plugin</artifactId>
        <executions>
          <execution>
            <id>license-check</id>
            <goals>
              <goal>license-check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includeScope>test</includeScope>
          <skip>${skipDash}</skip>
          <failWhenReviewNeeded>${failWhenReviewNeeded}</failWhenReviewNeeded>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <gpgArguments>
            <arg>--pinentry-mode</arg>
            <arg>loopback</arg>
            <arg>--batch</arg>
            <arg>--yes</arg>
          </gpgArguments>
          <skip>${skipGpgSign}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <skipStaging>${skipNexusStaging}</skipStaging>
          <autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <properties>
        <skipNexusStaging>true</skipNexusStaging>
        <skipDash>true</skipDash>
        <skipGpgSign>true</skipGpgSign>
        <skipJavadocs>false</skipJavadocs>
        <skipSource>false</skipSource>
        <skipTests>false</skipTests>
        <autoReleaseAfterClose>false</autoReleaseAfterClose>
      </properties>
    </profile>
    <profile>
      <id>dash</id>
      <properties>
        <skipNexusStaging>true</skipNexusStaging>
        <skipDash>false</skipDash>
        <failWhenReviewNeeded>true</failWhenReviewNeeded>
        <skipGpgSign>true</skipGpgSign>
        <skipJavadocs>true</skipJavadocs>
        <skipSource>true</skipSource>
        <skipTests>true</skipTests>
        <autoReleaseAfterClose>false</autoReleaseAfterClose>
        <skipCheckstyle>true</skipCheckstyle>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <properties>
        <skipNexusStaging>false</skipNexusStaging>
        <skipDash>true</skipDash>
        <skipGpgSign>false</skipGpgSign>
        <skipJavadocs>false</skipJavadocs>
        <skipSource>false</skipSource>
        <skipTests>false</skipTests>
        <autoReleaseAfterClose>true</autoReleaseAfterClose>
      </properties>
    </profile>
  </profiles>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>dash-licenses-releases</id>
      <url>https://repo.eclipse.org/content/repositories/dash-licenses-releases/</url>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>io.moquette</groupId>
      <artifactId>moquette-broker</artifactId>
      <version>0.17</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-reload4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec-http</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-codec-mqtt</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-transport-native-epoll</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>h2-mvstore</artifactId>
          <groupId>com.h2database</groupId>
        </exclusion>
        <exclusion>
          <artifactId>HikariCP</artifactId>
          <groupId>com.zaxxer</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-librato</artifactId>
          <groupId>com.librato.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>librato-java</artifactId>
          <groupId>com.librato.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bugsnag</artifactId>
          <groupId>com.bugsnag</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.14.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>3.4.5</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>log4j-to-slf4j</artifactId>
          <groupId>org.apache.logging.log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-boot-starter-logging</artifactId>
          <groupId>org.springframework.boot</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-boot-test-autoconfigure</artifactId>
          <groupId>org.springframework.boot</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-path</artifactId>
          <groupId>com.jayway.jsonpath</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <groupId>jakarta.xml.bind</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-smart</artifactId>
          <groupId>net.minidev</groupId>
        </exclusion>
        <exclusion>
          <artifactId>assertj-core</artifactId>
          <groupId>org.assertj</groupId>
        </exclusion>
        <exclusion>
          <artifactId>awaitility</artifactId>
          <groupId>org.awaitility</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hamcrest</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>mockito-junit-jupiter</artifactId>
          <groupId>org.mockito</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jsonassert</artifactId>
          <groupId>org.skyscreamer</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-test</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-core</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-migrationsupport</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>1.11.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-platform-engine</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-test</artifactId>
      <version>3.4.5</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>spring-test</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>mockwebserver</artifactId>
      <version>4.12.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>okhttp</artifactId>
          <groupId>com.squareup.okhttp3</groupId>
        </exclusion>
        <exclusion>
          <artifactId>kotlin-stdlib-jdk8</artifactId>
          <groupId>org.jetbrains.kotlin</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>1.21.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>duct-tape</artifactId>
          <groupId>org.rnorth.duct-tape</groupId>
        </exclusion>
        <exclusion>
          <artifactId>docker-java-api</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
        <exclusion>
          <artifactId>docker-java-transport-zerodep</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>1.21.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.redis</groupId>
      <artifactId>testcontainers-redis</artifactId>
      <version>2.2.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>testcontainers-redis-common</artifactId>
          <groupId>com.redis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>mongodb</artifactId>
      <version>1.20.6</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>kafka</artifactId>
      <version>1.20.6</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <sonar.language>java</sonar.language>
    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <sonar.exclusions>src/main/java/org/eclipse/ecsp/exceptions/*,
            src/main/java/org/eclipse/ecsp/conditions/*,
            src/main/java/org/eclipse/ecsp/utils/Constants.java,
            src/main/java/org/eclipse/ecsp/configurations/KafkaConfig.java,
            src/main/java/org/eclipse/ecsp/configurations/WebConfig.java,
            src/main/java/org/eclipse/ecsp/constants/ResponseMsgConstants.java,
            src/main/java/org/eclipse/ecsp/Application.java</sonar.exclusions>
    <checkstyle.version>10.23.1</checkstyle.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <packaging.type>jar</packaging.type>
    <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
    <checkstyle.config.location>${project.basedir}/checkstyle.xml</checkstyle.config.location>
  </properties>
</project>
