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 and dependency management dependencies@Nullable String
getGav()
getManagedExclusions
(String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable Scope
getManagedScope
(String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable String
getManagedVersion
(@Nullable String groupId, String artifactId, @Nullable String type, @Nullable String classifier) @Nullable String
resolve
(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 and dependency management 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
-
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
-