Class DefaultModelLocator

java.lang.Object
org.apache.maven.model.locator.DefaultModelLocator
All Implemented Interfaces:
ModelLocator

@Named @Singleton @Deprecated(since="4.0.0") public class DefaultModelLocator extends Object implements ModelLocator
Deprecated.
use ModelBuilder instead
Locates a POM file within a project base directory.
  • Constructor Details

    • DefaultModelLocator

      public DefaultModelLocator()
      Deprecated.
  • Method Details

    • locatePom

      @Deprecated public File locatePom(File projectDirectory)
      Deprecated.
      Description copied from interface: ModelLocator
      Locates the POM file within the specified project directory. In case the given project directory does not exist or does not contain a POM file, the return value indicates the expected path to the POM file. Subdirectories of the project directory will not be considered when locating the POM file. The return value will be an absolute path if the project directory is given as an absolute path.
      Specified by:
      locatePom in interface ModelLocator
      Parameters:
      projectDirectory - The (possibly non-existent) base directory to locate the POM file in, must not be null.
      Returns:
      The path to the (possibly non-existent) POM file, never null.
    • locatePom

      public Path locatePom(Path projectDirectory)
      Deprecated.
      Description copied from interface: ModelLocator
      Locates the POM file within the specified project directory. In case the given project directory does not exist or does not contain a POM file, the return value indicates the expected path to the POM file. Subdirectories of the project directory will not be considered when locating the POM file. The return value will be an absolute path if the project directory is given as an absolute path.
      Specified by:
      locatePom in interface ModelLocator
      Parameters:
      projectDirectory - The (possibly non-existent) base directory to locate the POM file in, must not be null.
      Returns:
      The path to the (possibly non-existent) POM file, never null.
    • locateExistingPom

      @Deprecated public File locateExistingPom(File project)
      Deprecated.
      Description copied from interface: ModelLocator
      Returns the file containing the pom or null if a pom can not be found at the given file or in the given directory.
      Specified by:
      locateExistingPom in interface ModelLocator
    • locateExistingPom

      public Path locateExistingPom(Path project)
      Deprecated.
      Description copied from interface: ModelLocator
      Returns the file containing the pom or null if a pom can not be found at the given file or in the given directory.
      Specified by:
      locateExistingPom in interface ModelLocator