Scanning Recipes
This doc contains all scanning recipes.
io.moderne.recipe:rewrite-devcenter
- io.moderne.devcenter.FindOrganizationStatistics
- Find organization statistics
- Counts lines of code per repository for organization-level statistics.
io.moderne.recipe:rewrite-hibernate
- io.moderne.hibernate.update66.RemoveTableFromInheritedEntity
- Remove table from single table inherited entity
- For Single Table Inherited Entities Hibernate ignores the
@Tableannotation on child entities. From Version 6.6 it is considered an error.
io.moderne.recipe:rewrite-java-application-server
- io.moderne.java.server.jboss.ModuleHasJBossDescriptor
- Module has JBoss descriptor
- Searches for modules containing JBoss descriptor files (
jboss-web.xml,jboss-deployment-structure.xml). Places aSearchResultmarker on all source files within a module with a JBoss descriptor. This recipe is intended to be used as a precondition for other recipes.
- io.moderne.java.server.jboss.jetty.CreateJettyEnvXml
- Create Jetty environment XML
- Creates a
jetty-env.xmlfile for projects containing JBoss descriptor files.
- io.moderne.java.server.jboss.jetty.CreateJettySourceFile
- Create Jetty server source file
- Creates a
JettyServer.javasource file for projects containing JBoss descriptor files.
- io.moderne.java.server.jboss.jetty.devcenter.JBossToJettyMigrationCard$Scanner
- JBoss to Jetty migration scanner
- Scans for JBoss and Jetty configuration files.
io.moderne.recipe:rewrite-prethink
- io.moderne.prethink.ComprehendCode
- Comprehend code with AI
- Use an LLM to generate descriptions for classes and methods in the codebase. Descriptions are cached based on source code checksums to avoid regenerating descriptions for unchanged code.
- io.moderne.prethink.ComprehendCodeTokenCounter
- Estimate comprehension token usage
- Estimate the input token counts that would be sent to an LLM for method comprehension, without actually calling a model. Uses OpenAI's tokenizer locally. Outputs to the MethodDescriptions table with blank descriptions.
- io.moderne.prethink.FindTestCoverage
- Find test coverage mapping
- Map test methods to their corresponding implementation methods. Uses JavaType.Method matching to determine coverage relationships. Optionally generates AI summaries of what each test is verifying when LLM provider is configured.
- io.moderne.prethink.calm.FindCalmRelationships
- Find CALM relationships
- Discover method call relationships within the repository for building interaction diagrams. Captures all method-to-method calls between in-repo classes. Entity IDs are resolved by GenerateCalmArchitecture when building CALM relationships.
- io.moderne.prethink.calm.GenerateCalmMermaidDiagram
- Generate architecture mermaid diagram
- Generate a markdown file with a mermaid architecture diagram from discovered service endpoints, database connections, external service calls, and messaging connections.
io.moderne.recipe:rewrite-program-analysis
- org.openrewrite.analysis.java.datalineage.TrackDataLineage
- Track data lineage
- Tracks the flow of data from database sources (JDBC queries, JPA entities) to API sinks (REST endpoints, GraphQL mutations) to understand data dependencies and support compliance requirements.
- org.openrewrite.analysis.java.privacy.FindPiiExposure
- Find PII exposure in logs and external APIs
- Detects when Personally Identifiable Information (PII) is exposed through logging statements or sent to external APIs without proper sanitization. This helps prevent data leaks and ensures compliance with privacy regulations like GDPR and CCPA.
- org.openrewrite.analysis.java.security.FindCommandInjection
- Find command injection vulnerabilities
- Detects when user-controlled input flows into system command execution methods like Runtime.exec() or ProcessBuilder, which could allow attackers to execute arbitrary commands.
- org.openrewrite.analysis.java.security.FindLdapInjection
- Find LDAP injection vulnerabilities
- Finds LDAP injection vulnerabilities by tracking tainted data flow from user input to LDAP queries.
- org.openrewrite.analysis.java.security.FindPathTraversal
- Find path traversal vulnerabilities
- Detects potential path traversal vulnerabilities where user input flows to file system operations without proper validation.
- org.openrewrite.analysis.java.security.FindSqlInjection
- Find SQL injection vulnerabilities
- Detects potential SQL injection vulnerabilities where user input flows to SQL execution methods without proper sanitization.
- org.openrewrite.analysis.java.security.FindUnencryptedPiiStorage
- Find unencrypted PII storage
- Identifies when personally identifiable information (PII) is stored in databases, files, or other persistent storage without encryption.
- org.openrewrite.analysis.java.security.FindXssVulnerability
- Find XSS vulnerabilities
- Detects potential cross-site scripting vulnerabilities where user input flows to output methods without proper sanitization.
- org.openrewrite.analysis.java.security.FindXxeVulnerability
- Find XXE vulnerabilities
- Locates XML parsers that are not configured to prevent XML External Entity (XXE) attacks.
io.moderne.recipe:rewrite-spring
- io.moderne.java.spring.boot.AddSpringBootApplication
- Add
@SpringBootApplicationclass - Adds a
@SpringBootApplicationclass containing a main method to bootify your Spring Framework application.
- Add
- io.moderne.java.spring.boot.IsLikelyNotSpringBoot
- Is likely not a Spring Boot project
- Marks the project if it's likely not a Spring Boot project.
- io.moderne.java.spring.boot.IsLikelySpringBoot
- Is likely a Spring Boot project
- Marks the project if it's likely a Spring Boot project.
- io.moderne.java.spring.boot.MigrateSpringFrameworkDependenciesToSpringBoot
- Migrate Spring Framework dependencies to Spring Boot
- Migrate Spring Framework dependencies to Spring Boot.
- io.moderne.java.spring.framework.IsLikelySpringFramework
- Is likely a Spring Framework project
- Marks the project if it's likely a Spring Framework project.
- io.moderne.java.spring.framework.MigrateTrailingSlashMatch
- Migrate trailing slash matching to explicit routes
- Migrates deprecated
setUseTrailingSlashMatch()configuration removed in Spring Framework 7.0. Only adds explicit trailing slash routes when the project previously enabled trailing slash matching viasetUseTrailingSlashMatch(true). The deprecated configuration calls are always removed.
- io.moderne.java.spring.framework.beansxml.BeansXmlToConfiguration
- Migrate
beans.xmlto Spring Framework configuration class - Converts Java/Jakarta EE
beans.xmlconfiguration files to Spring Framework@Configurationclasses.
- Migrate
- io.moderne.java.spring.framework.webxml.FindWelcomeFileConfiguration
- Add landing page controller for welcome file configuration
- Generates a
LandingPageControllerwhenwelcome-file-listis found inweb.xmlorcontext-rootinjboss-web.xml. When migrating to Spring Framework 5.3+, applications that rely on these server-side landing page configurations need a@Controllerwith a@RequestMappingfor/to avoid 404 errors, as Spring MVC can take over the root mapping. Skips generation if a controller already maps to/.
- io.moderne.java.spring.framework.webxml.WebXmlToWebApplicationInitializer
- Migrate
web.xmltoWebApplicationInitializer - Migrate
web.xmltoWebApplicationInitializerfor Spring applications. This allows for programmatic configuration of the web application context, replacing the need for XML-based configuration. This recipe only picks upweb.xmlfiles located in thesrc/main/webapp/WEB-INFdirectory to avoid inference with tests. It creates aWebXmlWebAppInitializerclass insrc/main/javawith respect to submodules if they contain java files. If it finds an existingWebXmlWebAppInitializer, it skips the creation.
- Migrate
- io.moderne.java.spring.kafka.consumer.IsKafkaConsumer
- Is likely a Kafka consumer module
- Marks the project if it's likely a Kafka consumer module.
- io.moderne.java.spring.kafka.producer.IsKafkaProducer
- Is likely a Kafka producer module
- Marks the project if it's likely a Kafka producer module.
io.moderne.recipe:rewrite-vulncheck
- io.moderne.vulncheck.FixVulnCheckVulnerabilities
- Use VulnCheck Exploit Intelligence to fix vulnerabilities
- This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the
maximumUpgradeDeltaoption. Vulnerability information comes from VulnCheck Vulnerability Intelligence. The recipe has an option to limit fixes to only those vulnerabilities that have evidence of exploitation at various levels of severity.
org.openrewrite.meta:rewrite-analysis
- org.openrewrite.analysis.search.FindFlowBetweenMethods
- Finds flow between two methods
- Takes two patterns for the start/end methods to find flow between.
org.openrewrite.recipe:rewrite-ai-search
- io.moderne.ai.research.FindCodeThatResembles
- Find method invocations that resemble a pattern
- This recipe uses two phase AI approach to find a method invocation that resembles a search string.
- io.moderne.ai.research.GetRecommendations
- Get recommendations
- This recipe calls an AI model to get recommendations for modernizing the code base by looking at a sample of method declarations.
org.openrewrite.recipe:rewrite-all
- org.openrewrite.FindDuplicateSourceFiles
- Find duplicate source files
- Record the presence of LSTs with duplicate paths, indicating that the same file was parsed more than once.
- org.openrewrite.LanguageComposition
- Language composition report
- Counts the number of lines of the various kinds of source code and data formats parsed by OpenRewrite. Comments are not included in line counts. This recipe emits its results as two data tables, making no changes to any source file. One data table is per-file, the other is per-repository.
org.openrewrite.recipe:rewrite-codemods
- org.openrewrite.codemods.ApplyCodemod
- Applies a codemod to all source files
- Applies a codemod represented by an NPM package to all source files.
- org.openrewrite.codemods.Biome
- Biome recommendations
- Run Biome recommended settings on your projects.
- org.openrewrite.codemods.ESLint
- Lint source code with ESLint
- Run ESLint across the code to fix common static analysis issues in the code. This requires the code to have an existing ESLint configuration.
- org.openrewrite.codemods.Putout
- Run Putout
- Run Putout on your projects.
- org.openrewrite.codemods.ReactI18Next
- React i18next internationalization
- Automatically internationalizes React applications by extracting hardcoded strings and replacing them with react-i18next translation calls. Handles JSX text, attributes, and template literals with variables. Creates and updates a translation JSON file with extracted strings.
- org.openrewrite.codemods.UI5
- Lint UI5 projects with UI5 linter
- Runs the UI5 Linter, a static code analysis tool for UI5 projects. It checks JavaScript, TypeScript, XML, JSON, and other files in your project and reports findings.
org.openrewrite.recipe:rewrite-codemods-ng
- org.openrewrite.codemods.migrate.angular.ApplyAngularCLI
- Upgrade Angular versions
- Run
ng updateto upgrade Angular CLI and Angular Core to the specified version.
org.openrewrite.recipe:rewrite-concourse
- org.openrewrite.concourse.ChangeValue
- Change Concourse value
- Change every value matching the key pattern.
org.openrewrite.recipe:rewrite-dotnet
- org.openrewrite.dotnet.UpgradeAssistant
- Upgrade a .NET project using upgrade-assistant
- Run upgrade-assistant upgrade across a repository to upgrade projects to a newer version of .NET.
- org.openrewrite.dotnet.UpgradeAssistantAnalyze
- Analyze a .NET project using upgrade-assistant
- Run upgrade-assistant analyze across a repository to analyze changes required to upgrade projects to a newer version of .NET. This recipe will generate an
org.openrewrite.dotnet.UpgradeAssistantAnalysisdata table containing the report details.
org.openrewrite.recipe:rewrite-jackson
- org.openrewrite.java.jackson.LombokJacksonizedConfig
- Update
lombok.configfor Jackson 3 compatibility - When
@Jacksonizedis used, Lombok generates Jackson annotations. By default it generates Jackson 2.x annotations. This recipe addslombok.jacksonized.jacksonVersion = 3tolombok.configso Lombok generates Jackson 3 compatible annotations.
- Update
org.openrewrite.recipe:rewrite-java-dependencies
- org.openrewrite.java.dependencies.AddDependency
- Add Gradle or Maven dependency
- For a Gradle project, add a gradle dependency to a
build.gradlefile in the correct configuration based on where it is used. Or For a maven project, Add a Maven dependency to apom.xmlfile in the correct scope based on where it is used.
- org.openrewrite.java.dependencies.ChangeDependency
- Change Gradle or Maven dependency
- Change the group ID, artifact ID, and/or the version of a specified Gradle or Maven dependency.
- org.openrewrite.java.dependencies.DependencyResolutionDiagnostic
- Dependency resolution diagnostic
- Recipes which manipulate dependencies must be able to successfully access the artifact repositories and resolve dependencies from them. This recipe produces two data tables used to understand the state of dependency resolution. The Repository accessibility report lists all the artifact repositories known to the project and whether respond to network access. The network access is attempted while the recipe is run and so is representative of current conditions. The Gradle dependency configuration errors lists all the dependency configurations that failed to resolve one or more dependencies when the project was parsed. This is representative of conditions at the time the LST was parsed.
- org.openrewrite.java.dependencies.RelocatedDependencyCheck
- Find relocated dependencies
- Find Maven and Gradle dependencies and Maven plugins that have relocated to a new
groupIdorartifactId. Relocation information comes from the oga-maven-plugin maintained by Jonathan Lermitage, Filipe Roque and others. This recipe makes no changes to any source file by default. AddchangeDependencies=trueto change dependencies, but note that you might need to run additional recipes to update imports and adopt other breaking changes.
- org.openrewrite.java.dependencies.RemoveDependency
- Remove a Gradle or Maven dependency
- For Gradle project, removes a single dependency from the dependencies section of the
build.gradle. For Maven project, removes a single dependency from the<dependencies>section of the pom.xml.
- org.openrewrite.java.dependencies.RemoveRedundantDependencies
- Remove redundant explicit dependencies
- Remove explicit dependencies that are already provided transitively by a specified dependency. This recipe downloads and resolves the parent dependency's POM to determine its true transitive dependencies, allowing it to detect redundancies even when both dependencies are explicitly declared.
- org.openrewrite.java.dependencies.UpgradeDependencyVersion
- Upgrade Gradle or Maven dependency versions
- For Gradle projects, upgrade the version of a dependency in a
build.gradlefile. Supports updating dependency declarations of various forms: *Stringnotation:"group:artifact:version"*Mapnotation:group: 'group', name: 'artifact', version: 'version'It is possible to update version numbers which are defined earlier in the same file in variable declarations. For Maven projects, upgrade the version of a dependency by specifying a group ID and (optionally) an artifact ID using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.
- org.openrewrite.java.dependencies.UpgradeTransitiveDependencyVersion
- Upgrade transitive Gradle or Maven dependencies
- Upgrades the version of a transitive dependency in a Maven pom.xml or Gradle build.gradle. Leaves direct dependencies unmodified. Can be paired with the regular Upgrade Dependency Version recipe to upgrade a dependency everywhere, regardless of whether it is direct or transitive.
- org.openrewrite.java.dependencies.search.FindDuplicateClasses
- Find duplicate classes on the classpath
- Detects classes that appear in multiple dependencies on the classpath. This is similar to what the Maven duplicate-finder-maven-plugin does. Duplicate classes can cause runtime issues when different versions of the same class are loaded.
- org.openrewrite.java.dependencies.search.FindMinimumDependencyVersion
- Find the oldest matching dependency version in use
- The oldest dependency version in use is the lowest dependency version in use in any source set of any subproject of a repository. It is possible that, for example, the main source set of a project uses Jackson 2.11, but a test source set uses Jackson 2.16. In this case, the oldest Jackson version in use is Java 2.11.
- org.openrewrite.java.dependencies.search.FindMinimumJUnitVersion
- Find minimum JUnit version
- A recipe to find the minimum version of JUnit dependencies. This recipe is designed to return the minimum version of JUnit in a project. It will search for JUnit 4 and JUnit 5 dependencies in the project. If both versions are found, it will return the minimum version of JUnit 4. If a minimumVersion is provided, the recipe will search to see if the minimum version of JUnit used by the project is no lower than the minimumVersion. For example: if the minimumVersion is 4, and the project has JUnit 4.12 and JUnit 5.7, the recipe will return JUnit 4.12. If the project has only JUnit 5.7, the recipe will return JUnit 5.7. Another example: if the minimumVersion is 5, and the project has JUnit 4.12 and JUnit 5.7, the recipe will not return any results.
- org.openrewrite.java.dependencies.search.ModuleHasDependency
- Module has dependency
- Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a
SearchResultmarker on all sources within a module with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) or pom.xml file applying the plugin, use theFindDependencyrecipe instead.
- org.openrewrite.java.dependencies.search.RepositoryHasDependency
- Repository has dependency
- Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a
SearchResultmarker on all sources within a repository with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use a springframework dependency, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) or pom.xml file applying the plugin, use theFindDependencyrecipe instead.
org.openrewrite.recipe:rewrite-java-security
- org.openrewrite.csharp.dependencies.DependencyVulnerabilityCheck
- Find and fix vulnerable Nuget dependencies
- This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.
- org.openrewrite.java.dependencies.AddExplicitTransitiveDependencies
- Add explicit transitive dependencies
- Detects when Java source code or configuration files reference types from transitive Maven dependencies and promotes those transitive dependencies to explicit direct dependencies in the pom.xml. This ensures the build is resilient against changes in transitive dependency trees of upstream libraries.
- org.openrewrite.java.dependencies.DependencyLicenseCheck
- Find licenses in use in third-party dependencies
- Locates and reports on all licenses in use.
- org.openrewrite.java.dependencies.DependencyVulnerabilityCheck
- Find and fix vulnerable dependencies
- This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the
maximumUpgradeDeltaoption. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Upgrades dependencies versioned according to Semantic Versioning. ## Customizing Vulnerability Data This recipe can be customized by extendingDependencyVulnerabilityCheckBaseand overriding the vulnerability data sources: -baselineVulnerabilities(ExecutionContext ctx): Provides the default set of known vulnerabilities. The base implementation loads vulnerability data from the GitHub Security Advisory Database CSV file usingResourceUtils.parseResourceAsCsv(). Override this method to replace the entire vulnerability dataset with your own curated list. -supplementalVulnerabilities(ExecutionContext ctx): Allows adding custom vulnerability data beyond the baseline. The base implementation returns an empty list. Override this method to add organization-specific vulnerabilities, internal security advisories, or vulnerabilities from additional sources while retaining the baseline GitHub Advisory Database. Both methods returnList<Vulnerability>objects. Vulnerability data can be loaded from CSV files usingResourceUtils.parseResourceAsCsv(path, Vulnerability.class, consumer)or constructed programmatically. To customize, extendDependencyVulnerabilityCheckBaseand override one or both methods depending on your needs. For example, overridesupplementalVulnerabilities()to add custom CVEs while keeping the standard vulnerability database, or overridebaselineVulnerabilities()to use an entirely different vulnerability data source. Last updated: 2026-03-12T0841.
- org.openrewrite.java.dependencies.RemoveUnusedDependencies
- Remove unused dependencies
- Scans through source code collecting references to types and methods, removing any dependencies that are not used from Maven or Gradle build files. This is best effort and not guaranteed to work well in all cases; false positives are still possible. This recipe takes reflective access into account: - When reflective access to a class is made unambiguously via a string literal, such as:
Class.forName("java.util.List")that is counted correctly. - When reflective access to a class is made ambiguously via anything other than a string literal no dependencies will be removed. This recipe takes transitive dependencies into account: - When a direct dependency is not used but a transitive dependency it brings in is in use the direct dependency is not removed.
- org.openrewrite.java.dependencies.SoftwareBillOfMaterials
- Software bill of materials
- Produces a software bill of materials (SBOM) for a project. An SBOM is a complete list of all dependencies used in a project, including transitive dependencies. The produced SBOM is in the CycloneDX XML format. Supports Gradle and Maven. Places a file named sbom.xml adjacent to the Gradle or Maven build file.
- org.openrewrite.java.security.XmlParserXXEVulnerability
- XML parser XXE vulnerability
- Avoid exposing dangerous features of the XML parser by updating certain factory settings.
- org.openrewrite.java.security.spring.CsrfProtection
- Enable CSRF attack prevention
- Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user's web browser to perform an unwanted action on a trusted site when the user is authenticated. See the full OWASP cheatsheet.
- org.openrewrite.java.security.spring.PreventClickjacking
- Prevent clickjacking
- The
frame-ancestorsdirective can be used in a Content-Security-Policy HTTP response header to indicate whether or not a browser should be allowed to render a page in a<frame>or<iframe>. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites.
- org.openrewrite.python.dependencies.DependencyVulnerabilityCheck
- Find and fix vulnerable PyPI dependencies
- This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe by default only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this can be controlled using the
maximumUpgradeDeltaoption. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.
org.openrewrite.recipe:rewrite-jenkins
- org.openrewrite.jenkins.CreateIndexJelly
- Create
index.jellyif it doesn't exist - Jenkins tooling requires
src/main/resources/index.jellyexists with a description.
- Create
- org.openrewrite.jenkins.UpgradeJavaVersion
- Upgrade jenkins java version
- Upgrades the version of java specified in Jenkins groovy scripts. Will not downgrade if the version is newer than the specified version.
- org.openrewrite.jenkins.github.AddTeamToCodeowners
- Add plugin developer team to CODEOWNERS
- Adds the
\{artifactId\}-plugin-developersteam to all files in.github/CODEOWNERSif absent.
org.openrewrite.recipe:rewrite-liberty
- org.openrewrite.java.liberty.RemoveWas2LibertyNonPortableJndiLookup
- Removes invalid JNDI properties
- Remove the use of invalid JNDI properties from Hashtable.
org.openrewrite.recipe:rewrite-micronaut
- org.openrewrite.java.micronaut.AddAnnotationProcessorPath
- Add Maven annotation processor path
- Add the groupId, artifactId, version, and exclusions of a Maven annotation processor path.
- org.openrewrite.java.micronaut.AddSnakeYamlDependencyIfNeeded
- Add
snakeyamldependency if needed - This recipe will add the
snakeyamldependency to a Micronaut 4 application that uses yaml configuration.
- Add
- org.openrewrite.java.micronaut.CopyNonInheritedAnnotations
- Copy non-inherited annotations from super class
- As of Micronaut 3.x only annotations that are explicitly meta-annotated with
@Inheritedare inherited from parent classes and interfaces.
- org.openrewrite.java.micronaut.TypeRequiresIntrospection
- Add
@Introspectedto classes requiring a map representation - In Micronaut 2.x a reflection-based strategy was used to retrieve that information if the class was not annotated with
@Introspected. As of Micronaut 3.x it is required to annotate classes with@Introspectedthat are used in this way.
- Add
org.openrewrite.recipe:rewrite-migrate-java
- org.openrewrite.java.migrate.AddStaticVariableOnProducerSessionBean
- Adds
staticmodifier to@Producesfields that are in session beans - Ensures that the fields annotated with
@Produceswhich is inside the session bean (@Stateless,@Stateful, or@Singleton) are declaredstatic.
- Adds
- org.openrewrite.java.migrate.jakarta.HasNoJakartaAnnotations
- Project has no Jakarta annotations
- Mark all source as found per
JavaProjectwhere no Jakarta annotations are found. This is useful mostly as a precondition for recipes that require Jakarta annotations to be present.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddScopeToInjectedClass
- Add scope annotation to injected classes
- Finds member variables annotated with
@Inject' and applies@Dependent` scope annotation to the variable's type.
- org.openrewrite.java.migrate.javax.AddTransientAnnotationToEntity
- Unannotated entity attributes require a Transient annotation
- In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the
javax.persistence.Transientannotation to these attributes in EclipseLink.
- org.openrewrite.java.migrate.javax.RemoveEmbeddableId
@Embeddableclasses cannot have an@Idannotation when referenced by an@EmbeddedIdannotation- According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an
@EmbeddedIdannotation, the embeddable class cannot contain an attribute with an@Idannotation. If both the@EmbeddedIdannotation and the@Idannotation are defined, OpenJPA ignores the@Idannotation, whereas EclipseLink throws an exception.
- org.openrewrite.java.migrate.lombok.AdoptLombokGetterMethodNames
- Rename getter methods to fit Lombok
- Rename methods that are effectively getter to the name Lombok would give them. Limitations: - If two methods in a class are effectively the same getter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g.
int getFoo() \{ return ba; \} int getBa() \{ return foo; \}stays as it is.
- org.openrewrite.java.migrate.lombok.AdoptLombokSetterMethodNames
- Rename setter methods to fit Lombok
- Rename methods that are effectively setter to the name Lombok would give them. Limitations: - If two methods in a class are effectively the same setter then one's name will be corrected and the others name will be left as it is. - If the correct name for a method is already taken by another method then the name will not be corrected. - Method name swaps or circular renaming within a class cannot be performed because the names block each other. E.g.
int getFoo() \{ return ba; \} int getBa() \{ return foo; \}stays as it is.
- org.openrewrite.java.migrate.lombok.LombokValueToRecord
- Convert
@lombok.Valueclass to Record - Convert Lombok
@Valueannotated classes to standard Java Records.
- Convert
- org.openrewrite.java.migrate.search.PlanJavaMigration
- Plan a Java version migration
- Study the set of Java versions and associated tools in use across many repositories.
org.openrewrite.recipe:rewrite-migrate-python
- org.openrewrite.python.migrate.MigrateToPyprojectToml
- Migrate to
pyproject.toml - Migrate Python projects from
requirements.txtand/orsetup.cfgtopyproject.tomlwithhatchlingbuild backend.
- Migrate to
org.openrewrite.recipe:rewrite-nodejs
- org.openrewrite.nodejs.DependencyVulnerabilityCheck
- Find and fix vulnerable npm dependencies
- This software composition analysis (SCA) tool detects and upgrades dependencies with publicly disclosed vulnerabilities. This recipe both generates a report of vulnerable dependencies and upgrades to newer versions with fixes. This recipe only upgrades to the latest patch version. If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. Vulnerability information comes from the GitHub Security Advisory Database, which aggregates vulnerability data from several public databases, including the National Vulnerability Database maintained by the United States government. Dependencies following Semantic Versioning will see their patch version updated where applicable.
- org.openrewrite.nodejs.search.DependencyInsight
- Node.js dependency insight
- Identify the direct and transitive Node.js dependencies used in a project.
- org.openrewrite.nodejs.search.FindNodeProjects
- Find Node.js projects
- Find Node.js projects and summarize data about them.
org.openrewrite.recipe:rewrite-openapi
- org.openrewrite.openapi.swagger.ConvertApiResponseCodesToStrings
- Convert API response codes to strings
- Convert API response codes to strings. Handles literal integers, local constant references, and external constant field accesses.
org.openrewrite.recipe:rewrite-prethink
- org.openrewrite.prethink.ExportContext
- Export context files
- Export DataTables to CSV files in
.moderne/context/along with a markdown description file. The markdown file describes the context and includes schema information for each data table.
- org.openrewrite.prethink.UpdateAgentConfig
- Update agent configuration files
- Update coding agent configuration files (CLAUDE.md, .cursorrules, etc.) to include references to Moderne Prethink context files in .moderne/context/.
- org.openrewrite.prethink.calm.GenerateCalmArchitecture
- Generate CALM architecture
- Generate a FINOS CALM (Common Architecture Language Model) JSON file from discovered service endpoints, database connections, external service calls, and messaging connections.
org.openrewrite.recipe:rewrite-rewrite
- org.openrewrite.java.recipes.ExamplesExtractor
- Extract documentation examples from tests
- Extract the before/after sources from tests annotated with
@DocumentExample, and generate a YAML file with those examples to be shown in the documentation to show usage.
- org.openrewrite.java.recipes.GenerateDeprecatedMethodRecipes
- Generate
InlineMethodCallsrecipes for deprecated delegating methods - Finds
@Deprecatedmethod declarations whose body is a single delegation call to another method in the same class, and generates a declarative YAML recipe file containingInlineMethodCallsentries for each.
- Generate
org.openrewrite.recipe:rewrite-spring
- org.openrewrite.java.spring.RenameBean
- Rename bean
- Renames a Spring bean, both declaration and references.
- org.openrewrite.java.spring.SeparateApplicationPropertiesByProfile
- Separate
application.propertiesby profile - Separating
application.propertiesinto separate files based on profiles.
- Separate
- org.openrewrite.java.spring.SeparateApplicationYamlByProfile
- Separate application YAML by profile
- The Spring team's recommendation is to separate profile properties into their own YAML files now.
- org.openrewrite.java.spring.UpdateApiManifest
- Update the API manifest
- Keep a consolidated manifest of the API endpoints that this application exposes up-to-date.
- org.openrewrite.java.spring.boot2.MergeBootstrapYamlWithApplicationYaml
- Merge Spring
bootstrap.ymlwithapplication.yml - In Spring Boot 2.4, the bootstrap context that loads
bootstrap.ymlis disabled by default. Its properties should be merged withapplication.ymlunlessspring-cloud-starter-bootstrapis present as a dependency.
- Merge Spring
- org.openrewrite.java.spring.boot2.MoveAutoConfigurationToImportsFile
- Use
AutoConfiguration#imports - Use
AutoConfiguration#importsinstead of the deprecated entryEnableAutoConfigurationinspring.factorieswhen defining autoconfiguration classes.
- Use
- org.openrewrite.java.spring.boot2.search.IntegrationSchedulerPoolRecipe
- Integration scheduler pool size
- Spring Integration now reuses an available
TaskSchedulerrather than configuring its own. In a typical application setup relying on the auto-configuration, this means that Spring Integration uses the auto-configured task scheduler that has a pool size of 1. To restore Spring Integration’s default of 10 threads, use thespring.task.scheduling.pool.sizeproperty.
- org.openrewrite.java.spring.boot2.search.LoggingShutdownHooks
- Applications using logging shutdown hooks
- Spring Boot registers a logging shutdown hook by default for JAR-based applications to ensure that logging resources are released when the JVM exits. If your application is deployed as a WAR then the shutdown hook is not registered since the servlet container usually handles logging concerns. Most applications will want the shutdown hook. However, if your application has complex context hierarchies, then you may need to disable it. You can use the
logging.register-shutdown-hookproperty to do that.
- org.openrewrite.java.spring.boot3.MaintainTrailingSlashURLMappings
- Maintain trailing slash URL mappings
- This is part of Spring MVC and WebFlux URL Matching Changes, as of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to false. This means that previously, a controller
@GetMapping("/some/greeting")would match bothGET /some/greetingandGET /some/greeting/, but it doesn't matchGET /some/greeting/anymore by default and will result in an HTTP 404 error. This recipe is to maintain trailing slash in all HTTP url mappings.
- org.openrewrite.java.spring.boot3.MigrateHooksToReactorContextProperty
- Use
spring.reactor.context-propagationproperty - Replace
Hooks.enableAutomaticContextPropagation()withspring.reactor.context-propagation=auto.
- Use
- org.openrewrite.java.spring.cloud2022.AddLoggingPatternLevelForSleuth
- Add logging.pattern.level for traceId and spanId
- Add
logging.pattern.levelfor traceId and spanId which was previously set by default, if not already set.
- org.openrewrite.java.spring.doc.MigrateDocketBeanToGroupedOpenApiBean
- Migrate
DockettoGroupedOpenAPI - Migrate a
Docketbean to aGroupedOpenAPIbean preserving group name, packages and paths. When possible the recipe will prefer property based configuration.
- Migrate
- org.openrewrite.maven.spring.UpgradeExplicitSpringBootDependencies
- Upgrade Spring dependencies
- Upgrades dependencies according to the specified version of spring boot. Spring boot has many direct and transitive dependencies. When a module has an explicit dependency on one of these it may also need to be upgraded to match the version used by spring boot.
org.openrewrite.recipe:rewrite-static-analysis
- org.openrewrite.staticanalysis.LowercasePackage
- Rename packages to lowercase
- By convention all Java package names should contain only lowercase letters, numbers, and dashes. This recipe converts any uppercase letters in package names to be lowercase.
- org.openrewrite.staticanalysis.MethodNameCasing
- Standardize method name casing
- Fixes method names that do not follow standard naming conventions. For example,
String getFoo_bar()would be adjusted toString getFooBar()andint DoSomething()would be adjusted toint doSomething().
org.openrewrite.recipe:rewrite-struts
- org.openrewrite.java.struts.migrate6.MigrateStaticOgnlMethodAccess
- Migrate static OGNL method access to action wrapper methods
- Migrates OGNL expressions using static method access (e.g.,
@com.app.Util@makeCode()) to use action wrapper methods instead. Static method access is disabled by default in Struts 6 for security reasons.
org.openrewrite.recipe:rewrite-terraform
- org.openrewrite.terraform.MoveProviderVersionToRequiredProviders
- Move provider version to
required_providers - In Terraform 0.13+, version constraints should be specified in the
terraform \{ required_providers \{ ... \} \}block instead of theproviderblock. This recipe removes theversionattribute fromproviderblocks and adds it torequired_providers.
- Move provider version to
org.openrewrite.recipe:rewrite-testing-frameworks
- org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic
- Remove
publicvisibility of JUnit 5 tests - Remove
publicand optionallyprotectedmodifiers from methods with@Test,@ParameterizedTest,@RepeatedTest,@TestFactory,@BeforeEach,@AfterEach,@BeforeAll, or@AfterAll. They no longer have to be public visibility to be usable by JUnit 5.
- Remove
- org.openrewrite.java.testing.junit5.AddHamcrestJUnitDependency
- Add Hamcrest JUnit dependency
- Add Hamcrest JUnit dependency only if JUnit 4's
assertThatorassumeThatis used.
- org.openrewrite.java.testing.junit5.AddJupiterDependencies
- Add JUnit Jupiter dependencies
- Adds JUnit Jupiter dependencies to a Maven or Gradle project. JUnit Jupiter can be added either with the artifact
junit-jupiter, or both ofjunit-jupiter-apiandjunit-jupiter-engine. This addsjunit-jupiterdependency unlessjunit-jupiter-apiorjunit-jupiter-engineare already present.
- org.openrewrite.java.testing.mockito.AnyToNullable
- Replace Mockito 1.x
anyString()/any()withnullable(Class) - Since Mockito 2.10
anyString()andany()no longer matches null values. Usenullable(Class)instead.
- Replace Mockito 1.x
- org.openrewrite.java.testing.mockito.ReplacePowerMockDependencies
- Replace PowerMock dependencies with Mockito equivalents
- Replaces PowerMock API dependencies with
mockito-inlinewhenmockStatic(),whenNew(), or@PrepareForTestusage is detected, ormockito-coreotherwise. PowerMock features like static mocking, constructor mocking, and final class mocking require the inline mock maker which is bundled inmockito-inlinefor Mockito 3.x/4.x.
- org.openrewrite.java.testing.mockito.VerifyZeroToNoMoreInteractions
- Replace
verifyZeroInteractions()withverifyNoMoreInteractions() - Replaces
verifyZeroInteractions()withverifyNoMoreInteractions()in Mockito tests when migration when using a Mockito version < 3.x.
- Replace
org.openrewrite:rewrite-core
- org.openrewrite.AddToGitignore
- Add entries to
.gitignore - Adds entries to the project's
.gitignorefile. If no.gitignorefile exists, one will be created. Existing entries that match will not be duplicated.
- Add entries to
- org.openrewrite.ExcludeFileFromGitignore
- Remove ignoral of files or directories from .gitignore
- This recipe will remove a file or directory from the .gitignore file. If the file or directory is already in the .gitignore file, it will be removed or negated. If the file or directory is not in the .gitignore file, no action will be taken.
- org.openrewrite.FindCollidingSourceFiles
- Find colliding source files
- Finds source files which share a path with another source file. There should always be exactly one source file per path within a repository. This is a diagnostic for finding problems in OpenRewrite parsers/build plugins.
- org.openrewrite.FindGitProvenance
- Show Git source control metadata
- List out the contents of each unique
GitProvenancemarker in the set of source files. When everything is working correctly, exactly one such marker should be printed as all source files are expected to come from the same repository / branch / commit hash.
- org.openrewrite.FindLstProvenance
- Find LST provenance
- Produces a data table showing what versions of OpenRewrite/Moderne tooling was used to produce a given LST.
- org.openrewrite.ListRuntimeClasspath
- List runtime classpath
- A diagnostic utility which emits the runtime classpath to a data table.
- org.openrewrite.search.FindCommitters
- Find committers on repositories
- List the committers on a repository.
- org.openrewrite.search.RepositoryContainsFile
- Repository contains file
- Intended to be used primarily as a precondition for other recipes, this recipe checks if a repository contains a specific file or files matching a pattern. If present all files in the repository are marked with a
SearchResultmarker. If you want to get only the matching file as a search result, useFindSourceFilesinstead.
- org.openrewrite.text.AppendToTextFile
- Append to text file
- Appends or replaces content of an existing plain text file, or creates a new one if it doesn't already exist. Please note that this recipes requires existing plain text files' format to be successfully parsable by OpenRewrite. If a file is left unchanged, it might be parsed as a
Quarkrather than plain text. In such case, use theplainTextMaskoption. See the Gradle or Maven plugin configuration page.
- org.openrewrite.text.CreateTextFile
- Create text file
- Creates a new plain text file.
org.openrewrite:rewrite-gradle
- org.openrewrite.gradle.AddDependency
- Add Gradle dependency
- Add a gradle dependency to a
build.gradlefile in the correct configuration based on where it is used.
- org.openrewrite.gradle.AddPlatformDependency
- Add Gradle platform dependency
- Add a gradle platform dependency to a
build.gradlefile in the correct configuration based on where it is used.
- org.openrewrite.gradle.AddProperty
- Add Gradle property
- Add a property to the
gradle.propertiesfile.
- org.openrewrite.gradle.ChangeDependency
- Change Gradle dependency
- Change a Gradle dependency coordinates. The
newGroupIdornewArtifactIdMUST be different from before.
- org.openrewrite.gradle.MigrateDependenciesToVersionCatalog
- Migrate Gradle project dependencies to version catalog
- Migrates Gradle project dependencies to use the version catalog feature. Supports migrating dependency declarations of various forms: *
Stringnotation:"group:artifact:version"*Mapnotation:group: 'group', name: 'artifact', version: 'version'* Property references:"group:artifact:$version"or"group:artifact:$\{version\}"The recipe will: * Create agradle/libs.versions.tomlfile with version declarations * Replace dependency declarations with catalog references (e.g.,libs.springCore) * Migrate version properties fromgradle.propertiesto the version catalog * Preserve project dependencies unchanged Note: If a version catalog already exists, the recipe will not modify it.
- org.openrewrite.gradle.UpdateGradleWrapper
- Update Gradle wrapper
- Update the version of Gradle used in an existing Gradle wrapper. Queries
downloads.gradle.orgto determine the available releases, but prefers the artifact repository URL which already exists within the wrapper properties file. If your artifact repository does not contain the same Gradle distributions asdownloads.gradle.org, then the recipe may suggest a version which is not available in your artifact repository.
- org.openrewrite.gradle.UpgradeDependencyVersion
- Upgrade Gradle dependency versions
- Upgrade the version of a dependency in a build.gradle file. Supports updating dependency declarations of various forms: *
Stringnotation:"group:artifact:version"*Mapnotation:group: 'group', name: 'artifact', version: 'version'Can update version numbers which are defined earlier in the same file in variable declarations.
- org.openrewrite.gradle.UpgradeTransitiveDependencyVersion
- Upgrade transitive Gradle dependencies
- Upgrades the version of a transitive dependency in a Gradle build file. There are many ways to do this in Gradle, so the mechanism for upgrading a transitive dependency must be considered carefully depending on your style of dependency management.
- org.openrewrite.gradle.plugins.UpgradePluginVersion
- Update a Gradle plugin by id
- Update a Gradle plugin by id to a later version defined by the plugins DSL. To upgrade a plugin dependency defined by
buildscript.dependencies, use theUpgradeDependencyVersionrecipe instead.
- org.openrewrite.gradle.search.ModuleHasDependency
- Module has dependency
- Searches for Gradle Projects (modules) that have a dependency matching the specified id or implementing class. Places a
SearchResultmarker on all sources within a project with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file that use the dependency, use theFindDependencyrecipe instead.
- org.openrewrite.gradle.search.ModuleHasPlugin
- Module has plugin
- Searches for Gradle Projects (modules) that have a plugin matching the specified id or implementing class. Places a
SearchResultmarker on all sources within a project with a matching plugin. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that apply the spring dependency management plugin, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use theFindPluginsrecipe instead.
org.openrewrite:rewrite-hcl
- org.openrewrite.hcl.MoveContentToFile
- Move content to another file
- Move content to another HCL file, deleting it in the original file.
org.openrewrite:rewrite-java
- org.openrewrite.java.CreateEmptyJavaClass
- Create Java class
- Create a new, empty Java class.
- org.openrewrite.java.search.ClasspathTypeCounts
- Study the size of the classpath by source set
- Emit one data table row per source set in a project, with the number of types in the source set.
- org.openrewrite.java.search.FindDistinctMethods
- Find distinct methods in use
- A sample of every distinct method in use in a repository. The code sample in the method calls data table will be a representative use of the method, though there may be many other such uses of the method.
- org.openrewrite.java.search.FindTypeMappings
- Find type mappings
- Study the frequency of
Jtypes and theirJavaTypetype attribution.
- org.openrewrite.java.search.HasMinimumJavaVersion
- Find the oldest Java version in use
- The oldest Java version in use is the lowest Java version in use in any source set of any subproject of a repository. It is possible that, for example, the main source set of a project uses Java 8, but a test source set uses Java 17. In this case, the oldest Java version in use is Java 8.
- org.openrewrite.java.search.ModuleContainsFile
- Module contains file
- Intended to be used primarily as a precondition for other recipes, this recipe checks if a module contains a specific file or files matching a pattern. Only files belonging to modules containing the specified file are marked with a
SearchResultmarker. This is more specific thanRepositoryContainsFilewhich marks all files in the repository if any file matches.
- org.openrewrite.java.search.ModuleUsesType
- Module uses type
- Intended to be used primarily as a precondition for other recipes, this recipe checks if a module uses a specified type. Only files belonging to modules that use the specified type are marked with a
SearchResultmarker. This is more specific thanUsesTypewhich only marks the files that directly use the type.
org.openrewrite:rewrite-json
- org.openrewrite.json.CopyValue
- Copy JSON value
- Copies a JSON value from one key to another. The existing key/value pair remains unaffected by this change. Attempts to create the new key if it does not exist.
- org.openrewrite.json.CreateJsonFile
- Create JSON file
- Create a new JSON file.
org.openrewrite:rewrite-maven
- org.openrewrite.maven.AddAnnotationProcessor
- Add an annotation processor to
maven-compiler-plugin - Add an annotation processor path to the
maven-compiler-pluginconfiguration. For modules with an in-reactor parent, adds to the parent'sbuild/pluginManagement/pluginssection. For modules without a parent or with a parent outside the reactor, adds directly tobuild/plugins. Updates the annotation processor version if a newer version is specified.
- Add an annotation processor to
- org.openrewrite.maven.AddDependency
- Add Maven dependency
- Add a Maven dependency to a
pom.xmlfile in the correct scope based on where it is used.
- org.openrewrite.maven.AddDevelocityMavenExtension
- Add the Develocity Maven extension
- To integrate the Develocity Maven extension into Maven projects, ensure that the
develocity-maven-extensionis added to the.mvn/extensions.xmlfile if not already present. Additionally, configure the extension by adding the.mvn/develocity.xmlconfiguration file.
- org.openrewrite.maven.AddManagedDependency
- Add managed Maven dependency
- Add a managed Maven dependency to a
pom.xmlfile.
- org.openrewrite.maven.AddRuntimeConfig
- Add a configuration option for the Maven runtime
- Add a new configuration option for the Maven runtime if not already present.
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId
- Change Maven dependency
- Change a Maven dependency coordinates. The
newGroupIdornewArtifactIdMUST be different from before. Matching<dependencyManagement>coordinates are also updated if anewVersionorversionPatternis provided. Exclusions that reference the old dependency coordinates are preserved, and a sibling exclusion for the new coordinates is added alongside them.
- org.openrewrite.maven.ChangeParentPom
- Change Maven parent
- Change the parent pom of a Maven pom.xml by matching the existing parent via groupId and artifactId, and updating it to a new groupId, artifactId, version, and optional relativePath. Also updates the project to retain dependency management and properties previously inherited from the old parent that are no longer provided by the new parent. Removes redundant dependency versions already managed by the new parent.
- org.openrewrite.maven.IncrementProjectVersion
- Increment Maven project version
- Increase Maven project version by incrementing either the major, minor, or patch version as defined by semver. Other versioning schemes are not supported.
- org.openrewrite.maven.ManageDependencies
- Manage dependencies
- Make existing dependencies managed by moving their version to be specified in the dependencyManagement section of the POM.
- org.openrewrite.maven.RemoveUnusedProperties
- Remove unused properties
- Detect and remove Maven property declarations which do not have any usage within the project.
- org.openrewrite.maven.UpdateMavenWrapper
- Update Maven wrapper
- Update the version of Maven used in an existing Maven wrapper.
- org.openrewrite.maven.UpgradeDependencyVersion
- Upgrade Maven dependency version
- Upgrade the version of a dependency by specifying a group and (optionally) an artifact using Node Semver advanced range selectors, allowing more precise control over version updates to patch or minor releases.
- org.openrewrite.maven.UpgradeParentVersion
- Upgrade Maven parent project version
- Set the parent pom version number according to a version selector or to a specific version number.
- org.openrewrite.maven.UpgradeTransitiveDependencyVersion
- Upgrade transitive Maven dependencies
- Upgrades the version of a transitive dependency in a Maven pom file. Leaves direct dependencies unmodified. Can be paired with the regular Upgrade Dependency Version recipe to upgrade a dependency everywhere, regardless of whether it is direct or transitive.
- org.openrewrite.maven.search.ModuleHasDependency
- Module has dependency
- Searches for Maven modules that have a dependency matching the specified groupId and artifactId. Places a
SearchResultmarker on all sources within a module with a matching dependency. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that use spring-boot-starter, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use theFindDependencyrecipe instead.
- org.openrewrite.maven.search.ModuleHasPlugin
- Module has plugin
- Searches for Maven modules that have a plugin matching the specified groupId and artifactId. Places a
SearchResultmarker on all sources within a module with a matching plugin. This recipe is intended to be used as a precondition for other recipes. For example this could be used to limit the application of a spring boot migration to only projects that apply the spring boot plugin, limiting unnecessary upgrading. If the search result you want is instead just the build.gradle(.kts) file applying the plugin, use theFindPluginsrecipe instead.
org.openrewrite:rewrite-properties
- org.openrewrite.properties.CreatePropertiesFile
- Create Properties file
- Create a new Properties file.
org.openrewrite:rewrite-python
- org.openrewrite.python.AddDependency
- Add Python dependency
- Add a dependency to the
[project].dependenciesarray inpyproject.toml. Whenuvis available, theuv.lockfile is regenerated.
- org.openrewrite.python.ChangeDependency
- Change Python dependency
- Change a dependency to a different package in
pyproject.toml. Searches all dependency arrays. Whenuvis available, theuv.lockfile is regenerated.
- org.openrewrite.python.RemoveDependency
- Remove Python dependency
- Remove a dependency from the
[project].dependenciesarray inpyproject.toml. Whenuvis available, theuv.lockfile is regenerated.
- org.openrewrite.python.UpgradeDependencyVersion
- Upgrade Python dependency version
- Upgrade the version constraint for a dependency in
[project].dependenciesinpyproject.toml. Whenuvis available, theuv.lockfile is regenerated.
- org.openrewrite.python.UpgradeTransitiveDependencyVersion
- Upgrade transitive Python dependency version
- Pin a transitive dependency version using the appropriate strategy for the detected package manager: uv uses
[tool.uv].constraint-dependencies, PDM uses[tool.pdm.overrides], and other managers add a direct dependency.
org.openrewrite:rewrite-toml
- org.openrewrite.toml.CreateTomlFile
- Create TOML file
- Create a new TOML file.
org.openrewrite:rewrite-xml
- org.openrewrite.xml.CreateXmlFile
- Create XML file
- Create a new XML file.
- org.openrewrite.xml.style.AutodetectDebug
- XML style Auto-detection debug
- Runs XML Autodetect and records the results in data tables and search markers. A debugging tool for figuring out why XML documents get styled the way they do.
org.openrewrite:rewrite-yaml
- org.openrewrite.yaml.CopyValue
- Copy YAML value
- Copies a YAML value from one key to another. The existing key/value pair remains unaffected by this change. Attempts to merge the copied value into the new key if it already exists. By default, attempts to create the new key if it does not exist.
- org.openrewrite.yaml.CreateYamlFile
- Create YAML file
- Create a new YAML file.