<project
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://maven.apache.org/POM/4.0.0"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.dapr</groupId>
  <artifactId>dapr-sdk-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.16.1</version>
  <name>dapr-sdk-parent</name>
  <description>SDK for Dapr.</description>
  <url>https://dapr.io</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <grpc.version>1.69.0</grpc.version>
    <protobuf.version>3.25.5</protobuf.version>
    <protocCommand>java-sdk-protoc</protocCommand>
    <dapr.proto.baseurl>https://raw.githubusercontent.com/dapr/dapr/v1.16.0/dapr/proto</dapr.proto.baseurl>
    <dapr.sdk.version>1.16.1</dapr.sdk.version>
    <dapr.sdk.alpha.version>0.16.1</dapr.sdk.alpha.version>
    <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
    <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
    <maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
    <maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
    <maven-sources-plugin.version>3.2.1</maven-sources-plugin.version>
    <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
    <jacoco-maven-plugin.coverage-ratio>80%</jacoco-maven-plugin.coverage-ratio>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>
    <maven.deploy.skip>true</maven.deploy.skip>
    <!--
        manually declare durabletask-client's jackson dependencies for workflows sdk
        which conflict with dapr-sdk's jackson dependencies
        https://github.com/dapr/durabletask-java/blob/main/client/build.gradle#L16
        -->
    <jackson.version>2.16.1</jackson.version>
    <gpg.skip>true</gpg.skip>
    <spotbugs.fail>true</spotbugs.fail>
    <spotbugs.exclude.filter.file>../spotbugs-exclude.xml</spotbugs.exclude.filter.file>
    <argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
    <failsafe.version>3.2.2</failsafe.version>
    <surefire.version>3.2.2</surefire.version>
    <junit-bom.version>5.11.4</junit-bom.version>
    <snakeyaml.version>2.0</snakeyaml.version>
    <testcontainers.version>1.21.3</testcontainers.version>
    <!-- Do NOT UPGRADE spring.version without checking springboot.version alignment -->
    <springboot.version>3.4.6</springboot.version>
    <springframework.version>6.2.7</springframework.version>
    <!-- Do NOT UPGRADE springframework.version without checking springboot.version alignment -->
    <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
    <assertj.version>3.27.3</assertj.version>
    <grpc.version>1.69.0</grpc.version>
    <protobuf.version>3.25.5</protobuf.version>
    <opentelemetry.version>1.41.0</opentelemetry.version>
    <wiremock.version>3.9.1</wiremock.version>
    <jakarta.annotation.version>2.1.1</jakarta.annotation.version>
    <javax.annotation.version>1.3.2</javax.annotation.version>
    <commons-lang.version>3.18.0</commons-lang.version>
    <commons-cli.version>1.9.0</commons-cli.version>
    <commons-io.version>2.14.0</commons-io.version>
    <zipkin.version>3.4.0</zipkin.version>
    <microcks.version>0.3.1</microcks.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
    <site>
      <id>localDocsDirectory</id>
      <url>file:${maven.multiModuleProjectDirectory}/docs/</url>
    </site>
    <!-- Use default repository -->
    <!-- <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository> -->
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.9</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-bom</artifactId>
        <version>${grpc.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-api</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit-bom.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>3.11.2</version>
      </dependency>
      <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-test</artifactId>
        <version>3.5.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-testing</artifactId>
        <version>${grpc.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-inprocess</artifactId>
        <version>${grpc.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-stdlib</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>${snakeyaml.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr</groupId>
        <artifactId>dapr-sdk</artifactId>
        <version>${dapr.sdk.version}</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${junit-bom.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit-bom.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit-bom.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit-bom.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>kafka</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${springboot.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>postgresql</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>rabbitmq</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>5.5.1</version>
      </dependency>
      <dependency>
        <groupId>io.dapr.spring</groupId>
        <artifactId>dapr-spring-boot-starter</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr.spring</groupId>
        <artifactId>dapr-spring-boot-starter-test</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-keyvalue</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-commons</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-testcontainers</artifactId>
        <version>${springboot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr</groupId>
        <artifactId>testcontainers-dapr</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>toxiproxy</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>mysql</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>${jakarta.annotation.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>${javax.annotation.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>${commons-cli.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-protobuf</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-stub</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-sdk</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-api</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-context</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-sdk-common</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-sdk-trace</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-sdk-metrics</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-exporter-common</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-exporter-logging</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-exporter-zipkin</artifactId>
        <version>${opentelemetry.version}</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/io.zipkin.reporter2/zipkin-reporter -->
      <dependency>
        <groupId>io.zipkin.reporter2</groupId>
        <artifactId>zipkin-reporter</artifactId>
        <version>${zipkin.version}</version>
      </dependency>
      <dependency>
        <groupId>io.zipkin.reporter2</groupId>
        <artifactId>zipkin-sender-urlconnection</artifactId>
        <version>${zipkin.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr</groupId>
        <artifactId>dapr-sdk-actors</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr</groupId>
        <artifactId>dapr-sdk-springboot</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dapr</groupId>
        <artifactId>dapr-sdk-workflows</artifactId>
        <version>${dapr.sdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>${wiremock.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${springboot.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-sources-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <release>${maven.compiler.release}</release>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${failsafe.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
              <configuration>
                <!--suppress UnresolvedMavenProperty -->
                <skip>${skipITs}</skip>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${nexus-staging-maven-plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://ossrh-staging-api.central.sonatype.com</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>default-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <outputDirectory>target/jacoco-report/</outputDirectory>
              </configuration>
            </execution>
            <execution>
              <id>check</id>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <rules>
                  <rule>
                    <element>BUNDLE</element>
                    <limits>
                      <limit>
                        <counter>LINE</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>${jacoco-maven-plugin.coverage-ratio}</minimum>
                      </limit>
                    </limits>
                  </rule>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.11</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <gpgArguments>
                <arg>--batch</arg>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.4.0</version>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
          <headerLocation>.java_header</headerLocation>
          <consoleOutput>true</consoleOutput>
          <violationSeverity>warning</violationSeverity>
          <failOnViolation>true</failOnViolation>
          <failsOnError>true</failsOnError>
          <linkXRef>false</linkXRef>
          <sourceDirectories>
            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
          </sourceDirectories>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>10.17.0</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.8.2.0</version>
        <configuration>
          <excludeFilterFile>${spotbugs.exclude.filter.file}</excludeFilterFile>
          <failOnError>${spotbugs.fail}</failOnError>
          <xmlOutput>true</xmlOutput>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.8.2</version>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <reports>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <destDir>/</destDir>
          <failOnWarnings>false</failOnWarnings>
          <failOnError>true</failOnError>
          <goal>site</goal>
          <notimestamp>true</notimestamp>
          <excludePackageNames>io.dapr.examples:io.dapr.springboot:io.dapr.examples.*:io.dapr.springboot.*
          </excludePackageNames>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://opensource.org/licenses/Apache-2.0</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Dapr</name>
      <email>daprweb@microsoft.com</email>
      <organization>Dapr</organization>
      <organizationUrl>https://dapr.io</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/dapr/java-sdk</url>
    <connection>scm:git:https://github.com/dapr/java-sdk.git</connection>
    <tag>HEAD</tag>
  </scm>

  <modules>
    <module>sdk-autogen</module>
    <module>sdk</module>
    <module>sdk-actors</module>
    <module>sdk-workflows</module>
    <module>sdk-springboot</module>
    <module>dapr-spring</module>
    <module>examples</module>
    <module>spring-boot-examples</module>
    <!-- We are following test containers artifact convention on purpose, don't rename -->
    <module>testcontainers-dapr</module>
  </modules>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <modules>
        <module>sdk-tests</module>
      </modules>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>
            </plugins>
        </build>

    </profile>
  </profiles>

</project>
