Class PomDiscovery
java.lang.Object
org.apache.maven.cling.invoker.mvnup.goals.PomDiscovery
Discovers and loads Maven POM files in a Maven project hierarchy.
This class recursively discovers all POM files in a Maven project hierarchy and loads them as domtrip Documents. Individual strategies can create domtrip Editors from these Documents as needed for superior formatting preservation.
-
Method Summary
Modifier and TypeMethodDescriptiondiscoverPoms(Path startDirectory) Discovers and loads all POM files starting from the given directory.
-
Method Details
-
discoverPoms
public static Map<Path, eu.maveniverse.domtrip.Document> discoverPoms(Path startDirectory) throws IOException, eu.maveniverse.domtrip.DomTripException Discovers and loads all POM files starting from the given directory.- Parameters:
startDirectory- the directory to start discovery from- Returns:
- a map of Path to Document for all discovered POM files
- Throws:
IOException- if there's an error reading fileseu.maveniverse.domtrip.DomTripException- if there's an error parsing XML
-