<?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>services-common</artifactId>
  <packaging>${packaging.type}</packaging>
  <name>services-common</name>
  <version>1.0.0</version>
  <description>Common library for services</description>
  <url>https://github.com/eclipse-ecsp/services-common</url>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/eclipse-ecsp/services-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/services-common.git</connection>
    <url>https://github.com/eclipse-ecsp/services-common.git</url>
  </scm>
  <organization>
    <name>eclipse-ecsp</name>
    <url>https://github.com/eclipse-ecsp</url>
  </organization>
  <build>
    <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>
      <plugin>
        <artifactId>maven-compiler-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-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>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </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>
        <configuration>
          <excludes>
            <exclude>com/harman/analytics/aws/**/*</exclude>
            <exclude>com/harman/analytics/stream/kcl/**/*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <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>
              <failOnViolation>true</failOnViolation>
              <violationSeverity>warning</violationSeverity>
              <includeTestSourceDirectory>true</includeTestSourceDirectory>
              <includeResources>true</includeResources>
              <includeTestResources>true</includeTestResources>
              <skip>${skipCheckstyle}</skip>
            </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>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </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>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>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</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>spring-boot-starter-logging</artifactId>
          <groupId>org.springframework.boot</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-boot-test</artifactId>
          <groupId>org.springframework.boot</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-boot-test-autoconfigure</artifactId>
          <groupId>org.springframework.boot</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <groupId>jakarta.xml.bind</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>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>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>kotlin-stdlib-jdk8</artifactId>
          <groupId>org.jetbrains.kotlin</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.38</version>
      <scope>provided</scope>
    </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>org.testcontainers</groupId>
      <artifactId>mongodb</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.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
    <sonar.exclusions>src/main/java/org/eclipse/ecsp/services/exceptions/*.java,
            src/main/java/org/eclipse/ecsp/services/utils/JsonMapperUtils.java,
            src/main/java/org/eclipse/ecsp/services/constants/EventAttribute.java</sonar.exclusions>
    <sonar.java.checkstyle.reportPaths>${project.build.directory}/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.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>
    <sonar.language>java</sonar.language>
    <maven.jar.plugin>2.2</maven.jar.plugin>
    <checkstyle.version>10.23.1</checkstyle.version>
    <maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
  </properties>
</project>
