Package org.apache.maven.model.building
Interface ModelSource2
- All Superinterfaces:
ModelSource
,Source
- All Known Subinterfaces:
ModelSource3
- All Known Implementing Classes:
FileModelSource
Provides access to the contents of a POM independently of the backing store (e.g. file system, database, memory).
Unlike ModelSource
, this interface supports loading of parent POM(s) from the same backing store and allows
construction of MavenProject instances without the need to have parent POM(s) available from local or remote
repositories.
ModelSource2 instances are cached in ModelBuildingRequest.getModelCache()
. Implementations must guarantee
that the connection to the backing store remains active until request's ModelCache
is discarded or flushed.
-
Method Summary
Modifier and TypeMethodDescriptionReturns location of the POM, nevernull
.getRelatedSource
(String relPath) Returns model source identified by a path relative to this model source POM.Methods inherited from interface org.apache.maven.building.Source
getInputStream, getLocation
-
Method Details
-
getRelatedSource
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.
- 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
URI getLocationURI()Returns location of the POM, nevernull
.
-