Package org.apache.maven.model
Class Parent
- java.lang.Object
-
- org.apache.maven.model.Parent
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,InputLocationTracker
public class Parent extends java.lang.Object implements java.io.Serializable, java.lang.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringartifactIdThe artifact id of the parent project to inherit from.private InputLocationartifactIdLocationField artifactIdLocation.private java.lang.StringgroupIdThe group id of the parent project to inherit from.private InputLocationgroupIdLocationField groupIdLocation.private InputLocationlocationField location.private java.util.Map<java.lang.Object,InputLocation>locationsField locations.private java.lang.StringrelativePathThe relative path of the parentpom.xmlfile within the check out.private InputLocationrelativePathLocationField relativePathLocation.private java.lang.StringversionThe version of the parent project to inherit.private InputLocationversionLocationField versionLocation.
-
Constructor Summary
Constructors Constructor Description Parent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parentclone()Method clone.java.lang.StringgetArtifactId()Get the artifact id of the parent project to inherit from.java.lang.StringgetGroupId()Get the group id of the parent project to inherit from.java.lang.StringgetId()InputLocationgetLocation(java.lang.Object key)Gets the location of the specified field in the input source.private InputLocationgetOtherLocation(java.lang.Object key)java.lang.StringgetRelativePath()Get the relative path of the parentpom.xmlfile within the check out.java.lang.StringgetVersion()Get the version of the parent project to inherit.voidsetArtifactId(java.lang.String artifactId)Set the artifact id of the parent project to inherit from.voidsetGroupId(java.lang.String groupId)Set the group id of the parent project to inherit from.voidsetLocation(java.lang.Object key, InputLocation location)Sets the location of the specified field.voidsetOtherLocation(java.lang.Object key, InputLocation location)voidsetRelativePath(java.lang.String relativePath)Set the relative path of the parentpom.xmlfile within the check out.voidsetVersion(java.lang.String version)Set the version of the parent project to inherit.java.lang.StringtoString()
-
-
-
Field Detail
-
groupId
private java.lang.String groupId
The group id of the parent project to inherit from.
-
artifactId
private java.lang.String artifactId
The artifact id of the parent project to inherit from.
-
version
private java.lang.String version
The version of the parent project to inherit.
-
relativePath
private java.lang.String relativePath
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.
-
locations
private java.util.Map<java.lang.Object,InputLocation> locations
Field locations.
-
location
private InputLocation location
Field location.
-
groupIdLocation
private InputLocation groupIdLocation
Field groupIdLocation.
-
artifactIdLocation
private InputLocation artifactIdLocation
Field artifactIdLocation.
-
versionLocation
private InputLocation versionLocation
Field versionLocation.
-
relativePathLocation
private InputLocation relativePathLocation
Field relativePathLocation.
-
-
Method Detail
-
clone
public Parent clone()
Method clone.- Overrides:
clonein classjava.lang.Object- Returns:
- Parent
-
getArtifactId
public java.lang.String getArtifactId()
Get the artifact id of the parent project to inherit from.- Returns:
- String
-
getGroupId
public java.lang.String getGroupId()
Get the group id of the parent project to inherit from.- Returns:
- String
-
getLocation
public InputLocation getLocation(java.lang.Object key)
Description copied from interface:InputLocationTrackerGets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker- Parameters:
key-- Returns:
- InputLocation
-
setLocation
public void setLocation(java.lang.Object key, InputLocation location)Description copied from interface:InputLocationTrackerSets the location of the specified field.- Specified by:
setLocationin interfaceInputLocationTracker- Parameters:
key-location-
-
setOtherLocation
public void setOtherLocation(java.lang.Object key, InputLocation location)- Parameters:
key-location-
-
getOtherLocation
private InputLocation getOtherLocation(java.lang.Object key)
- Parameters:
key-- Returns:
- InputLocation
-
getRelativePath
public java.lang.String getRelativePath()
Get 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
-
getVersion
public java.lang.String getVersion()
Get the version of the parent project to inherit.- Returns:
- String
-
setArtifactId
public void setArtifactId(java.lang.String artifactId)
Set the artifact id of the parent project to inherit from.- Parameters:
artifactId-
-
setGroupId
public void setGroupId(java.lang.String groupId)
Set the group id of the parent project to inherit from.- Parameters:
groupId-
-
setRelativePath
public void setRelativePath(java.lang.String relativePath)
Set 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-
-
setVersion
public void setVersion(java.lang.String version)
Set the version of the parent project to inherit.- Parameters:
version-
-
getId
public java.lang.String getId()
- Returns:
- the id as
groupId:artifactId:version
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-