Package org.apache.maven.model
Class Model
java.lang.Object
org.apache.maven.model.ModelBase
org.apache.maven.model.Model
- All Implemented Interfaces:
- Serializable,- Cloneable,- InputLocationTracker
The 
<project> element is the root of
 the descriptor.
         The following table lists all of the possible child
 elements.- Version:
- $Revision$ $Date$
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddContributor(Contributor contributor) Method addContributor.voidaddDeveloper(Developer developer) Method addDeveloper.voidaddLicense(License license) Method addLicense.voidaddMailingList(MailingList mailingList) Method addMailingList.voidaddProfile(Profile profile) Method addProfile.clone()Method clone.Get the identifier for this artifact that is unique within the group given by the group ID.getBuild()Get information required to build the project.Get when children inherit from project's url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
 Default value is:true
 Since: Maven 3.6.1.Get the project's continuous integration information.Method getContributors.Get a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site.Method getDevelopers.Get a universally unique identifier for a project.getId()Get the year of the project's inception, specified with 4 digits.Get the project's issue management system information.Method getLicenses.Method getMailingLists.Get the modelEncoding field.Get declares to which version of project descriptor this POM conforms.getName()Get the full name of the project.Get this element describes various attributes of the organization to which the project belongs.Get the type of artifact this project produces, for examplejarwarearpom.Get the location of the parent project, if one exists.Gets the POM file for the corresponding project (if any).Get describes the prerequisites in the build environment for this project.Method getProfiles.Gets the base directory for the corresponding project (if any).getScm()Get specification for the SCM used by the project, such as CVS, Subversion, etc.getUrl()Get the URL to the project's homepage.Get the current version of the artifact produced by this project.booleanvoidremoveContributor(Contributor contributor) Method removeContributor.voidremoveDeveloper(Developer developer) Method removeDeveloper.voidremoveLicense(License license) Method removeLicense.voidremoveMailingList(MailingList mailingList) Method removeMailingList.voidremoveProfile(Profile profile) Method removeProfile.voidsetArtifactId(String artifactId) Set the identifier for this artifact that is unique within the group given by the group ID.voidSet information required to build the project.voidsetChildProjectUrlInheritAppendPath(boolean childProjectUrlInheritAppendPath) voidsetChildProjectUrlInheritAppendPath(String childProjectUrlInheritAppendPath) Set when children inherit from project's url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
 Default value is:true
 Since: Maven 3.6.1.voidsetCiManagement(CiManagement ciManagement) Set the project's continuous integration information.voidsetContributors(List<Contributor> contributors) Set describes the contributors to a project that are not yet committers.voidsetDescription(String description) Set a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site.voidsetDevelopers(List<Developer> developers) Set describes the committers of a project.voidsetGroupId(String groupId) Set a universally unique identifier for a project.voidsetInceptionYear(String inceptionYear) Set the year of the project's inception, specified with 4 digits.voidsetIssueManagement(IssueManagement issueManagement) Set the project's issue management system information.voidsetLicenses(List<License> licenses) Set this element describes all of the licenses for this project.voidsetMailingLists(List<MailingList> mailingLists) Set contains information about a project's mailing lists.voidsetModelEncoding(String modelEncoding) Set the modelEncoding field.voidsetModelVersion(String modelVersion) Set declares to which version of project descriptor this POM conforms.voidSet the full name of the project.voidsetOrganization(Organization organization) Set this element describes various attributes of the organization to which the project belongs.voidsetPackaging(String packaging) Set the type of artifact this project produces, for examplejarwarearpom.voidSet the location of the parent project, if one exists.voidsetPomFile(File pomFile) voidsetPrerequisites(Prerequisites prerequisites) Set describes the prerequisites in the build environment for this project.voidsetProfiles(List<Profile> profiles) Set a listing of project-local build profiles which will modify the build process when activated.voidSet specification for the SCM used by the project, such as CVS, Subversion, etc.voidSet the URL to the project's homepage.voidsetVersion(String version) Set the current version of the artifact produced by this project.toString()Methods inherited from class org.apache.maven.model.ModelBaseaddDependency, addModule, addPluginRepository, addProperty, addRepository, getDependencies, getDependencyManagement, getDistributionManagement, getLocation, getModules, getPluginRepositories, getProperties, getReporting, getReports, getRepositories, removeDependency, removeModule, removePluginRepository, removeRepository, setDependencies, setDependencyManagement, setDistributionManagement, setLocation, setModules, setOtherLocation, setPluginRepositories, setProperties, setReporting, setReports, setRepositories
