public class Parent extends Objectimplements Serializable , Cloneable , InputLocationTracker
<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.
Constructor and Description |
---|
Parent()
|
Modifier and Type | Method and Description |
---|---|
Parent |
clone()
Method clone.
|
String |
getArtifactId()
Get the artifact id of the parent project to inherit from.
|
String |
getGroupId()
Get the group id of the parent project to inherit from.
|
String |
getId()
|
InputLocation |
getLocation(Object
Gets the location of the specified field in the input source.
|
String |
getRelativePath()
Get the relative path of the parent
pom.xml file within the check out.
|
String |
getVersion()
Get the version of the parent project to inherit.
|
void |
setArtifactId(String
Set the artifact id of the parent project to inherit from.
|
void |
setGroupId(String
Set the group id of the parent project to inherit from.
|
void |
setLocation(Object
Sets the location of the specified field.
|
void |
setRelativePath(String
Set the relative path of the parent
pom.xml file within the check out.
|
void |
setVersion(String
Set the version of the parent project to inherit.
|
String |
toString()
|
public StringgetArtifactId()
public StringgetGroupId()
public InputLocationgetLocation(Object key)
InputLocationTracker
getLocation
in interface
InputLocationTracker
key
-
public StringgetRelativePath()
pom.xml
file 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.
relativePath
allows 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.
public StringgetVersion()
public void setArtifactId(StringartifactId)
artifactId
-
public void setGroupId(StringgroupId)
groupId
-
public void setLocation(Objectkey, InputLocation location)
InputLocationTracker
setLocation
in interface
InputLocationTracker
key
-
location
-
public void setRelativePath(StringrelativePath)
pom.xml
file 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.
relativePath
allows 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.
relativePath
-
public void setVersion(Stringversion)
version
-
public StringgetId()
groupId:artifactId:version
public StringtoString()