Class POMScanner

java.lang.Object
io.codemodder.plugins.maven.operator.POMScanner

public class POMScanner extends Object
The POMScanner class provides methods for scanning Maven POM (Project Object Model) files, including the original POM and its parent POMs, to create a ProjectModelFactory. This class offers both modern and legacy scanning methods for flexibility.
  • Constructor Details

    • POMScanner

      public POMScanner()
  • Method Details

    • scanFrom

      public static ProjectModelFactory scanFrom(File originalFile, File topLevelDirectory) throws Exception
      Scans a POM file and its parent POMs, if any, and creates a ProjectModelFactory.
      Parameters:
      originalFile - The original POM file to scan.
      topLevelDirectory - The top-level directory containing the POM files.
      Returns:
      A ProjectModelFactory representing the scanned POMs.
      Throws:
      Exception - If an error occurs during the scanning process.
    • legacyScanFrom

      public static ProjectModelFactory legacyScanFrom(File originalFile, File topLevelDirectory) throws org.dom4j.DocumentException, IOException, URISyntaxException
      Scans a POM file and its parent POMs using the legacy method and creates a ProjectModelFactory.
      Parameters:
      originalFile - The original POM file to scan.
      topLevelDirectory - The top-level directory containing the POM files.
      Returns:
      A ProjectModelFactory representing the scanned POMs.
      Throws:
      org.dom4j.DocumentException - If a document error occurs.
      IOException - If an I/O error occurs.
      URISyntaxException - If there is an issue with the URI syntax.