Class FileModelSource

java.lang.Object
org.apache.maven.building.FileSource
org.apache.maven.model.building.FileModelSource
All Implemented Interfaces:
org.apache.maven.building.Source, ModelSource, ModelSource2

@Deprecated(since="4.0.0") public class FileModelSource extends org.apache.maven.building.FileSource implements ModelSource2
Deprecated.
use org.apache.maven.api.services.ModelBuilder instead
Wraps an ordinary File as a model source.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Creates a new model source backed by the specified file.
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated.
     
    Deprecated.
    Returns location of the POM, never null.
    Deprecated.
    instead use FileSource.getFile()
    Deprecated.
    Returns model source identified by a path relative to this model source POM.
    int
    Deprecated.
     

    Methods inherited from class org.apache.maven.building.FileSource

    getFile, getInputStream, getLocation, getPath, toString

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.maven.building.Source

    getInputStream, getLocation
  • Constructor Details

    • FileModelSource

      public FileModelSource(File pomFile)
      Deprecated.
      Creates a new model source backed by the specified file.
      Parameters:
      pomFile - The POM file, must not be null.
    • FileModelSource

      public FileModelSource(Path pomFile)
      Deprecated.
  • Method Details

    • getPomFile

      @Deprecated public File getPomFile()
      Deprecated.
      instead use FileSource.getFile()
      Returns:
      the file of this source
    • getRelatedSource

      public ModelSource2 getRelatedSource(String relPath)
      Deprecated.
      Description copied from interface: ModelSource2
      Returns model source identified by a path relative to this model source POM. Implementation MUST be able to accept relPath parameter values that
      • use either / or \ file path separator
      • have .. parent directory references
      • point either at file or directory, in the latter case POM file name 'pom.xml' needs to be used by the requested model source.
      Specified by:
      getRelatedSource in interface ModelSource2
      Parameters:
      relPath - is the path of the requested model source relative to this model source POM.
      Returns:
      related model source or null if no such model source.
    • getLocationURI

      public URI getLocationURI()
      Deprecated.
      Description copied from interface: ModelSource2
      Returns location of the POM, never null.
      Specified by:
      getLocationURI in interface ModelSource2
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class org.apache.maven.building.FileSource
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class org.apache.maven.building.FileSource