Class Pom

java.lang.Object
org.openrewrite.maven.tree.Pom

public class Pom extends Object
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 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

      public String getGroupId()
    • getArtifactId

      public String getArtifactId()
    • getVersion

      public String getVersion()
    • getDatedSnapshotVersion

      @Nullable public @Nullable String getDatedSnapshotVersion()
    • 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

      @Nullable public @Nullable String getValue(@Nullable @Nullable String value)