build: upgrade dependencies to Spring Boot 4.1.2 versions

Align the versions that Spring Boot manages with its latest GA release:
Micrometer 1.17.2, Micrometer Tracing 1.7.2, Mockito 5.23.0 and JSON Path
2.10.0. The Spring Boot version used in the docs moves to 4.1.2 too.

Upgrade the versions that it doesn't manage to their latest GA releases:
Spring Cloud Stream 5.0.4, Commons Compress 1.28.0 and JaCoCo 0.8.16.

Jackson stays on 2.21.x, at 2.21.8. Pulsar stays on 4.2.5, and so protobuf
stays on 3.25.x.

Assisted-by: Claude Code/claude-opus-5-5
1 file changed
tree: 8c05afa06607c6ba284a5af5a4399062a86841a9
  1. buildSrc/
  2. gradle/
  3. pulsar-spring/
  4. pulsar-spring-bom/
  5. pulsar-spring-boot-autoconfigure/
  6. pulsar-spring-boot-starter/
  7. pulsar-spring-boot-starter-test/
  8. pulsar-spring-cache-provider/
  9. pulsar-spring-cache-provider-caffeine/
  10. pulsar-spring-cloud-stream-binder/
  11. pulsar-spring-dependencies/
  12. pulsar-spring-docs/
  13. pulsar-spring-integration-tests/
  14. pulsar-spring-sample-apps/
  15. pulsar-spring-test/
  16. src/
  17. .asf.yaml
  18. .gitignore
  19. .mailmap
  20. .ratignore
  21. AGENTS.md
  22. build.gradle
  23. gradle.properties
  24. gradlew
  25. gradlew.bat
  26. LICENSE
  27. NOTICE
  28. README.md
  29. SECURITY.md
  30. settings.gradle
README.md

Apache Pulsar support for Spring

Apache Pulsar support for Spring makes it easier to build Apache Pulsar applications with Spring. It provides PulsarTemplate for publishing messages, @PulsarListener and @PulsarReader for consuming them, Spring Boot auto-configuration and a Spring Cloud Stream binder.

Documentation

The reference documentation will be available at https://pulsar.apache.org/pulsar-spring/reference.

Until it's published, you can build it locally with the command in Building.

Background

This project is the successor to Spring for Apache Pulsar. It brings together code that was previously maintained in three repositories:

Previous repositoryCode
spring-projects/spring-pulsarCore library, cache providers and test utilities
spring-projects/spring-bootSpring Boot auto-configuration and starters
spring-cloud/spring-cloud-streamSpring Cloud Stream binder

The version has been bumped to 3.0.0-M1 to indicate that it's the successor to Spring for Apache Pulsar 2.0.x. Further development happens under the Apache Pulsar project in this repository.

The Maven coordinates and Java packages have changed. See Migration from Spring's Pulsar support for the changes to make in your application.

Modules

All artifacts use the org.apache.pulsar group ID.

ArtifactDescription
pulsar-springCore library
pulsar-spring-boot-autoconfigureSpring Boot auto-configuration
pulsar-spring-boot-starterStarter for Spring Boot applications
pulsar-spring-boot-starter-testStarter for testing Spring Boot applications
pulsar-spring-cloud-stream-binderSpring Cloud Stream binder
pulsar-spring-cache-providerCache provider API
pulsar-spring-cache-provider-caffeineCaffeine cache provider
pulsar-spring-testTest utilities
pulsar-spring-bomBill of materials

Sample applications are in pulsar-spring-sample-apps.

Building

The build uses the included Gradle wrapper and a Java 25 toolchain. Docker is required for the tests.

# Full build, including tests
./gradlew build

# Also run the sample application tests
./gradlew build -PsampleTests

# Reference documentation, generated in pulsar-spring-docs/build/site
./gradlew :pulsar-spring-docs:antora

Publishing

Artifacts are published to the Apache repository. publishArtifacts uses the snapshot repository for -SNAPSHOT versions and a staging repository for other versions, which must be signed. It refuses to publish a version to the wrong repository.

Pass your ASF credentials as environment variables so that they aren't stored in gradle.properties, and start the command with a space to keep the password out of your shell history:

# Snapshot
 ORG_GRADLE_PROJECT_apacheSnapshotsUsername=<ASF ID> \
 ORG_GRADLE_PROJECT_apacheSnapshotsPassword=<password> \
 ./gradlew publishArtifacts

# Release or milestone, with -Psigning.gnupg.keyName=<key ID> to choose a key other than the default
 ORG_GRADLE_PROJECT_apacheReleasesUsername=<ASF ID> \
 ORG_GRADLE_PROJECT_apacheReleasesPassword=<password> \
 ./gradlew publishArtifacts -PuseGpgCmd=true

Set -PapacheSnapshotsRepoUrl and -PapacheReleasesRepoUrl to file:// URLs to test the publication without uploading anything.

Source release

sourceRelease creates the source release for an ASF release vote in build/source-release: an archive of the committed tree, with a SHA-512 checksum and a detached signature.

./gradlew sourceRelease -PuseGpgCmd=true

For a non-snapshot version, it fails if there are uncommitted changes, if the committed gradle.properties has a different version, or if signing isn't configured. The reference documentation is skipped when building from the archive because Antora needs a git repository, so build the site from a clone.

Security

Don't report vulnerabilities in public issues. See SECURITY.md for how to report them.

License

Licensed under the Apache License, Version 2.0.