pom.xml, build.gradle, or
package.json).
This is useful for fleet-wide code transformations like dependency upgrades, import cleanup,
type renames, and framework migrations.
Creating an OpenRewrite shift
In the Fleetshift wizard, selectOpenRewrite as the shift type and fill in the following
fields:
Configure targets, PR template, and other settings as usual, then click Create.
Available recipes
Built-in recipes
These are available without selecting any recipe artifact. They cover the core OpenRewrite modules:core, text, java, maven, xml, yaml, json, properties, protobuf,
hcl, and toml.
Recipe artifact modules
Select these in the Recipe artifacts dropdown when you need recipes beyond the built-in set.Modules under the Moderne Source Available License (
rewrite-spring,
rewrite-static-analysis, rewrite-migrate-java,
rewrite-testing-frameworks, etc.) are not available.Finding recipes
The OpenRewrite recipe catalog is a searchable index of every available recipe. Recipe names follow the conventionorg.openrewrite.<module>.<RecipeName>.
Composite recipes like Micronaut3To4Migration bundle many individual recipes — check the
catalog page for a given recipe to see what it includes.
Using a custom rewrite.yml
Use a customrewrite.yml when you need to chain multiple recipes into a composite recipe
or pass parameters to a parameterized recipe.
com.mycompany.MyCustomRecipe in the Recipes field.
Examples
Migrate Swagger to OpenAPI annotations
Recipes field:org.openrewrite.openapi.swagger.MigrateFromSwaggerToOpenAPI
Recipe artifact: rewrite-openapi
No custom rewrite.yml needed — this recipe has no required parameters.
Upgrade Jackson 2 to 3
Recipes field:org.openrewrite.java.jackson.UpgradeJackson2_3
Recipe artifact: rewrite-jackson
No custom rewrite.yml needed.
Fleet-wide find and replace
Recipes field:com.mycompany.RenameService
No artifact needed. Add a custom rewrite.yml to pass parameters:
Upgrade a Maven dependency across repos
Recipes field:com.mycompany.UpgradeGuava
Recipe artifact: rewrite-java-dependencies
Limitations
- Only Maven, Gradle, and JavaScript/TypeScript projects are supported (auto-detected from
pom.xml,build.gradle, orpackage.json).