Class GAVUtils

java.lang.Object
org.apache.maven.cling.invoker.mvnup.goals.GAVUtils

public final class GAVUtils extends Object
Utility class for handling GroupId, ArtifactId, Version (GAV) operations in Maven POM files during the upgrade process.
  • Method Details

    • computeAllGAVs

      public static Set<GAV> computeAllGAVs(UpgradeContext context, Map<Path, org.jdom2.Document> pomMap)
      Computes all GAVs from all POMs in the multi-module project for inference. This includes resolving parent inheritance and relative path parents.
      Parameters:
      context - the upgrade context
      pomMap - map of all POM files in the project
      Returns:
      set of all GAVs in the project
    • extractGAVWithParentResolution

      public static GAV extractGAVWithParentResolution(UpgradeContext context, org.jdom2.Document pomDocument)
      Extracts GAV from a POM document with parent resolution. If groupId or version are missing, attempts to resolve from parent.
      Parameters:
      context - the upgrade context for logging
      pomDocument - the POM document
      Returns:
      the GAV or null if it cannot be determined