diff --git a/.github/scripts/update_sdk_version.sh b/.github/scripts/update_sdk_version.sh index 0e5726ecca..b2e1033be9 100755 --- a/.github/scripts/update_sdk_version.sh +++ b/.github/scripts/update_sdk_version.sh @@ -12,6 +12,11 @@ mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -DprocessDependencies=true mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-tests/pom.xml +# BOMs are standalone (no parent), so versions:set skips them — update explicitly. +mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-bom/pom.xml +mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-bom/pom.xml +mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -f dapr-spring/dapr-spring-bom/pom.xml +mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f dapr-spring/dapr-spring-bom/pom.xml mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f sdk-tests/pom.xml diff --git a/README.md b/README.md index 1916cf5d49..6ab95b01b7 100644 --- a/README.md +++ b/README.md @@ -59,47 +59,143 @@ For the full list of available APIs, see the [Dapr API reference](https://docs.d If using [SDKMAN!](https://sdkman.io), execute `sdk env install` to install the required JDK. ### Importing Dapr's Java SDK -For a Maven project, add the following to your `pom.xml` file: + +#### Using a BOM (recommended) + +Two BOMs are published: + +- **`io.dapr:dapr-sdk-bom`** — core SDK modules (`dapr-sdk`, `dapr-sdk-actors`, `dapr-sdk-workflows`, `dapr-sdk-autogen`, `durabletask-client`, `testcontainers-dapr`) plus security-patched transitive dependencies (Netty, Jackson, commons-compress, commons-codec). +- **`io.dapr.spring:dapr-spring-bom`** — Spring-specific modules (`dapr-sdk-springboot`, `dapr-spring-*`). Imports `dapr-sdk-bom` transitively, so Spring users only need this single BOM. + +Pick the one that matches your project. Importing a BOM ensures you inherit security fixes for transitive dependencies like the Netty CVEs. + +##### Core (non-Spring) projects + +For Maven: ```xml ... + + + + io.dapr + dapr-sdk-bom + 1.18.0 + pom + import + + + + - ... - + io.dapr dapr-sdk - 1.17.2 io.dapr dapr-sdk-actors - 1.17.2 - + + ... + +``` + +For Gradle: +```groovy +dependencies { + implementation platform('io.dapr:dapr-sdk-bom:1.18.0') + + // Dapr's core SDK with all features, except Actors. + implementation 'io.dapr:dapr-sdk' + // Dapr's SDK for Actors (optional). + implementation 'io.dapr:dapr-sdk-actors' +} +``` + +##### Spring Boot projects + +For Maven: +```xml + + ... + + + + io.dapr.spring + dapr-spring-bom + 1.18.0 + pom + import + + + + + + io.dapr dapr-sdk-springboot - 1.17.2 - ... + + + io.dapr.spring + dapr-spring-boot-starter + ... ``` -For a Gradle project, add the following to your `build.gradle` file: +For Gradle: +```groovy +dependencies { + implementation platform('io.dapr.spring:dapr-spring-bom:1.18.0') + // Dapr's SDK integration with Spring Boot. + implementation 'io.dapr:dapr-sdk-springboot' + // Optional Spring Boot starter. + implementation 'io.dapr.spring:dapr-spring-boot-starter' +} ``` + +#### Without the BOM + +If you prefer to manage versions manually, specify the version on each dependency: + +For Maven: +```xml + + ... + + + io.dapr + dapr-sdk + 1.17.2 + + + io.dapr + dapr-sdk-actors + 1.17.2 + + + io.dapr + dapr-sdk-springboot + 1.17.2 + + + ... + +``` + +For Gradle: +```groovy dependencies { -... - // Dapr's core SDK with all features, except Actors. - compile('io.dapr:dapr-sdk:1.17.2') - // Dapr's SDK for Actors (optional). - compile('io.dapr:dapr-sdk-actors:1.17.2') - // Dapr's SDK integration with SpringBoot (optional). - compile('io.dapr:dapr-sdk-springboot:1.17.2') + implementation 'io.dapr:dapr-sdk:1.17.2' + implementation 'io.dapr:dapr-sdk-actors:1.17.2' + implementation 'io.dapr:dapr-sdk-springboot:1.17.2' } ``` diff --git a/dapr-spring/dapr-spring-bom/pom.xml b/dapr-spring/dapr-spring-bom/pom.xml new file mode 100644 index 0000000000..d15820a210 --- /dev/null +++ b/dapr-spring/dapr-spring-bom/pom.xml @@ -0,0 +1,185 @@ + + 4.0.0 + + io.dapr.spring + dapr-spring-bom + 1.18.0-SNAPSHOT + pom + dapr-spring-bom + Dapr Spring Bill of Materials (BOM). Import this POM to manage versions + of dapr-sdk-springboot and all dapr-spring-* modules. Imports dapr-sdk-bom + transitively, so Spring users only need this single BOM. + https://dapr.io + + + + Apache License Version 2.0 + https://opensource.org/licenses/Apache-2.0 + + + + + + Dapr + daprweb@microsoft.com + Dapr + https://dapr.io + + + + + https://github.com/dapr/java-sdk + scm:git:https://github.com/dapr/java-sdk.git + HEAD + + + + + ossrh + https://central.sonatype.com/repository/maven-snapshots/ + + + + + true + 1.18.0-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.12.1 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://ossrh-staging-api.central.sonatype.com + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + --batch + --pinentry-mode + loopback + + + + + + + + + + + + + + + + io.dapr + dapr-sdk-bom + ${dapr.sdk.version} + pom + import + + + + + + + io.dapr + dapr-sdk-springboot + ${dapr.sdk.version} + + + + + + + io.dapr.spring + dapr-spring-data + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-6-data + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-messaging + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-workflows + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-properties + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-autoconfigure + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-4-autoconfigure + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-tests + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-starter + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-4-starter + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-starter-test + ${dapr.sdk.version} + + + io.dapr.spring + dapr-spring-boot-4-starter-test + ${dapr.sdk.version} + + + + + diff --git a/dapr-spring/pom.xml b/dapr-spring/pom.xml index 842b4355b4..d411ceb51f 100644 --- a/dapr-spring/pom.xml +++ b/dapr-spring/pom.xml @@ -18,6 +18,7 @@ SDK extension for Spring and Spring Boot + dapr-spring-bom dapr-spring-data dapr-spring-6-data dapr-spring-messaging diff --git a/pom.xml b/pom.xml index f4484aa3fc..262d0ffdda 100644 --- a/pom.xml +++ b/pom.xml @@ -727,6 +727,7 @@ + sdk-bom sdk-autogen sdk sdk-actors diff --git a/sdk-bom/pom.xml b/sdk-bom/pom.xml new file mode 100644 index 0000000000..8cd40c6574 --- /dev/null +++ b/sdk-bom/pom.xml @@ -0,0 +1,168 @@ + + 4.0.0 + + io.dapr + dapr-sdk-bom + 1.18.0-SNAPSHOT + pom + dapr-sdk-bom + Dapr SDK Bill of Materials (BOM) for the core SDK modules. Import this POM + to manage versions of dapr-sdk, dapr-sdk-actors, dapr-sdk-workflows, and their + security-critical transitive dependencies. Spring users should also import + dapr-spring-bom for the Spring-specific modules. + https://dapr.io + + + + Apache License Version 2.0 + https://opensource.org/licenses/Apache-2.0 + + + + + + Dapr + daprweb@microsoft.com + Dapr + https://dapr.io + + + + + https://github.com/dapr/java-sdk + scm:git:https://github.com/dapr/java-sdk.git + HEAD + + + + + ossrh + https://central.sonatype.com/repository/maven-snapshots/ + + + + + true + 1.18.0-SNAPSHOT + + 4.1.132.Final + 2.21.2 + + 1.26.0 + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.12.1 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://ossrh-staging-api.central.sonatype.com + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + + --batch + --pinentry-mode + loopback + + + + + + + + + + + + + + + io.dapr + dapr-sdk-autogen + ${dapr.sdk.version} + + + io.dapr + dapr-sdk + ${dapr.sdk.version} + + + io.dapr + dapr-sdk-actors + ${dapr.sdk.version} + + + io.dapr + dapr-sdk-workflows + ${dapr.sdk.version} + + + io.dapr + testcontainers-dapr + ${dapr.sdk.version} + + + io.dapr + durabletask-client + ${dapr.sdk.version} + + + + + + + io.netty + netty-bom + ${netty.version} + pom + import + + + com.fasterxml.jackson + jackson-bom + ${jackson.version} + pom + import + + + org.apache.commons + commons-compress + ${commons-compress.version} + + + commons-codec + commons-codec + 1.17.2 + + + + +