Class GAVUtils
java.lang.Object
org.apache.maven.cling.invoker.mvnup.goals.GAVUtils
Utility class for handling GroupId, ArtifactId, Version (GAV) operations
in Maven POM files during the upgrade process.
-
Method Summary
Modifier and TypeMethodDescriptioncomputeAllGAVs
(UpgradeContext context, Map<Path, org.jdom2.Document> pomMap) Computes all GAVs from all POMs in the multi-module project for inference.static GAV
extractGAVWithParentResolution
(UpgradeContext context, org.jdom2.Document pomDocument) Extracts GAV from a POM document with parent resolution.
-
Method Details
-
computeAllGAVs
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 contextpomMap
- 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 loggingpomDocument
- the POM document- Returns:
- the GAV or null if it cannot be determined
-