Repository navigation
Pin Spring Framework via spring-framework-bom so -Dspring.version works with Maven 3.10+ - #1304
Merged
EarthChen merged 2 commits intoOct 14, 2026
Conversation
…ks with Maven 3.10+
The configcenter-externalconfiguration scenario timed out (600s) on the
JDK 21 CI matrix since 2026-10-09: the provider AnnotationProvider dies
at startup with InaccessibleObjectException because Spring 4.3 cglib
cannot define classes on JDK 16+.
spring-boot-dependencies 1.5.22 manages Spring Framework 4.3.25.RELEASE
via its own ${spring.version} property. Under Maven 3.9.x the CI's
-Dspring.version=5.3.24 leaked into the remote BOM interpolation and
accidentally upgraded Spring to 5.3.24. Maven 3.10.0 (shipped in the
updated ubuntu-22.04 runner image) restricts interpolation of remotely
resolved models, so the override stopped working and 4.3.25 came back.
Import spring-framework-bom:${spring.version} before
spring-boot-dependencies and declare a local spring.version property
(default 5.3.24). Local-POM interpolation honours user properties on
every Maven version, making the -Dspring.version override deterministic.
Verified with Maven 3.10.0 (same as CI):
- before: spring-core 4.3.25.RELEASE even with -Dspring.version=5.3.24
- after: spring-core/spring-jcl 5.3.24 with and without -D
dubbo-samples-rest imports spring-boot-dependencies 1.5.22, which manages Spring Framework 4.3.25.RELEASE. Under Maven 3.10 the CI's -Dspring.version=5.3.24 no longer reaches that remote BOM, so Spring 4.3 returns. Spring 4.3 pulls commons-logging 1.3.4 (managed by dubbo-dependencies-bom), whose Log4jApiLogFactory calls LoggerContextFactory.isClassLoaderDependent(), absent in log4j-api 2.7. RestProvider then dies with NoSuchMethodError and the scenario times out. Import spring-framework-bom first with a local spring.version property so the override is deterministic, as done for configcenter-externalconfiguration. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two samples import
spring-boot-dependencies:1.5.22, which manages Spring Framework at4.3.25.RELEASE. CI passes-Dspring.version=5.3.24. Maven 3.10.0 restricts interpolation of remotely resolved models (release notes — Security Hardening), so the-Dno longer reaches the BOM and Spring 4.3 comes back. Theubuntu-22.04runner image upgraded Maven (20260828.587 → 20261002.596). Both samples now pin Spring locally.Spring 4.3 breaks each sample differently:
flowchart LR A["-Dspring.version=5.3.24<br/>ignored on Maven 3.10"] --> B["spring-core 4.3.25"] B --> C["externalconfiguration:<br/>cglib on JDK 16+<br/>InaccessibleObjectException"] B --> D["rest:<br/>commons-logging 1.3.4 + log4j-api 2.7<br/>NoSuchMethodError"]Evidence
Before (externalconfiguration): times out (600s) on the Dubbo CI Java 21 matrix (apache/dubbo run 38043764351):
After:
mvn dependency:tree -Dspring.version=5.3.24(Maven 3.10.0) resolvesspring-core:5.3.24andspring-jcl:5.3.24. This is the combination that ran green before the image update (run 35845285402, passed in 28s).Before (rest):
Job5fails on all four JDKs (8, 11, 17, 21) in run 38389549733.RestProviderdies at startup, the container stays unhealthy, and the scenario times out:Local
mvn dependency:tree -Dspring.version=5.3.24 -Ddubbo.version=3.2.20on Maven 3.10.0 resolvedspring-core:4.3.25.RELEASEpluscommons-logging:1.3.4.commons-logging1.3.4 shipsLog4jApiLogFactory, which needs a newerlog4j-apithan the 2.7 on the classpath.After: same command on this branch resolves
spring-core:5.3.24andspring-jcl:5.3.24, with nocommons-loggingon the classpath.Also verified on both modules: without
-Dthe default5.3.24applies, and-Dspring.version=6.1.5(externalconfiguration) or-Dspring.version=4.3.25.RELEASE(rest) still override. Spring Boot stays at1.5.22.RELEASE.CI on this PR:
configcenter-externalconfigurationpasses on Java 8, 11, 17 and 21. Therestresult on the new commit is the end-to-end confirmation.Merge Danger
Door: two-way
Two POM changes to two sample modules. No library or workflow code is touched, and either change reverts cleanly.
Blast Radius: two samples
Both modules'
case-versions.confalready declarespring.version=4.*, 5.*, so the CI matrix contract is unchanged. A scan of every module with aspring.versionentry found no other sample on Spring Boot 1.x without a Spring pin.restallowsspring.version=4.*in its matrix. If CI ever runs a 4.x version,commons-logging 1.3.4andlog4j-api 2.7break again. This PR does not address that; CI runs only 5.3.24 today.🤖 Generated with Claude Code