-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Description
I'm on Java 17 and latest spring boot. spring-boot-project/spring-boot-dependencies/build.gradle has been giving me grief because of hard-coded overrides like this:
library("Derby", "10.14.2.0") {
prohibit("[10.15,)") {
because "it requires Java 9"
}
group("org.apache.derby") {
modules = [
"derby",
"derbyclient"
]
}
}
Derby is 2 versions beyond the one in the bom. Shouldn't BomExtension.prohibit() at least check to see if I'm even targeting below Java 9 before overriding the version? prohibit also doesn't fail the build, it just limits the version number. In the case of Derby it still allows other new dependency jars that came after 10.14 (e.g. derbyshared), resulting in a mixed version build. Personally, I think Spring Boot should just allow the developer to use a later Derby version and they will realize their mistake when they run into problems with Java 8. This is a well-meaning guard rail that doesn't help. It's also an easy fix to remove them all.