Package org.apache.maven.model
Class Parent
java.lang.Object
org.apache.maven.model.Parent
- All Implemented Interfaces:
- Serializable,- Cloneable,- InputLocationTracker
The 
<parent> element contains
 information required to locate the parent project from which
         this project will inherit from.
         Note: The children of this element are
 not interpolated and must be given as literal values.- Version:
- $Revision$ $Date$
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()Method clone.Get the artifact id of the parent project to inherit from.Get the group id of the parent project to inherit from.getId()getLocation(Object key) Gets the location of the specified field in the input source.Get the relative path of the parentpom.xmlfile within the check out.Get the version of the parent project to inherit.voidsetArtifactId(String artifactId) Set the artifact id of the parent project to inherit from.voidsetGroupId(String groupId) Set the group id of the parent project to inherit from.voidsetLocation(Object key, InputLocation location) Sets the location of the specified field.voidsetOtherLocation(Object key, InputLocation location) voidsetRelativePath(String relativePath) Set the relative path of the parentpom.xmlfile within the check out.voidsetVersion(String version) Set the version of the parent project to inherit.toString()
- 
Constructor Details- 
Parentpublic Parent()
 
- 
- 
Method Details- 
cloneMethod clone.
- 
getArtifactIdGet the artifact id of the parent project to inherit from.- Returns:
- String
 
- 
getGroupIdGet the group id of the parent project to inherit from.- Returns:
- String
 
- 
getLocationDescription copied from interface:InputLocationTrackerGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
- Parameters:
- key- a key object.
- Returns:
- InputLocation
 
- 
setLocationDescription copied from interface:InputLocationTrackerSets the location of the specified field.- Specified by:
- setLocationin interface- InputLocationTracker
- Parameters:
- key- a key object.
- location- a location object.
 
- 
setOtherLocation- Parameters:
- key- a key object.
- location- a location object.
 
- 
getRelativePathGet the relative path of the parentpom.xmlfile within the check out. If not specified, it defaults to../pom.xml. Maven looks for the parent POM first in this location on the filesystem, then the local repository, and lastly in the remote repo.relativePathallows you to select a different location, for example when your structure is flat, or deeper without an intermediate parent POM. However, the group ID, artifact ID and version are still required, and must match the file in the location given or it will revert to the repository for the POM. This feature is only for enhancing the development in a local checkout of that project. Set the value to an empty string in case you want to disable the feature and always resolve the parent POM from the repositories.- Returns:
- String
 
- 
getVersionGet the version of the parent project to inherit.- Returns:
- String
 
- 
setArtifactIdSet the artifact id of the parent project to inherit from.- Parameters:
- artifactId- a artifactId object.
 
- 
setGroupIdSet the group id of the parent project to inherit from.- Parameters:
- groupId- a groupId object.
 
- 
setRelativePathSet the relative path of the parentpom.xmlfile within the check out. If not specified, it defaults to../pom.xml. Maven looks for the parent POM first in this location on the filesystem, then the local repository, and lastly in the remote repo.relativePathallows you to select a different location, for example when your structure is flat, or deeper without an intermediate parent POM. However, the group ID, artifact ID and version are still required, and must match the file in the location given or it will revert to the repository for the POM. This feature is only for enhancing the development in a local checkout of that project. Set the value to an empty string in case you want to disable the feature and always resolve the parent POM from the repositories.- Parameters:
- relativePath- a relativePath object.
 
- 
setVersionSet the version of the parent project to inherit.- Parameters:
- version- a version object.
 
- 
getId- Returns:
- the id as groupId:artifactId:version
 
- 
toString
 
-