Skip to content

Add test for ChangeParentPom retaining managed version from grandparent#6790

Closed
timtebeek wants to merge 1 commit intomainfrom
test-change-parent-pom-spring-retry
Closed

Add test for ChangeParentPom retaining managed version from grandparent#6790
timtebeek wants to merge 1 commit intomainfrom
test-change-parent-pom-spring-retry

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented Feb 22, 2026

Context

  • In Maven add missing version to a dependency #6770 it was reported that ChangeParentPom would not add an explicit version for spring-retry when upgrading spring-boot-starter-parent from 3.5.9 to 4.0.2, since Spring Boot 4 no longer manages spring-retry.

What this PR does

Adds a test bringsDownRemovedManagedVersionFromGrandparent that verifies ChangeParentPom correctly retains managed versions even when the dependency management comes through a grandparent POM (e.g. spring-boot-starter-parentspring-boot-dependencies).

The test confirms that ChangeParentPom does correctly:

  1. Detect that spring-retry is managed by spring-boot-starter-parent:3.5.9 (via spring-boot-dependencies:3.5.9)
  2. Detect that spring-boot-starter-parent:4.0.2 no longer manages spring-retry
  3. Add spring-retry with explicit version to <dependencyManagement> in the child POM

This is a regression test complementing the existing bringsDownRemovedManagedVersion test which only covers the single-level parent case (spring-boot-dependencies directly).

@timtebeek
Copy link
Copy Markdown
Member Author

The context here is that a community user had reported an issue, but we've not yet been able to replicate it; we can keep this open for a short while to make it easier to suggest updates to the test, or otherwise close the PR again.

@timtebeek
Copy link
Copy Markdown
Member Author

No further details were received; closing this effort at least for now.

@timtebeek timtebeek closed this Mar 30, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant