Package org.openrewrite.maven.tree
Class ResolvedPom
java.lang.Object
org.openrewrite.maven.tree.ResolvedPom
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.openrewrite.internal.PropertyPlaceholderHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeduplicate dependencies.@Nullable StringgetGav()@Nullable ResolvedManagedDependencygetManagedDependency(@Nullable String groupId, String artifactId, @Nullable String type, @Nullable String classifier) getManagedExclusions(String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable ScopegetManagedScope(String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable StringgetManagedVersion(@Nullable String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable Stringresolve(org.openrewrite.ExecutionContext ctx, MavenPomDownloader downloader) Whenever a change is made that may affect the effective properties, dependency management, dependencies, etc.resolveDependencies(Scope scope, Map<GroupArtifact, VersionRequirement> requirements, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) resolveDependencies(Scope scope, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx)
-
Field Details
-
placeholderHelper
public static final org.openrewrite.internal.PropertyPlaceholderHelper placeholderHelper
-
-
Constructor Details
-
ResolvedPom
-
-
Method Details
-
deduplicate
Deduplicate dependencies.- Returns:
- This POM after deduplication.
-
resolve
public ResolvedPom resolve(org.openrewrite.ExecutionContext ctx, MavenPomDownloader downloader) throws MavenDownloadingException Whenever a change is made that may affect the effective properties, dependency management, dependencies, etc. of a POM, this can be called to re-resolve the POM.- Parameters:
ctx- An execution context containing any maven-specific requirements.downloader- A POM downloader to download dependencies and parents.- Returns:
- A new instance with dependencies re-resolved or the same instance if no resolved dependencies have changed.
- Throws:
MavenDownloadingException- When problems are encountered downloading dependencies or parents.
-
getGav
-
getGroupId
-
getArtifactId
-
getVersion
-
getDatedSnapshotVersion
-
getPackaging
-
getValue
-
getManagedVersion
-
getManagedExclusions
-
getManagedScope
-
getManagedDependency
public @Nullable ResolvedManagedDependency getManagedDependency(@Nullable String groupId, String artifactId, @Nullable String type, @Nullable String classifier) -
getValues
-
getValues
-
resolveDependencies
public List<ResolvedDependency> resolveDependencies(Scope scope, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) throws MavenDownloadingExceptions - Throws:
MavenDownloadingExceptions
-
resolveDependencies
public List<ResolvedDependency> resolveDependencies(Scope scope, Map<GroupArtifact, VersionRequirement> requirements, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) throws MavenDownloadingExceptions- Throws:
MavenDownloadingExceptions
-