Class PomDiscovery

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

public class PomDiscovery extends Object
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 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 files
      eu.maveniverse.domtrip.DomTripException - if there's an error parsing XML