- 
Constructor Details- 
Modelpublic Model()
 
- 
- 
Method Details- 
addContributorMethod addContributor.- Parameters:
- contributor- a contributor object.
 
- 
addDeveloperMethod addDeveloper.- Parameters:
- developer- a developer object.
 
- 
addLicenseMethod addLicense.- Parameters:
- license- a license object.
 
- 
addMailingListMethod addMailingList.- Parameters:
- mailingList- a mailingList object.
 
- 
addProfileMethod addProfile.- Parameters:
- profile- a profile object.
 
- 
cloneMethod clone.
- 
getArtifactIdGet the identifier for this artifact that is unique within the group given by the group ID. An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs.- Returns:
- String
 
- 
getBuildGet information required to build the project.- Returns:
- Build
 
- 
getChildProjectUrlInheritAppendPathGet when children inherit from project's url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
 Default value is:true
 Since: Maven 3.6.1.- Returns:
- String
 
- 
getCiManagementGet the project's continuous integration information.- Returns:
- CiManagement
 
- 
getContributorsMethod getContributors.- Returns:
- List
 
- 
getDescriptionGet a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow plain text representation. If you need to modify the index page of the generated web site, you are able to specify your own instead of adjusting this text.- Returns:
- String
 
- 
getDevelopersMethod getDevelopers.- Returns:
- List
 
- 
getGroupIdGet a universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg.org.apache.maven).- Returns:
- String
 
- 
getInceptionYearGet the year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational.- Returns:
- String
 
- 
getIssueManagementGet the project's issue management system information.- Returns:
- IssueManagement
 
- 
getLicensesMethod getLicenses.- Returns:
- List
 
- 
getMailingListsMethod getMailingLists.- Returns:
- List
 
- 
getModelEncodingGet the modelEncoding field.- Returns:
- String
 
- 
getModelVersionGet declares to which version of project descriptor this POM conforms.- Returns:
- String
 
- 
getNameGet the full name of the project.- Returns:
- String
 
- 
getOrganizationGet this element describes various attributes of the organization to which the project belongs. These attributes are utilized when documentation is created (for copyright notices and links).- Returns:
- Organization
 
- 
getPackagingGet the type of artifact this project produces, for examplejarwarearpom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.- Returns:
- String
 
- 
getParentGet the location of the parent project, if one exists. Values from the parent project will be the default for this project if they are left unspecified. The location is given as a group ID, artifact ID and version.- Returns:
- Parent
 
- 
getPrerequisitesGet describes the prerequisites in the build environment for this project.- Returns:
- Prerequisites
 
- 
getProfilesMethod getProfiles.- Returns:
- List
 
- 
getScmGet specification for the SCM used by the project, such as CVS, Subversion, etc.- Returns:
- Scm
 
- 
getUrlGet the URL to the project's homepage.
 Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if project'schild.project.url.inherit.append.path="false"- Returns:
- String
 
- 
getVersionGet the current version of the artifact produced by this project.- Returns:
- String
 
- 
removeContributorMethod removeContributor.- Parameters:
- contributor- a contributor object.
 
- 
removeDeveloperMethod removeDeveloper.- Parameters:
- developer- a developer object.
 
- 
removeLicenseMethod removeLicense.- Parameters:
- license- a license object.
 
- 
removeMailingListMethod removeMailingList.- Parameters:
- mailingList- a mailingList object.
 
- 
removeProfileMethod removeProfile.- Parameters:
- profile- a profile object.
 
