Remove the orphaned Spring Retry version pin
io.moderne.java.spring.boot4.RemoveSpringRetryVersionPinArtifactio.moderne.recipe:rewrite-springThe Spring Boot 4.0 upgrade pins an explicit spring-retry version up front (a spring-retry.version property backing <version>${spring-retry.version}</version>, plus a <dependencyManagement> entry added by AddManagedDependency) so the project stays resolvable once Spring Boot 4.0 stops managing spring-retry. When usage is fully migrated to Spring resilience and the dependency is removed, that pin is left orphaned (customer-requests#2615). Remove it, but only where spring-retry is no longer a direct dependency, so a partially-migrated module that still declares spring-retry (e.g. a remaining @Recover) keeps its pin.
Add to your build
~/.gradle/gradle.properties
codeGenomeUsername=you@example.com
codeGenomeToken=YOUR_DOWNLOAD_TOKEN
build.gradle.kts
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}
rewrite {
activeRecipe("io.moderne.java.spring.boot4.RemoveSpringRetryVersionPin")
}
repositories {
mavenCentral()
maven {
url = uri("https://artifacts.codegenomeproject.org/maven")
credentials {
username = providers.gradleProperty("codeGenomeUsername").get()
password = providers.gradleProperty("codeGenomeToken").get()
}
}
}
dependencies {
rewrite("io.moderne.recipe:rewrite-spring:0.42.0")
}
Then run
./gradlew rewriteRunUsage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe io.moderne.java.spring.boot4.RemoveSpringRetryVersionPinIf the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-spring:RELEASEDefinition
This recipe runs the following recipes in order.
- Remove Maven project property
spring-retry.versionorg.openrewrite.maven.RemoveProperty - Remove Maven managed dependency
org.springframework.retry:spring-retryorg.openrewrite.maven.RemoveManagedDependency
Data tables
Structured output this recipe can produce.
- Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats