Package org.openrewrite.maven.tree
Class Pom
java.lang.Object
org.openrewrite.maven.tree.Pom
The minimum information required about a POM to resolve it.
The data model here is the cacheable representation of POMs.
A POM serves as a ManagedDependency when
it is used as a BOM import.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringstatic intThe model version can be used to verify the structure of the serialized object, in cache, is compatible with the current model loaded by the JVM.@Nullable Stringbooleanresolve(Iterable<String> activeProfiles, MavenPomDownloader downloader, List<MavenRepository> initialRepositories, org.openrewrite.ExecutionContext ctx) resolve(Iterable<String> activeProfiles, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx)
-
Constructor Details
-
Pom
public Pom()
-
-
Method Details
-
getModelVersion
public static int getModelVersion()The model version can be used to verify the structure of the serialized object, in cache, is compatible with the current model loaded by the JVM.- Returns:
- Model version
-
getGroupId
-
getArtifactId
-
getVersion
-
getDatedSnapshotVersion
-
getEffectiveRepositories
- Returns:
- the repositories with any property placeholders resolved.
-
resolve
public ResolvedPom resolve(Iterable<String> activeProfiles, MavenPomDownloader downloader, org.openrewrite.ExecutionContext ctx) throws MavenDownloadingException - Parameters:
downloader- A POM downloader to download dependencies and parents.ctx- An execution context containing any maven-specific requirements.- Returns:
- A new instance with dependencies resolved.
- Throws:
MavenDownloadingException- When problems are encountered downloading dependencies or parents.
-
resolve
public ResolvedPom resolve(Iterable<String> activeProfiles, MavenPomDownloader downloader, List<MavenRepository> initialRepositories, org.openrewrite.ExecutionContext ctx) throws MavenDownloadingException - Throws:
MavenDownloadingException
-
getValue
-
hasJarPackaging
public boolean hasJarPackaging()
-