Package org.apache.maven.model
Class Model
java.lang.Object
org.apache.maven.model.BaseObject
org.apache.maven.model.ModelBase
org.apache.maven.model.Model
- All Implemented Interfaces:
Serializable
,Cloneable
,InputLocationTracker
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.model.BaseObject
BaseObject.ChildrenTracking
-
Field Summary
Fields inherited from class org.apache.maven.model.BaseObject
childrenTracking, delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContributor
(Contributor contributor) void
addDeveloper
(Developer developer) void
addLicense
(License license) void
addMailingList
(MailingList mailingList) void
addProfile
(Profile profile) clone()
boolean
getBuild()
getId()
getLocation
(Object key) Gets the location of the specified field in the input source.getName()
Gets the POM file for the corresponding project (if any).Gets the base directory for the corresponding project (if any).getScm()
getUrl()
int
hashCode()
boolean
boolean
boolean
isRoot()
modelToApiV3
(List<Model> list) modelToApiV4
(List<Model> list) void
removeContributor
(Contributor contributor) void
removeDeveloper
(Developer developer) void
removeLicense
(License license) void
removeMailingList
(MailingList mailingList) void
removeProfile
(Profile profile) protected boolean
void
setArtifactId
(String artifactId) void
void
setChildProjectUrlInheritAppendPath
(boolean childProjectUrlInheritAppendPath) void
setChildProjectUrlInheritAppendPath
(String childProjectUrlInheritAppendPath) void
setCiManagement
(CiManagement ciManagement) void
setContributors
(List<Contributor> contributors) void
setDescription
(String description) void
setDevelopers
(List<Developer> developers) void
setGroupId
(String groupId) void
setInceptionYear
(String inceptionYear) void
setIssueManagement
(IssueManagement issueManagement) void
setLicenses
(List<License> licenses) void
setLocation
(Object key, InputLocation location) Sets the location of the specified field.void
setMailingLists
(List<MailingList> mailingLists) void
setModelEncoding
(String modelEncoding) void
setModelVersion
(String modelVersion) void
void
setOrganization
(Organization organization) void
setPackaging
(String packaging) void
void
setPomFile
(File pomFile) void
setPrerequisites
(Prerequisites prerequisites) void
setPreserveModelVersion
(boolean preserveModelVersion) void
setProfiles
(List<Profile> profiles) void
setRoot
(boolean root) void
void
void
setVersion
(String version) toString()
Methods inherited from class org.apache.maven.model.ModelBase
addDependency, addModule, addPluginRepository, addProperty, addRepository, getDependencies, getDependencyManagement, getDistributionManagement, getModules, getPluginRepositories, getProperties, getReporting, getRepositories, modelBaseToApiV3, modelBaseToApiV4, removeDependency, removeModule, removePluginRepository, removeRepository, setDependencies, setDependencyManagement, setDistributionManagement, setModules, setPluginRepositories, setProperties, setReporting, setRepositories
Methods inherited from class org.apache.maven.model.BaseObject
update
-
Constructor Details
-
Model
public Model() -
Model
-
Model
-
-
Method Details
-
clone
-
getDelegate
- Overrides:
getDelegate
in classModelBase
-
equals
-
hashCode
public int hashCode() -
getModelEncoding
-
getModelVersion
-
setModelVersion
-
getParent
-
setParent
-
getGroupId
-
setGroupId
-
getArtifactId
-
setArtifactId
-
getVersion
-
setVersion
-
getPackaging
-
setPackaging
-
getName
-
setName
-
getDescription
-
setDescription
-
getUrl
-
setUrl
-
getChildProjectUrlInheritAppendPath
-
setChildProjectUrlInheritAppendPath
-
isRoot
public boolean isRoot() -
setRoot
public void setRoot(boolean root) -
isPreserveModelVersion
public boolean isPreserveModelVersion() -
setPreserveModelVersion
public void setPreserveModelVersion(boolean preserveModelVersion) -
getInceptionYear
-
setInceptionYear
-
getOrganization
-
setOrganization
-
getLicenses
-
setLicenses
-
addLicense
-
removeLicense
-
getDevelopers
-
setDevelopers
-
addDeveloper
-
removeDeveloper
-
getContributors
-
setContributors
-
addContributor
-
removeContributor
-
getMailingLists
-
setMailingLists
-
addMailingList
-
removeMailingList
-
getPrerequisites
-
setPrerequisites
-
getScm
-
setScm
-
getIssueManagement
-
setIssueManagement
-
getCiManagement
-
setCiManagement
-
getBuild
-
setBuild
-
getProfiles
-
setProfiles
-
addProfile
-
removeProfile
-
getLocation
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Overrides:
getLocation
in classModelBase
- Parameters:
key
- The key of the field, must not benull
.- Returns:
- The location of the field in the input source or
null
if unknown.
-
setLocation
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Specified by:
setLocation
in interfaceInputLocationTracker
- Overrides:
setLocation
in classModelBase
- Parameters:
key
- The key of the field, must not benull
.location
- The location of the field, may benull
.
-
replace
-
modelToApiV4
-
modelToApiV3
-
getPomFile
Gets the POM file for the corresponding project (if any).- Returns:
- The POM file from which this model originated or
null
if this model does not belong to a local project (e.g. describes the metadata of some artifact from the repository).
-
setPomFile
-
setModelEncoding
-
getProjectDirectory
Gets the base directory for the corresponding project (if any).- Returns:
- The base directory for the corresponding project or
null
if this model does not belong to a local project (e.g. describes the metadata of some artifact from the repository).
-
getId
- Returns:
- the model id as
groupId:artifactId:packaging:version
-
toString
-
isChildProjectUrlInheritAppendPath
public boolean isChildProjectUrlInheritAppendPath() -
setChildProjectUrlInheritAppendPath
public void setChildProjectUrlInheritAppendPath(boolean childProjectUrlInheritAppendPath)
-