org.apache.maven.model
Class Parent

java.lang.Object
  extended by org.apache.maven.model.Parent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Parent
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

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

Constructor Summary
Parent()
           
 
Method Summary
 Parent clone()
          Method clone.
 java.lang.String getArtifactId()
          Get the artifact id of the parent project to inherit from.
 java.lang.String getGroupId()
          Get the group id of the parent project to inherit from.
 java.lang.String getId()
           
 java.lang.String getRelativePath()
          Get the relative path of the parent pom.xml file within the check out.
 java.lang.String getVersion()
          Get the version of the parent project to inherit.
 void setArtifactId(java.lang.String artifactId)
          Set the artifact id of the parent project to inherit from.
 void setGroupId(java.lang.String groupId)
          Set the group id of the parent project to inherit from.
 void setRelativePath(java.lang.String relativePath)
          Set the relative path of the parent pom.xml file within the check out.
 void setVersion(java.lang.String version)
          Set the version of the parent project to inherit.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parent

public Parent()
Method Detail

clone

public Parent clone()
Method clone.

Overrides:
clone in class java.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

getRelativePath

public java.lang.String getRelativePath()
Get the relative path of the parent pom.xml file within the check out. The default value is ../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.

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 parent pom.xml file within the check out. The default value is ../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.

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:
toString in class java.lang.Object


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.