Conversation
…plugin is present When the io.spring.dependency-management plugin manages versions via BOM, the Spring Boot 4.0 migration recipe should not pin explicit versions on renamed starters. Previously, ChangeDependency calls for renamed starters (e.g., spring-boot-starter-web → spring-boot-starter-webmvc) always specified newVersion: 4.0.x, causing version pinning even when the BOM manages the version. Add a RenameDeprecatedStartersManagedVersions declarative recipe with a ModuleHasPlugin precondition that renames starters without adding versions. The existing ChangeDependency calls with newVersion serve as fallback for modules without the plugin (they are no-ops when the managed variant already renamed the artifact). Fixes moderneinc/customer-requests#1939
Run tests through the full migration recipe instead of testing individual sub-recipes in isolation. This proves the end-to-end behavior: starters are renamed without version when the dependency-management plugin is present, and with version when it is absent.
timtebeek
approved these changes
Mar 2, 2026
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
RenameDeprecatedStartersManagedVersionsdeclarative recipe withModuleHasPluginpreconditionio.spring.dependency-managementplugin is present, renamed starters get no explicit versionChangeDependencycalls withnewVersion: 4.0.xserve as fallback for modules without the pluginProblem
When the Spring Boot 4.0 migration recipe renames deprecated starters (e.g.,
spring-boot-starter-web→spring-boot-starter-webmvc), it pins explicit versions like4.0.3even when theio.spring.dependency-managementplugin manages versions via BOM. The dependency should remain version-less since the BOM controls the version.Solution
A new wrapper declarative recipe
RenameDeprecatedStartersManagedVersionsruns first with aModuleHasPlugin(pluginId: io.spring.dependency-management)precondition. It performs the same starter renames but without specifyingnewVersion. The existingChangeDependencycalls (withnewVersion: 4.0.x) follow as fallback — on modules where the managed variant already renamed the artifact, theoldArtifactIdno longer matches, so they are no-ops.Test plan
New test:
renameStarterWithoutVersionWhenDepMgmtPluginPresent— verifies starters are renamed without version when plugin is presentNew test:
renameStarterWithVersionWhenDepMgmtPluginAbsent— verifies starters get explicit version when plugin is absentExisting boot4 tests pass
LoadRecipeTest passes (YAML validation)
Fixes moderneinc/customer-requests#1939