- 
setArtifactIdSet the identifier for this artifact that is unique within the group given by the group ID. An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs.- Parameters:
- artifactId- a artifactId object.
 
- 
setBuildSet information required to build the project.- Parameters:
- build- a build object.
 
- 
setChildProjectUrlInheritAppendPathSet when children inherit from project's url, append path or not? Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyBoolean
 Default value is:true
 Since: Maven 3.6.1.- Parameters:
- childProjectUrlInheritAppendPath- a childProjectUrlInheritAppendPath object.
 
- 
setCiManagementSet the project's continuous integration information.- Parameters:
- ciManagement- a ciManagement object.
 
- 
setContributorsSet describes the contributors to a project that are not yet committers.- Parameters:
- contributors- a contributors object.
 
- 
setDescriptionSet a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow plain text representation. If you need to modify the index page of the generated web site, you are able to specify your own instead of adjusting this text.- Parameters:
- description- a description object.
 
- 
setDevelopersSet describes the committers of a project.- Parameters:
- developers- a developers object.
 
- 
setGroupIdSet a universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg.org.apache.maven).- Parameters:
- groupId- a groupId object.
 
- 
setInceptionYearSet the year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational.- Parameters:
- inceptionYear- a inceptionYear object.
 
- 
setIssueManagementSet the project's issue management system information.- Parameters:
- issueManagement- a issueManagement object.
 
- 
setLicensesSet this element describes all of the licenses for this project. Each license is described by alicenseelement, which is then described by additional elements. Projects should only list the license(s) that applies to the project and not the licenses that apply to dependencies. If multiple licenses are listed, it is assumed that the user can select any of them, not that they must accept all.- Parameters:
- licenses- a licenses object.
 
- 
setMailingListsSet contains information about a project's mailing lists.- Parameters:
- mailingLists- a mailingLists object.
 
- 
setModelEncodingSet the modelEncoding field.- Parameters:
- modelEncoding- a modelEncoding object.
 
- 
setModelVersionSet declares to which version of project descriptor this POM conforms.- Parameters:
- modelVersion- a modelVersion object.
 
- 
setNameSet the full name of the project.- Parameters:
- name- a name object.
 
- 
setOrganizationSet this element describes various attributes of the organization to which the project belongs. These attributes are utilized when documentation is created (for copyright notices and links).- Parameters:
- organization- a organization object.
 
- 
setPackagingSet the type of artifact this project produces, for examplejarwarearpom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.- Parameters:
- packaging- a packaging object.
 
- 
setParentSet the location of the parent project, if one exists. Values from the parent project will be the default for this project if they are left unspecified. The location is given as a group ID, artifact ID and version.- Parameters:
- parent- a parent object.
 
- 
setPrerequisitesSet describes the prerequisites in the build environment for this project.- Parameters:
- prerequisites- a prerequisites object.
 
- 
setProfilesSet a listing of project-local build profiles which will modify the build process when activated.- Parameters:
- profiles- a profiles object.
 
- 
setScmSet specification for the SCM used by the project, such as CVS, Subversion, etc.- Parameters:
- scm- a scm object.
 
- 
setUrlSet the URL to the project's homepage.
 Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if project'schild.project.url.inherit.append.path="false"- Parameters:
- url- a url object.
 
- 
setVersionSet the current version of the artifact produced by this project.- Parameters:
- version- a version object.
 
- 
getPomFileGets the POM file for the corresponding project (if any).- Returns:
- The POM file from which this model originated or nullif this model does not belong to a local project (e.g. describes the metadata of some artifact from the repository).
 
- 
setPomFile
- 
getProjectDirectoryGets the base directory for the corresponding project (if any).- Returns:
- The base directory for the corresponding project or nullif 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
- 
isChildProjectUrlInheritAppendPathpublic boolean isChildProjectUrlInheritAppendPath()
- 
setChildProjectUrlInheritAppendPathpublic void setChildProjectUrlInheritAppendPath(boolean childProjectUrlInheritAppendPath) 
 
-