Class DefaultProjectBuilder.SourceWrapper

java.lang.Object
org.apache.maven.internal.impl.DefaultProjectBuilder.SourceWrapper
All Implemented Interfaces:
Source, ModelSource, ModelSource2
Enclosing class:
DefaultProjectBuilder

private static class DefaultProjectBuilder.SourceWrapper extends Object implements ModelSource2
  • Field Details

    • source

      private final Source source
  • Constructor Details

    • SourceWrapper

      SourceWrapper(Source source)
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Description copied from interface: Source
      Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.
      Specified by:
      getInputStream in interface Source
      Returns:
      A byte stream to the source contents, never null.
      Throws:
      IOException - in case of IO issue
    • getLocation

      public String getLocation()
      Description copied from interface: Source
      Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.
      Specified by:
      getLocation in interface Source
      Returns:
      A user-friendly hint about the location of the source, never null.
    • getRelatedSource

      public ModelSource2 getRelatedSource(String relPath)
      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()
      Description copied from interface: ModelSource2
      Returns location of the POM, never null.
      Specified by:
      getLocationURI in interface ModelSource2