Package org.apache.maven.model.building
Class FileModelSource
java.lang.Object
org.apache.maven.building.FileSource
org.apache.maven.model.building.FileModelSource
- All Implemented Interfaces:
Source
,ModelSource
,ModelSource2
Wraps an ordinary
File
as a model source.- Author:
- Benjamin Bentmann
-
Constructor Summary
ConstructorDescriptionFileModelSource
(File pomFile) Creates a new model source backed by the specified file. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns location of the POM, nevernull
.Deprecated.getRelatedSource
(String relPath) Returns model source identified by a path relative to this model source POM.int
hashCode()
Methods inherited from class org.apache.maven.building.FileSource
getFile, getInputStream, getLocation, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.maven.building.Source
getInputStream, getLocation
-
Constructor Details
-
FileModelSource
Creates a new model source backed by the specified file.- Parameters:
pomFile
- The POM file, must not benull
.
-
-
Method Details
-
getPomFile
Deprecated.instead useFileSource.getFile()
- Returns:
- the file of this source
-
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
-
equals
-
hashCode
public int hashCode()
-
FileSource.getFile()