Description
Going along the lines of #21723 etc. (i.e. switching from the Spring Dependency Management Plugin to platform
declarations), one stumbles upon the following problem: not all Managed Dependency Coordinates have equivalent spring-boot-dependencies
- which, basically, is because they do not all have equivalent Version Properties. This is somewhat visible even with SDMP, when it's impossible to use ext[]
to bump the version of those, but at least you get the managed dependency coordinates defined versions handled by the plugin itself then. However, with just the platform BOM it's completely broken - no coordinates are defined at all, and the buildscripts fail, requiring manual BOM inclusion or explicit coord/version definitions. edit: was the case for OkHttp, but that's actually to be expected
While having this extend to version properties is not strictly required I guess, there is a strict 1:1 relationship between version properties and spring-boot-dependencies
BOM as of now, so keeping it that way (version properties===spring-boot-dependencies) would be useful.
TBH, this is not even a strict case where "we don't define those as managed dependency coordinates because there are no BOMs" or "single-use version would unlikely be useful" etc. reasoning would apply. E.g., OkHttp has a well-defined BOM published @ https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp-bom , and there are a whopping 9 managed dependency coordinates defined for it - but no version properties, and no support via spring-boot-dependencies. The obvious workaround is to use platform BOM explicitly, but why have it as a managed dependency coordinate if one is expected to use the BOM/explicit version manually anyway? edit: see above
My proposal would be to strictly align managed dependency coordinates with version properties with n:1 relationship. FWIW, this would also allow the relevant doc pages and tables to be merged into one, to make it easier to figure which co-ord is applied where and when - knowing which particular version is applied to which particular artifact from the group requires a bit of research ATM, with the quickest way being just looking at https://github.com/spring-projects/spring-boot/blob/v3.4.1/spring-boot-project/spring-boot-dependencies/build.gradle , which somewhat defeats the purpose of version properties page. E.g. if I have a org.apache.kafka.kafka-clients
dep, managed dependency coordinates page tells me that 3.8.1
will be used; looking at version properties I might suspect it will use kafka.version
, but no real proof exists there (not even the default value of the version is provided in the doc). Only by looking at https://github.com/spring-projects/spring-boot/blob/v3.4.1/spring-boot-project/spring-boot-dependencies/build.gradle#L1098 the relationship gets clear.
Note 1: current docs are obviously right by saying (managed dependency coordinates) "The following table provides details of all of the dependency versions that are provided by Spring Boot in its CLI (Command Line Interface), Maven dependency management, and Gradle plugin." - however, this fails POLA test IMVHO, as one would expect all the Spring Boot Managed Dependency Coordinates to be handled by Spring Boot Dependencies BOM as well :)
Note 2: if a PR is needed here, I'd be happy to help (although this seems easy enough to handle directly by the dev team I guess? :)