Package org.openrewrite.maven
Class ManageDependencies
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<Map<GroupArtifactVersion,Collection<ResolvedDependency>>>
org.openrewrite.maven.ManageDependencies
- All Implemented Interfaces:
Cloneable
public class ManageDependencies
extends org.openrewrite.ScanningRecipe<Map<GroupArtifactVersion,Collection<ResolvedDependency>>>
Make existing dependencies "dependency managed", moving the version to the dependencyManagement
section of the POM.
All dependencies that match groupPattern
and artifactPattern
should be
align-able to the same version (either the version provided to this visitor or the maximum matching
version if none is provided).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe
-
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInitialValue
(org.openrewrite.ExecutionContext ctx) org.openrewrite.TreeVisitor<?,
org.openrewrite.ExecutionContext> getScanner
(Map<GroupArtifactVersion, Collection<ResolvedDependency>> rootGavToDependencies) org.openrewrite.TreeVisitor<?,
org.openrewrite.ExecutionContext> getVisitor
(Map<GroupArtifactVersion, Collection<ResolvedDependency>> rootGavToDependencies) Methods inherited from class org.openrewrite.ScanningRecipe
generate, generate, getAccumulator, getVisitor
Methods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll
-
Constructor Details
-
ManageDependencies
public ManageDependencies()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in classorg.openrewrite.Recipe
-
getInstanceNameSuffix
- Overrides:
getInstanceNameSuffix
in classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescription
in classorg.openrewrite.Recipe
-
getInitialValue
public Map<GroupArtifactVersion,Collection<ResolvedDependency>> getInitialValue(org.openrewrite.ExecutionContext ctx) - Specified by:
getInitialValue
in classorg.openrewrite.ScanningRecipe<Map<GroupArtifactVersion,
Collection<ResolvedDependency>>>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(Map<GroupArtifactVersion, Collection<ResolvedDependency>> rootGavToDependencies) - Specified by:
getScanner
in classorg.openrewrite.ScanningRecipe<Map<GroupArtifactVersion,
Collection<ResolvedDependency>>>
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(Map<GroupArtifactVersion, Collection<ResolvedDependency>> rootGavToDependencies) - Overrides:
getVisitor
in classorg.openrewrite.ScanningRecipe<Map<GroupArtifactVersion,
Collection<ResolvedDependency>>>
-