Package org.openrewrite.maven.tree
Class MavenResolutionResult
java.lang.Object
org.openrewrite.maven.tree.MavenResolutionResult
- All Implemented Interfaces:
org.openrewrite.marker.Marker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindDependencies
(String groupId, String artifactId, @Nullable Scope scope) Finds dependencies (including any transitive dependencies) in the model that match the provided group and artifact ids.findDependencies
(Predicate<ResolvedDependency> matcher, @Nullable Scope scope) Finds dependencies (including any transitive dependencies) in the model that match the predicate.@Nullable ResolvedDependency
getResolvedDependency
(Dependency dependency) @Nullable ResolvedManagedDependency
getResolvedManagedDependency
(ManagedDependency dependency) resolveDependencies
(MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) void
unsafeSet
(UUID id, ResolvedPom pom, List<MavenResolutionResult> modules, @Nullable MavenResolutionResult parent, Map<Scope, List<ResolvedDependency>> dependencies) void
unsafeSetModules
(@Nullable List<MavenResolutionResult> modules) void
unsafeSetParent
(MavenResolutionResult parent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openrewrite.marker.Marker
getId, print, withId
-
Constructor Details
-
MavenResolutionResult
public MavenResolutionResult()
-
-
Method Details
-
getActiveProfiles
-
unsafeSetManagedReference
-
getResolvedDependency
-
findDependencies
public List<ResolvedDependency> findDependencies(String groupId, String artifactId, @Nullable @Nullable Scope scope) Finds dependencies (including any transitive dependencies) in the model that match the provided group and artifact ids. The search can optionally be limited to a given scope.Note: It is possible for the same dependency to be returned multiple times if it is present in multiple scopes.
- Parameters:
groupId
- The groupId as a glob expressionartifactId
- The artifactId as a glob expressionscope
- The scope to limit the search to, or null to search all scopes- Returns:
- A list of matching dependencies
-
findDependencies
public List<ResolvedDependency> findDependencies(Predicate<ResolvedDependency> matcher, @Nullable @Nullable Scope scope) Finds dependencies (including any transitive dependencies) in the model that match the predicate. The search can optionally be limited to a given scope.Note: It is possible for the same dependency to be returned multiple times if it is present in multiple scopes.
- Parameters:
matcher
- The predicate to match the dependencyscope
- A scope to limit the search to, or null to search all scopes- Returns:
- A list of matching dependencies
-
unsafeSet
public void unsafeSet(UUID id, ResolvedPom pom, List<MavenResolutionResult> modules, @Nullable @Nullable MavenResolutionResult parent, Map<Scope, List<ResolvedDependency>> dependencies) -
unsafeSetParent
-
unsafeSetModules
-
getResolvedManagedDependency
@Nullable public @Nullable ResolvedManagedDependency getResolvedManagedDependency(ManagedDependency dependency) -
resolveDependencies
public MavenResolutionResult resolveDependencies(MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) throws MavenDownloadingExceptions - Throws:
MavenDownloadingExceptions
-
getProjectPoms
-