Files
2025-11-30 08:45:33 +08:00

51 lines
16 KiB
CSV

Fully Qualified Recipe Name,Recipe Name,Description
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.DependencyInsight,Dependency insight for Gradle and Maven,Finds dependencies including transitive dependencies in both Gradle and Maven projects. Matches within all Gradle dependency configurations and Maven scopes.
org.openrewrite.java.dependencies.DependencyList,Dependency report,Emits a data table detailing all Gradle and Maven dependencies. This recipe makes no changes to any source file.
org.openrewrite.java.dependencies.FindDependency,Find Maven and Gradle dependencies,Finds direct dependencies declared in Maven and Gradle build files. This does *not* search transitive dependencies. To detect both direct and transitive dependencies use `org.openrewrite.java.dependencies.DependencyInsight` This recipe works for both Maven and Gradle projects.
org.openrewrite.java.dependencies.search.DoesNotIncludeDependency,Does not include dependency for Gradle and Maven,A precondition which returns false if visiting a Gradle file / Maven pom which includes the specified dependency in the classpath of some Gradle configuration / Maven scope. For compatibility with multimodule projects this should most often be applied as a precondition.
org.openrewrite.java.dependencies.AddDependency,Add Gradle or Maven dependency,For a Gradle project add a gradle dependency to a `build.gradle` file in the correct configuration based on where it is used. Or For a maven project Add a Maven dependency to a `pom.xml` file in the correct scope based on where it is used.
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 `groupId` or `artifactId`. Relocation information comes from the [oga-maven-plugin](https://github.com/jonathanlermitage/oga-maven-plugin/) maintained by Jonathan Lermitage Filipe Roque and others. This recipe makes no changes to any source file by default. Add `changeDependencies=true` to 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.UpgradeDependencyVersion,Upgrade Gradle or Maven dependency versions,"For Gradle projects upgrade the version of a dependency in a `build.gradle` file. Supports updating dependency declarations of various forms: * `String` notation: `""group:artifact:version""` * `Map` notation: `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.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.ModuleHasDependency,Module has dependency,Searches for both Gradle and Maven modules that have a dependency matching the specified groupId and artifactId. Places a `SearchResult` marker 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 the `FindDependency` recipe 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 `SearchResult` marker 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 the `FindDependency` recipe instead.
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 `maximumUpgradeDelta` option. Vulnerability information comes from the [GitHub Security Advisory Database](https://docs.github.com/en/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database) which aggregates vulnerability data from several public databases including the [National Vulnerability Database](https://nvd.nist.gov/) maintained by the United States government. Upgrades dependencies versioned according to [Semantic Versioning](https://semver.org/). Last updated: 2025-10-20T1103.
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 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](https://cyclonedx.org/) XML format. Supports Gradle and Maven. Places a file named sbom.xml adjacent to the Gradle or Maven build file.
org.openrewrite.maven.AddAnnotationProcessor,Add an annotation processor to `maven-compiler-plugin`,Add an annotation processor to the maven compiler plugin. Will not do anything if it already exists. Also doesn't add anything when no other annotation processors are defined yet. (Perhaps `ChangePluginConfiguration` can be used).
org.openrewrite.maven.AddParentPom,Add Maven parent,Add a parent pom to a Maven pom.xml. Does nothing if a parent pom is already present.
org.openrewrite.maven.AddPlugin,Add Maven plugin,Add the specified Maven plugin to the pom.xml.
org.openrewrite.maven.AddPluginDependency,Add Maven plugin dependencies,Adds the specified dependencies to a Maven plugin. Will not add the plugin if it does not already exist in the pom.
org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId,Change Maven managed dependency groupId artifactId and optionally the version,Change the groupId artifactId and optionally the version of a specified Maven managed dependency.
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.ChangePluginConfiguration,Change Maven plugin configuration,Apply the specified configuration to a Maven plugin. Will not add the plugin if it does not already exist in the pom.
org.openrewrite.maven.ChangePluginDependencies,Change Maven plugin dependencies,Applies the specified dependencies to a Maven plugin. Will not add the plugin if it does not already exist in the pom.
org.openrewrite.maven.ChangePluginExecutions,Change Maven plugin executions,Apply the specified executions to a Maven plugin. Will not add the plugin if it does not already exist in the pom.
org.openrewrite.maven.ChangePluginGroupIdAndArtifactId,Change Maven plugin group and artifact ID,Change the groupId and/or the artifactId of a specified Maven plugin. Optionally update the plugin version. This recipe does not perform any validation and assumes all values passed are valid.
org.openrewrite.maven.ManagedToRuntimeDependencies,Convert managed dependencies to runtime dependencies,This recipe processes Maven POMs converting all `<dependencyManagement>` entries into runtime scoped `<dependencies>` entries. Import scoped BOMs (like jackson-bom) are left unmodified in `<dependencyManagement>`. Some style guidelines prefer that `<dependencyManagement>` be used only for BOMs. This maintain that style while avoiding introducing new symbols onto the compile classpath unintentionally.
org.openrewrite.maven.RemoveDuplicatePluginDeclarations,Remove duplicate plugin declarations,Maven 4 rejects duplicate plugin declarations (same groupId and artifactId) with an error. This recipe removes duplicate plugin declarations keeping only the first occurrence.
org.openrewrite.maven.RemoveManagedDependency,Remove Maven managed dependency,Removes a single managed dependency from the <dependencyManagement><dependencies> section of the pom.xml.
org.openrewrite.maven.RemovePlugin,Remove Maven plugin,Remove the specified Maven plugin from the POM.
org.openrewrite.maven.RemovePluginDependency,Remove Maven plugin dependency,Removes a dependency from the <dependencies> section of a plugin in the pom.xml.
org.openrewrite.maven.RemoveRedundantDependencyVersions,Remove redundant explicit dependency and plugin versions,Remove explicitly-specified dependency/plugin versions when a parent POM's `dependencyManagement`/`pluginManagement` specifies the version.
org.openrewrite.maven.UpgradeParentVersion,Upgrade Maven parent project version,Set the parent pom version number according to a [version selector](https://docs.openrewrite.org/reference/dependency-version-selectors) or to a specific version number.
org.openrewrite.gradle.plugins.AddBuildPlugin,Add Gradle plugin,Add a build plugin to a Gradle build file's `plugins` block.
org.openrewrite.gradle.plugins.AddDevelocityGradlePlugin,Add the Develocity Gradle plugin,Add the Develocity Gradle plugin to settings.gradle files.
org.openrewrite.gradle.plugins.AddSettingsPlugin,Add Gradle settings plugin,Add plugin to Gradle settings file `plugins` block by id.
org.openrewrite.gradle.plugins.ChangePlugin,Change a Gradle plugin,Changes the selected Gradle plugin to the new plugin.
org.openrewrite.gradle.plugins.ChangePluginVersion,Change a Gradle plugin version by id,Change a Gradle plugin by id to a later version.
org.openrewrite.gradle.plugins.RemoveBuildPlugin,Remove Gradle plugin,Remove plugin from Gradle `plugins` block by its id. Does not remove plugins from the `buildscript` block.
org.openrewrite.gradle.plugins.RemoveSettingsPlugin,Remove Gradle settings plugin,Remove plugin from Gradle settings file `plugins` block by id.
org.openrewrite.gradle.search.FindGradleWrapper,Find Gradle wrappers,Find Gradle wrappers.
org.openrewrite.gradle.search.FindJVMTestSuites,Find Gradle JVMTestSuite plugin configuration,Find Gradle JVMTestSuite plugin configurations and produce a data table.
org.openrewrite.gradle.search.FindPlugins,Find Gradle plugin,Find a Gradle plugin by id and/or class name. For best results both should be specified as one cannot automatically be used to infer the other.
org.openrewrite.gradle.UpdateGradleWrapper,Update Gradle wrapper,Update the version of Gradle used in an existing Gradle wrapper. Queries services.gradle.org to 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 as services.gradle.org then the recipe may suggest a version which is not available in your artifact repository.
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 the `UpgradeDependencyVersion` recipe 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 `SearchResult` marker 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 the `FindPlugins` recipe instead.
org.openrewrite.gradle.spring.AddSpringDependencyManagementPlugin,Add `io.spring.dependency-management` plugin if in use,Prior to Spring Boot 2.0 the dependency management plugin was applied automatically as part of the overall spring boot plugin. Afterwards the dependency-management plugin must be applied explicitly or Gradle's `platform()` feature may be used instead. This recipe makes usage of io-spring.dependency-management explicit in anticipation of upgrade to Spring Boot 2.0 or later.