public class Model extends ModelBase implements java.io.Serializable, java.lang.Cloneable
<project>
element is the root of
the descriptor.
The following table lists all of the possible child
elements.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
artifactId
The identifier for this artifact that is unique within the
group given by the
group ID.
|
private Build |
build
Information required to build the project.
|
private java.lang.String |
childProjectUrlInheritAppendPath
When children inherit from project's url, append
path or not? Note: While the type
of this field is
String for
technical reasons, the semantic type is actually
Boolean
Default value is: true
Since: Maven 3.6.1 . |
private CiManagement |
ciManagement
The project's continuous integration information.
|
private java.util.List<Contributor> |
contributors
Field contributors.
|
private java.lang.String |
description
A detailed description of the project, used by Maven
whenever it needs to
describe the project, such as on the web site.
|
private java.util.List<Developer> |
developers
Field developers.
|
private java.lang.String |
groupId
A universally unique identifier for a project.
|
private java.lang.String |
inceptionYear
The year of the project's inception, specified with 4
digits.
|
private IssueManagement |
issueManagement
The project's issue management system information.
|
private java.util.List<License> |
licenses
Field licenses.
|
private java.util.List<MailingList> |
mailingLists
Field mailingLists.
|
private java.lang.String |
modelEncoding
Field modelEncoding.
|
private java.lang.String |
modelVersion
Declares to which version of project descriptor this POM
conforms.
|
private java.lang.String |
name
The full name of the project.
|
private Organization |
organization
This element describes various attributes of the
organization to which the
project belongs.
|
private java.lang.String |
packaging
The type of artifact this project produces, for
example
jar
war
ear
pom . |
private Parent |
parent
The location of the parent project, if one exists.
|
private java.io.File |
pomFile
The POM from which this model originated.
|
private Prerequisites |
prerequisites
Describes the prerequisites in the build environment for
this project.
|
private java.util.List<Profile> |
profiles
Field profiles.
|
private Scm |
scm
Specification for the SCM used by the project, such as CVS,
Subversion, etc.
|
private java.lang.String |
url
The URL to the project's homepage.
|
private java.lang.String |
version
The current version of the artifact produced by this project.
|
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
void |
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.
|
Model |
clone()
Method clone.
|
private void |
cloneHook(Model copy) |
java.lang.String |
getArtifactId()
Get the identifier for this artifact that is unique within
the group given by the
group ID.
|
Build |
getBuild()
Get information required to build the project.
|
java.lang.String |
getChildProjectUrlInheritAppendPath()
Get when children inherit from project's url, append path or
not? Note: While the type
of this field is
String for
technical reasons, the semantic type is actually
Boolean
Default value is: true
Since: Maven 3.6.1. |
CiManagement |
getCiManagement()
Get the project's continuous integration information.
|
java.util.List<Contributor> |
getContributors()
Method getContributors.
|
java.lang.String |
getDescription()
Get a detailed description of the project, used by Maven
whenever it needs to
describe the project, such as on the web site.
|
java.util.List<Developer> |
getDevelopers()
Method getDevelopers.
|
java.lang.String |
getGroupId()
Get a universally unique identifier for a project.
|
java.lang.String |
getId() |
java.lang.String |
getInceptionYear()
Get the year of the project's inception, specified with 4
digits.
|
IssueManagement |
getIssueManagement()
Get the project's issue management system information.
|
java.util.List<License> |
getLicenses()
Method getLicenses.
|
java.util.List<MailingList> |
getMailingLists()
Method getMailingLists.
|
java.lang.String |
getModelEncoding()
Get the modelEncoding field.
|
java.lang.String |
getModelVersion()
Get declares to which version of project descriptor this POM
conforms.
|
java.lang.String |
getName()
Get the full name of the project.
|
Organization |
getOrganization()
Get this element describes various attributes of the
organization to which the
project belongs.
|
java.lang.String |
getPackaging()
Get the type of artifact this project produces, for example
jar
war
ear
pom . |
Parent |
getParent()
Get the location of the parent project, if one exists.
|
java.io.File |
getPomFile()
Gets the POM file for the corresponding project (if any).
|
Prerequisites |
getPrerequisites()
Get describes the prerequisites in the build environment for
this project.
|
java.util.List<Profile> |
getProfiles()
Method getProfiles.
|
java.io.File |
getProjectDirectory()
Gets the base directory for the corresponding project (if any).
|
Scm |
getScm()
Get specification for the SCM used by the project, such as
CVS, Subversion, etc.
|
java.lang.String |
getUrl()
Get the URL to the project's homepage.
|
java.lang.String |
getVersion()
Get the current version of the artifact produced by this
project.
|
boolean |
isChildProjectUrlInheritAppendPath() |
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(java.lang.String artifactId)
Set the identifier for this artifact that is unique within
the group given by the
group ID.
|
void |
setBuild(Build build)
Set information required to build the project.
|
void |
setChildProjectUrlInheritAppendPath(boolean childProjectUrlInheritAppendPath) |
void |
setChildProjectUrlInheritAppendPath(java.lang.String childProjectUrlInheritAppendPath)
Set when children inherit from project's url, append path or
not? Note: While the type
of this field is
String for
technical reasons, the semantic type is actually
Boolean
Default value is: true
Since: Maven 3.6.1. |
void |
setCiManagement(CiManagement ciManagement)
Set the project's continuous integration information.
|
void |
setContributors(java.util.List<Contributor> contributors)
Set describes the contributors to a project that are not yet
committers.
|
void |
setDescription(java.lang.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(java.util.List<Developer> developers)
Set describes the committers of a project.
|
void |
setGroupId(java.lang.String groupId)
Set a universally unique identifier for a project.
|
void |
setInceptionYear(java.lang.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(java.util.List<License> licenses)
Set this element describes all of the licenses for this
project.
|
void |
setMailingLists(java.util.List<MailingList> mailingLists)
Set contains information about a project's mailing lists.
|
void |
setModelEncoding(java.lang.String modelEncoding)
Set the modelEncoding field.
|
void |
setModelVersion(java.lang.String modelVersion)
Set declares to which version of project descriptor this POM
conforms.
|
void |
setName(java.lang.String name)
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(java.lang.String packaging)
Set the type of artifact this project produces, for example
jar
war
ear
pom . |
void |
setParent(Parent parent)
Set the location of the parent project, if one exists.
|
void |
setPomFile(java.io.File pomFile) |
void |
setPrerequisites(Prerequisites prerequisites)
Set describes the prerequisites in the build environment for
this project.
|
void |
setProfiles(java.util.List<Profile> profiles)
Set a listing of project-local build profiles which will
modify the build process
when activated.
|
void |
setScm(Scm scm)
Set specification for the SCM used by the project, such as
CVS, Subversion, etc.
|
void |
setUrl(java.lang.String url)
Set the URL to the project's homepage.
|
void |
setVersion(java.lang.String version)
Set the current version of the artifact produced by this
project.
|
java.lang.String |
toString() |
addDependency, 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
private java.lang.String modelVersion
private Parent parent
private java.lang.String groupId
org.apache.maven
).private java.lang.String artifactId
private java.lang.String version
private java.lang.String packaging
jar
war
ear
pom
.
Plugins can create their own packaging, and
therefore their own packaging types,
so this list does not contain all possible
types.private java.lang.String name
private java.lang.String description
private java.lang.String url
child.project.url.inherit.append.path="false"
private java.lang.String childProjectUrlInheritAppendPath
String
for
technical reasons, the semantic type is actually
Boolean
true
private java.lang.String inceptionYear
private Organization organization
private java.util.List<License> licenses
private java.util.List<Developer> developers
private java.util.List<Contributor> contributors
private java.util.List<MailingList> mailingLists
private Prerequisites prerequisites
private Scm scm
private IssueManagement issueManagement
private CiManagement ciManagement
private Build build
private java.util.List<Profile> profiles
private java.lang.String modelEncoding
private java.io.File pomFile
public void addContributor(Contributor contributor)
contributor
- public void addDeveloper(Developer developer)
developer
- public void addLicense(License license)
license
- public void addMailingList(MailingList mailingList)
mailingList
- public void addProfile(Profile profile)
profile
- public java.lang.String getArtifactId()
public Build getBuild()
public java.lang.String getChildProjectUrlInheritAppendPath()
String
for
technical reasons, the semantic type is actually
Boolean
true
public CiManagement getCiManagement()
public java.util.List<Contributor> getContributors()
public java.lang.String getDescription()
public java.util.List<Developer> getDevelopers()
public java.lang.String getGroupId()
org.apache.maven
).public java.lang.String getInceptionYear()
public IssueManagement getIssueManagement()
public java.util.List<License> getLicenses()
public java.util.List<MailingList> getMailingLists()
public java.lang.String getModelEncoding()
public java.lang.String getModelVersion()
public java.lang.String getName()
public Organization getOrganization()
public java.lang.String getPackaging()
jar
war
ear
pom
.
Plugins can create their own packaging, and
therefore their own packaging types,
so this list does not contain all possible
types.public Parent getParent()
public Prerequisites getPrerequisites()
public java.util.List<Profile> getProfiles()
public Scm getScm()
public java.lang.String getUrl()
child.project.url.inherit.append.path="false"
public java.lang.String getVersion()
public void removeContributor(Contributor contributor)
contributor
- public void removeDeveloper(Developer developer)
developer
- public void removeLicense(License license)
license
- public void removeMailingList(MailingList mailingList)
mailingList
- public void removeProfile(Profile profile)
profile
- public void setArtifactId(java.lang.String artifactId)
artifactId
- public void setBuild(Build build)
build
- public void setChildProjectUrlInheritAppendPath(java.lang.String childProjectUrlInheritAppendPath)
String
for
technical reasons, the semantic type is actually
Boolean
true
childProjectUrlInheritAppendPath
- public void setCiManagement(CiManagement ciManagement)
ciManagement
- public void setContributors(java.util.List<Contributor> contributors)
contributors
- public void setDescription(java.lang.String description)
description
- public void setDevelopers(java.util.List<Developer> developers)
developers
- public void setGroupId(java.lang.String groupId)
org.apache.maven
).groupId
- public void setInceptionYear(java.lang.String inceptionYear)
inceptionYear
- public void setIssueManagement(IssueManagement issueManagement)
issueManagement
- public void setLicenses(java.util.List<License> licenses)
license
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.licenses
- public void setMailingLists(java.util.List<MailingList> mailingLists)
mailingLists
- public void setModelEncoding(java.lang.String modelEncoding)
modelEncoding
- public void setModelVersion(java.lang.String modelVersion)
modelVersion
- public void setName(java.lang.String name)
name
- public void setOrganization(Organization organization)
organization
- public void setPackaging(java.lang.String packaging)
jar
war
ear
pom
.
Plugins can create their own packaging, and
therefore their own packaging types,
so this list does not contain all possible
types.packaging
- public void setParent(Parent parent)
parent
- public void setPrerequisites(Prerequisites prerequisites)
prerequisites
- public void setProfiles(java.util.List<Profile> profiles)
profiles
- public void setScm(Scm scm)
scm
- public void setUrl(java.lang.String url)
child.project.url.inherit.append.path="false"
url
- public void setVersion(java.lang.String version)
version
- private void cloneHook(Model copy)
public java.io.File getPomFile()
null
if this model does not belong to a local
project (e.g. describes the metadata of some artifact from the repository).public void setPomFile(java.io.File pomFile)
public java.io.File getProjectDirectory()
null
if this model does not belong to a local
project (e.g. describes the metadata of some artifact from the repository).public java.lang.String getId()
groupId:artifactId:packaging:version
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isChildProjectUrlInheritAppendPath()
public void setChildProjectUrlInheritAppendPath(boolean childProjectUrlInheritAppendPath)