Skip to content

build: Replace the Spring Boot BOM with individual BOMs - #1428

Open
ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:replace-boot-bom-main
Open

ZPascal wants to merge 2 commits into
cloudfoundry:mainfrom
ZPascal:replace-boot-bom-main

Conversation

@ZPascal

@ZPascal ZPascal commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This is the second step from the discussion in #1424. It builds on #1425, so the first commit here is that PR. I'll rebase once it's merged.

The library modules don't need Spring Boot. We only used its BOM to get versions for a few libraries, and as a side effect our own version properties didn't do anything because Boot decided the versions anyway.

What changes:

  • The Boot BOM is replaced with the BOMs of the libraries we actually use: Jackson, Netty, Reactor, Kotlin, JUnit, Mockito, SLF4J and Spring Framework. Logback, byte-buddy, AssertJ and SnakeYAML are pinned directly.
  • The library modules no longer use spring-boot-starter-test or spring-boot-starter-logging. They depend on junit-jupiter, logback-classic and jul-to-slf4j directly. cloudfoundry-util uses SLF4J in its main code, so it now declares slf4j-api itself instead of getting it through an optional logging starter.
  • integration-test, test-log-cache and test-service-broker still use Spring Boot. Only the starters are pinned, so these modules use the same library versions as the client. I first tried importing the Boot BOM in those modules, but then it overrides the parent and the integration tests ran against Jackson 2.15.
  • spring-boot-maven-plugin had no version, so Maven picked whatever the latest release was. It's pinned now.

I kept all versions exactly as Boot 3.2.1 resolved them, so this PR is only about structure. Once Dependabot runs on main (#1426) we'll get separate PRs for each library and can update them one by one.

I compared the resolved dependencies of every module before and after. The only version change is commons-codec, 1.16.0 to 1.19.0, which is what commons-compress 1.28 asks for. Everything else that disappears is test-only stuff that came with spring-boot-starter-test and wasn't used (jsonassert, json-path, xmlunit, awaitility, spring-test and so on). The integration test module and the test apps resolve exactly the same as before.

Tested locally: all modules build, unit tests pass, and integration-test, test-log-cache and test-service-broker compile and package. spotless:check fails on the test apps, but that's already the case on main. It's fixed in #1429.

wire-runtime-jvm 6.3.0 and okio-jvm 3.17.0 are built against
kotlin-stdlib 2.0.21, but Spring Boot 3.2.1 pins it to 1.9.21.
Import kotlin-bom 2.0.21 before spring-boot-dependencies so its
version wins, the same way jackson-bom is handled.

Also drop the junit-jupiter.version, mockito.version and
snakeyaml.version properties. Nothing references them, so the
versions actually used come from Spring Boot and the properties
only make it look like they are pinned.
The library modules only need Spring Boot's dependency management for
a handful of libraries, and it made our own version properties
pointless because Boot decided the versions anyway.

Import the BOMs for the libraries we actually use instead (Jackson,
Netty, Reactor, Kotlin, JUnit, Mockito, SLF4J, Spring Framework) and
pin the rest (Logback, byte-buddy, AssertJ, SnakeYAML). All versions
are the ones Spring Boot 3.2.1 resolved before, so nothing changes
except commons-codec, which now follows commons-compress (1.16.0 to
1.19.0). Netty, Kotlin and byte-buddy need to be managed explicitly,
otherwise they would drop to older transitive versions.

The library modules no longer use spring-boot-starter-test and
spring-boot-starter-logging. They now depend on junit-jupiter,
logback-classic and jul-to-slf4j directly. cloudfoundry-util uses
SLF4J in main code, so it now declares slf4j-api instead of getting
it from an optional logging starter.

Spring Boot stays for integration-test, test-log-cache and
test-service-broker. Only the starters are pinned, so these modules
use the same library versions as the client itself. The
spring-boot-maven-plugin had no version, so Maven picked the latest
release; it is now pinned too.
Lokowandtg
Lokowandtg previously approved these changes Dec 2, 2026
@ZPascal
ZPascal dismissed Lokowandtg’s stale review December 2, 2026 17:50

The merge-base changed after approval.

@ZPascal
ZPascal requested review from a team and Lokowandtg December 2, 2026 17:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants