Skip to content

Commit 7537ec9

Browse files
committed
Force slf4j bridges to 2.x in ActuatorMetricsSpringBoot4
The ai.smoke-test convention forces log4j-over-slf4j, jcl-over-slf4j, and jul-to-slf4j to 1.7.36. Spring Boot 4 can transitively pull these bridges, leaving them binary-incompatible with the slf4j-api 2.0.17 this module already forces. Re-force the bridges to 2.0.17 to match.
1 parent 500f934 commit 7537ec9

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

smoke-tests/apps/ActuatorMetricsSpringBoot4/build.gradle.kts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ plugins {
66
}
77

88
// The ai.smoke-test convention plugin applies `resolutionStrategy.force` on every
9-
// configuration to pin logback-classic to 1.2.12 and slf4j-api to 1.7.36 (needed by the
10-
// older Spring Boot smoke-test apps). Spring Boot 4 requires logback 1.5.x and slf4j 2.x
9+
// configuration to pin logback-classic to 1.2.12 and the slf4j bridges (slf4j-api,
10+
// log4j-over-slf4j, jcl-over-slf4j, jul-to-slf4j) to 1.7.36 (needed by the older
11+
// Spring Boot smoke-test apps). Spring Boot 4 requires logback 1.5.x and slf4j 2.x
1112
// and fails at startup with AbstractMethodError against SB4's RootLogLevelConfigurator
12-
// otherwise. Re-force the newer versions here to override the convention's force.
13+
// otherwise. Re-force the newer versions here to override the convention's force,
14+
// including all slf4j bridges so they stay binary-compatible with slf4j-api 2.x.
1315
configurations.configureEach {
1416
resolutionStrategy.force(
1517
"ch.qos.logback:logback-classic:1.5.21",
1618
"ch.qos.logback:logback-core:1.5.21",
17-
"org.slf4j:slf4j-api:2.0.17"
19+
"org.slf4j:slf4j-api:2.0.17",
20+
"org.slf4j:log4j-over-slf4j:2.0.17",
21+
"org.slf4j:jcl-over-slf4j:2.0.17",
22+
"org.slf4j:jul-to-slf4j:2.0.17"
1823
)
1924
}
2025

0 commit comments

Comments
 (0)