Package org.apache.maven.internal.impl
Class DefaultProjectBuilder.SourceWrapper
java.lang.Object
org.apache.maven.internal.impl.DefaultProjectBuilder.SourceWrapper
- All Implemented Interfaces:
Source
,ModelSource
,ModelSource2
- Enclosing class:
DefaultProjectBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a byte stream to the source contents.Provides a user-friendly hint about the location of the source.Returns location of the POM, nevernull
.getRelatedSource
(String relPath) Returns model source identified by a path relative to this model source POM.
-
Field Details
-
source
-
-
Constructor Details
-
SourceWrapper
SourceWrapper(Source source)
-
-
Method Details
-
getInputStream
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 interfaceSource
- Returns:
- A byte stream to the source contents, never
null
. - Throws:
IOException
- in case of IO issue
-
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 interfaceSource
- Returns:
- A user-friendly hint about the location of the source, never
null
.
-
getRelatedSource
Description copied from interface:ModelSource2
Returns model source identified by a path relative to this model source POM. Implementation MUST be able to acceptrelPath
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 interfaceModelSource2
- 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
Description copied from interface:ModelSource2
Returns location of the POM, nevernull
.- Specified by:
getLocationURI
in interfaceModelSource2
-