Interface ModelSource3

All Superinterfaces:
ModelSource, ModelSource2, Source
All Known Implementing Classes:
FileModelSource

public interface ModelSource3 extends ModelSource2
Enhancement to the ModelSource2 to support locating POM files using the ModelLocator when pointing to a directory.
  • Method Details

    • getRelatedSource

      ModelSource3 getRelatedSource(ModelLocator locator, String relPath)
      Returns model source identified by a path relative to this model source POM. Implementation MUST accept relPath parameter values that
      • use either / or \ file path separator
      • have .. parent directory references
      • point either at file or directory
      If the given path points at a directory, the provided ModelLocator will be used to find the POM file, else if no locator is provided, a file named 'pom.xml' needs to be used by the requested model source.
      Parameters:
      locator - locator used to locate the pom file
      relPath - path of the requested model source relative to this model source POM
      Returns:
      related model source or null if no such model source
    • getRelatedSource

      @Deprecated default ModelSource3 getRelatedSource(String relPath)
      When using a ModelSource3, the method with a ModelLocator argument should be used instead.
      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.