Package org.apache.maven.model
Class Model
java.lang.Object
org.apache.maven.model.ModelBase
org.apache.maven.model.Model
- All Implemented Interfaces:
Serializable
The
<project>
element is the root of
the descriptor.
The following table lists all of the possible child
elements.- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The identifier for this artifact that is unique within the group given by the group ID.private Build
Information required to build the project.private CiManagement
The project's continuous integration information.private List<Contributor>
Field contributors.private String
A detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site.Field developers.private String
A universally unique identifier for a project.private String
The year of the project's inception, specified with 4 digits.private IssueManagement
The project's issue management system information.Field licenses.private List<MailingList>
Field mailingLists.private String
Field modelEncoding.private String
Declares to which version of project descriptor this POM conforms.private String
The full name of the project.private Organization
This element describes various attributes of the organization to which the project belongs.private String
The type of artifact this project produces, for examplejar
war
ear
pom
.private Parent
The location of the parent project, if one exists.private Prerequisites
Describes the prerequisites in the build environment for this project.Field profiles.private Scm
Specification for the SCM used by the project, such as CVS, Subversion, etc.private String
The URL to the project's homepage.private String
The current version of the artifact produced by this project. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContributor
(Contributor contributor) Method addContributor.void
addDeveloper
(Developer developer) Method addDeveloper.void
addLicense
(License license) Method addLicense.void
addMailingList
(MailingList mailingList) Method addMailingList.void
addProfile
(Profile profile) Method addProfile.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 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 examplejar
war
ear
pom
.Get the location of the parent project, if one exists.Get describes the prerequisites in the build environment for this project.Method getProfiles.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.void
removeContributor
(Contributor contributor) Method removeContributor.void
removeDeveloper
(Developer developer) Method removeDeveloper.void
removeLicense
(License license) Method removeLicense.void
removeMailingList
(MailingList mailingList) Method removeMailingList.void
removeProfile
(Profile profile) Method removeProfile.void
setArtifactId
(String artifactId) Set the identifier for this artifact that is unique within the group given by the group ID.void
Set information required to build the project.void
setCiManagement
(CiManagement ciManagement) Set the project's continuous integration information.void
setContributors
(List<Contributor> contributors) Set describes the contributors to a project that are not yet committers.void
setDescription
(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.void
setDevelopers
(List<Developer> developers) Set describes the committers of a project.void
setGroupId
(String groupId) Set a universally unique identifier for a project.void
setInceptionYear
(String inceptionYear) Set the year of the project's inception, specified with 4 digits.void
setIssueManagement
(IssueManagement issueManagement) Set the project's issue management system information.void
setLicenses
(List<License> licenses) Set this element describes all of the licenses for this project.void
setMailingLists
(List<MailingList> mailingLists) Set contains information about a project's mailing lists.void
setModelEncoding
(String modelEncoding) Set the modelEncoding field.void
setModelVersion
(String modelVersion) Set declares to which version of project descriptor this POM conforms.void
Set the full name of the project.void
setOrganization
(Organization organization) Set this element describes various attributes of the organization to which the project belongs.void
setPackaging
(String packaging) Set the type of artifact this project produces, for examplejar
war
ear
pom
.void
Set the location of the parent project, if one exists.void
setPrerequisites
(Prerequisites prerequisites) Set describes the prerequisites in the build environment for this project.void
setProfiles
(List<Profile> profiles) Set a listing of project-local build profiles which will modify the build process when activated.void
Set specification for the SCM used by the project, such as CVS, Subversion, etc.void
Set the URL to the project's homepage.void
setVersion
(String version) Set the current version of the artifact produced by this project.Methods inherited from class org.apache.maven.model.ModelBase
addDependency, addModule, addPluginRepository, addProperty, addRepository, getDependencies, getDependencyManagement, getDistributionManagement, getModules, getPluginRepositories, getProperties, getReporting, getReports, getRepositories, removeDependency, removeModule, removePluginRepository, removeRepository, setDependencies, setDependencyManagement, setDistributionManagement, setModules, setPluginRepositories, setProperties, setReporting, setReports, setRepositories
-
Field Details
-
modelVersion
Declares to which version of project descriptor this POM conforms. -
parent
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. -
groupId
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
). -
artifactId
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. -
version
The current version of the artifact produced by this project. -
packaging
The type of artifact this project produces, for examplejar
war
ear
pom
. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types. -
name
The full name of the project. -
description
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. -
url
The URL to the project's homepage. -
inceptionYear
The year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational. -
organization
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). -
licenses
Field licenses. -
mailingLists
Field mailingLists. -
developers
Field developers. -
contributors
Field contributors. -
issueManagement
The project's issue management system information. -
scm
Specification for the SCM used by the project, such as CVS, Subversion, etc. -
ciManagement
The project's continuous integration information. -
prerequisites
Describes the prerequisites in the build environment for this project. -
build
Information required to build the project. -
profiles
Field profiles. -
modelEncoding
Field modelEncoding.
-
-
Constructor Details
-
Model
public Model()
-
-
Method Details
-
addContributor
Method addContributor.- Parameters:
contributor
-
-
addDeveloper
Method addDeveloper.- Parameters:
developer
-
-
addLicense
Method addLicense.- Parameters:
license
-
-
addMailingList
Method addMailingList.- Parameters:
mailingList
-
-
addProfile
Method addProfile.- Parameters:
profile
-
-
getArtifactId
Get 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
-
getBuild
Get information required to build the project.- Returns:
- Build
-
getCiManagement
Get the project's continuous integration information.- Returns:
- CiManagement
-
getContributors
Method getContributors.- Returns:
- List
-
getDescription
Get 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
-
getDevelopers
Method getDevelopers.- Returns:
- List
-
getGroupId
Get 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
-
getInceptionYear
Get 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
-
getIssueManagement
Get the project's issue management system information.- Returns:
- IssueManagement
-
getLicenses
Method getLicenses.- Returns:
- List
-
getMailingLists
Method getMailingLists.- Returns:
- List
-
getModelEncoding
Get the modelEncoding field.- Returns:
- String
-
getModelVersion
Get declares to which version of project descriptor this POM conforms.- Returns:
- String
-
getName
Get the full name of the project.- Returns:
- String
-
getOrganization
Get 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
-
getPackaging
Get the type of artifact this project produces, for examplejar
war
ear
pom
. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.- Returns:
- String
-
getParent
Get 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
-
getPrerequisites
Get describes the prerequisites in the build environment for this project.- Returns:
- Prerequisites
-
getProfiles
Method getProfiles.- Returns:
- List
-
getScm
Get specification for the SCM used by the project, such as CVS, Subversion, etc.- Returns:
- Scm
-
getUrl
Get the URL to the project's homepage.- Returns:
- String
-
getVersion
Get the current version of the artifact produced by this project.- Returns:
- String
-
removeContributor
Method removeContributor.- Parameters:
contributor
-
-
removeDeveloper
Method removeDeveloper.- Parameters:
developer
-
-
removeLicense
Method removeLicense.- Parameters:
license
-
-
removeMailingList
Method removeMailingList.- Parameters:
mailingList
-
-
removeProfile
Method removeProfile.- Parameters:
profile
-
-
setArtifactId
Set 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
-
-
setBuild
Set information required to build the project.- Parameters:
build
-
-
setCiManagement
Set the project's continuous integration information.- Parameters:
ciManagement
-
-
setContributors
Set describes the contributors to a project that are not yet committers.- Parameters:
contributors
-
-
setDescription
Set 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
-
-
setDevelopers
Set describes the committers of a project.- Parameters:
developers
-
-
setGroupId
Set 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
-
-
setInceptionYear
Set 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
-
-
setIssueManagement
Set the project's issue management system information.- Parameters:
issueManagement
-
-
setLicenses
Set this element describes all of the licenses for this project. Each license is described by alicense
element, 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
-
-
setMailingLists
Set contains information about a project's mailing lists.- Parameters:
mailingLists
-
-
setModelEncoding
Set the modelEncoding field.- Parameters:
modelEncoding
-
-
setModelVersion
Set declares to which version of project descriptor this POM conforms.- Parameters:
modelVersion
-
-
setName
Set the full name of the project.- Parameters:
name
-
-
setOrganization
Set 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
-
-
setPackaging
Set the type of artifact this project produces, for examplejar
war
ear
pom
. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.- Parameters:
packaging
-
-
setParent
Set 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
-
-
setPrerequisites
Set describes the prerequisites in the build environment for this project.- Parameters:
prerequisites
-
-
setProfiles
Set a listing of project-local build profiles which will modify the build process when activated.- Parameters:
profiles
-
-
setScm
Set specification for the SCM used by the project, such as CVS, Subversion, etc.- Parameters:
scm
-
-
setUrl
Set the URL to the project's homepage.- Parameters:
url
-
-
setVersion
Set the current version of the artifact produced by this project.- Parameters:
version
-
-
getId
- Returns:
- the model id as
groupId:artifactId:packaging:version
-