Maven's model for Java project.
- - -
- The <project>
element specifies various attributes
- about a project. This is the root element of the project descriptor.
- The following table lists all of the possible child elements. Child
- elements with children are then documented further in subsequent
- sections.
-
Element | -Description | -
---|---|
- parent
- |
- Information on which parent POM to extend. | -
- modelVersion
- |
- Declares to which version of project descriptor this POM conforms. | -
- groupId
- |
- - The short name of the project group. This value is used to group - all jars for a project in one directory. For more info look at the - user guide. - | -
- artifactId
- |
-
- The short name of the project. This value is used in conjunction
- with groupId
- when naming jars and
- distribution files.
- |
-
- packaging
- |
- The type of artifact this project produces. | -
- modules
- |
- The modules to build in addition to the current project | -
- name
- |
- - The full name of the project. This value is used when - generating JavaDoc - titles. - | -
- version
- |
- - The current version of the artifact produced by this project. - | -
- description
- |
-
- Optional. A detailed description of the project.
- This description is used as the default to generate the
- Mailing Lists of the project's
- web site, and is shown when maven --usage is called on
- the project. While this element can be specified as CDATA to enable
- the use of HTML tags within the description, you are encouraged to
- provide an alternative home page using xdocs/index.xml
- if this is required.
- |
-
- url
- |
- - The URL to the project's homepage. - | -
- issueManagement
- |
- The project's issue management information. | -
- ciManagement
- |
- The project's continuous integration management information. | -
- inceptionYear
- |
- - The year of the project's inception specified with 4 digits. - This value is used when generating - JavaDoc copyright notices. - | -
- repositories
- |
- The lists of the remote repositories | -
- pluginRepositories
- |
- The lists of the remote repositories for discovering plugins | -
- mailingLists
- |
- - Contains information about a project's mailing lists. This - is used to generate the front - page of the site's web site. - | -
- developers
- |
- - Describes the committers to a project. This is used to - generate the Project Team - page of the project's web site. - | -
- contributors
- |
- - Describes the contributors to a project. This is used to generate - the Project Team page of - the project's web site. - | -
- dependencies
- |
-
-
- This element describes all of the dependencies associated with a
- project. Each dependency is described by a
- - These dependencies are used to construct a classpath for your - project during the build process. - -- Maven can automatically download these dependencies from a - remote repository. - -
- The filename that Maven downloads from the repository is
- - When Maven goes looking for a dependency in the remote repository, - it uses the dependency element to construct the URL to download - from. This URL is defined as: - -
-
- ${repo}/${groupId}/${type}s/${artifactId}-${version}.${type}- - Where - -
|
-
- licenses
- |
-
- This element describes all of the licenses for this project.
- Each license is described by a license element, which
- is then described by additional elements (described below). The
- auto-generated site documentation references this information.
- Projects should only list the license(s) that applies to the project
- and not the licenses that apply to dependencies.
- |
-
- reports
- |
-
- This element includes the specification of reports to be
- included in a Maven-generated site. These reports will be run
- when a user executes maven site . All of the
- reports will be included in the navigation bar for browsing in
- the order they are specified.
- |
-
- scm
- |
- Specification for the SCM used by the project. | -
- build
- |
- Information required to build the project. | -
- organization
- |
- - This element describes various attributes of the organziation to - which the project belongs. These attributes are utilized when - documentation is created (for copyright notices and links). - | -
- distributionManagement
- |
- Distribution information for a project. | -
- dependencyManagement
- |
- - Default dependency information for grouped projects inheriting from - this one. The dependency information here will not be checked. - Instead, when a POM derived from this one declares a dependency - described by a groupId and an artifactId (version not necessary), - the entries in here will supply default values for that dependency. - Any locally-supplied information for a particular dependency will - overwrite any information specified here for that project. - | -
Element | -Description | -
---|---|
- artifactId
- |
- The artifact id of the project to extend. | -
- groupId
- |
- The group id of the project to extend. | -
- version
- |
- The version of the project to extend. | -
- Information about the bugtracking system used to manage this project. -
-Element | -Description | -
---|---|
- system
- |
- The name of the issue management system i.e. Bugzilla | -
- url
- |
- Url for the issue management system used by the project. | -
Element | -Description | -
---|---|
- system
- |
- The name of the continuous integration system i.e. Bugzilla | -
- url
- |
- Url for the continuous integration system used by the project. | -
- notifiers
- |
- - Configuration for notifying developers/users when a build is - unsuccessful, including user information and notification mode. - | -
- Configures one method for notifying users/developers when a build breaks. -
-Element | -Description | -
---|---|
- type
- |
- The mechanism used to deliver notifications. | -
- address
- |
- - Where to send the notification to - eg email address - | -
- configuration
- |
- Extended configuration specific to this notifier goes here. | -
- Repository contains the information needed - for establishing connections with remote repoistory -
-Element | -Description | -
---|---|
- id
- |
- - A unique identifier for a repository. - | -
- name
- |
- - Human readable name of the repository - | -
- url
- |
- - The url of the repository - | -
- snapshotPolicy
- |
- - The policy for downloading snapshots - can be "always", "daily" (default), "interval:XXX" (in minutes) or - "never". - | -
- layout
- |
- The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default". | -
- This element describes all of the mailing lists associated with
- a project. Each mailing list is described by a
- mailingList
element, which is then described by
- additional elements (described below). The auto-generated site
- documentation references this information.
-
Element | -Description | -
---|---|
- name
- |
- The name of the mailing list. | -
- subscribe
- |
-
- The email address or link that can be used to subscribe to the mailing list.
- If this is an email address, a
- mailto: link will automatically be created when
- the documentation is created.
- |
-
- unsubscribe
- |
-
- The email address or link that can be used to unsubscribe to
- the mailing list. If this is an email address, a
- mailto: link will automatically be created
- when the documentation is created.
- |
-
- post
- |
-
- The email address or link that can be used to post to
- the mailing list. If this is an email address, a
- mailto: link will automatically be created
- when the documentation is created.
- |
-
- archive
- |
- - The link to a URL where you can browse the mailing list archive. - | -
- otherArchives
- |
- - The link to other URLs where you can browse the list archive. - | -
- Information about one of the committers on this project. Derived from
- Contributor
.
-
Element | -Description | -
---|---|
- id
- |
- The username of the developer. | -
- Description of a person who has contributed to the project, but who does - not have commit privileges. Usually, these contributions come in the - form of patches submitted. -
-Element | -Description | -
---|---|
- name
- |
- The full name of the contributor. | -
- email
- |
- The email address of the contributor. | -
- url
- |
- The URL for the homepage of the contributor. | -
- organization
- |
- The organization to which the contributor belongs. | -
- roles
- |
-
- The roles the contributor plays in the project. Each role is
- described by a role element, the body of which is a
- role name.
- |
-
- timezone
- |
- - The timezone the contributor is in. This is a number in the range -11 to 12. - | -
Element | -Description | -
---|---|
- groupId
- |
-
- The project group that produced the dependency, e.g.
- geronimo .
- |
-
- artifactId
- |
-
- The unique id for an artifact produced by the project group, e.g.
- germonimo-jms
- |
-
- version
- |
-
- The version of the dependency, e.g. 3.2.1
- |
-
- type
- |
-
- The type of dependency. This defaults to jar .
- Known recognised dependency types are:
-
|
-
- scope
- |
- - The scope of the dependency - compile, runtime, test. Used to - calculate the various classpaths used for testing, etc. and for - determining which artifacts to include in a distribution of this - project. - | -
- Describes the licenses for this project. This is used to generate - the License page of - the project's web site. Typically the licenses listed for the project - are that of the project itself, and not of dependencies. -
-Element | -Description | -
---|---|
- name
- |
- The full legal name of the license. | -
- url
- |
- The official url for the license text. | -
- distribution
- |
-
- The primary method by which this project may be distributed.
-
|
-
- comments
- |
- - Addendum information pertaining to this license. - | -
Section for management of reports and configuration
-Element | -Description | -
---|---|
- outputDirectory
- |
- Where to store all of the generated reports | -
- plugins
- |
- The reporting plugins to use and their configuration | -
Element | -Description | -
---|---|
- groupId
- |
- No description. | -
- artifactId
- |
- No description. | -
- version
- |
- The version of the plugin to be used. | -
- configuration
- |
- No description. | -
- goals
- |
- No description. | -
Element | -Description | -
---|---|
- id
- |
- No description. | -
- configuration
- |
- No description. | -
Element | -Description | -
---|---|
- connection
- |
- - The source configuration management system URL - that describes the repository and how to connect to the - repository. This is used by Maven when - building versions - from specific ID. - | -
- developerConnection
- |
- - Just like connection, but for developers, i.e. this scm connection - will not be read only. - | -
- url
- |
- The URL to the project's browsable CVS repository. | -
Element | -Description | -
---|---|
- sourceDirectory
- |
- - This element specifies a directory containing the source - of the project. The generated build system will compile - the source in this directory when the project is built. - The path given is relative to the project descriptor. - | -
- scriptSourceDirectory
- |
- - This element specifies a directory containing the script sources - of the project. This directory is meant to be different from the - sourceDirectory, in that its contents will be copied to the output - directory in most cases (since scripts are interpreted rather than - compiled). - | -
- testSourceDirectory
- |
- - This element specifies a directory containing the unit test - source of the project. The generated build system will - compile these directories when the project is being tested. - The unit tests must use the JUnit test framework. - The path given is relative to the project descriptor. - | -
- resources
- |
- - This element describes all of the resources associated with a - project or unit tests. Each resource is described by a resource - element, which is then described by additional elements (described - below). These resources are used to complete - the jar file or to run unit test. - | -
- testResources
- |
- - This element describes all of the resources associated with a - project's unit tests. Each resource is described by a resource - element, which is then described by additional elements (described - below). These resources are used to complete - the jar file or to run unit test. - | -
- directory
- |
- - The directory where all files generated by the build is placed. - | -
- outputDirectory
- |
- - The directory where compiled application classes are placed. - | -
- finalName
- |
- - The filename (including an extension, but with no path information) that the produced artifact - will be called. The default value is artifactId-version.extension (where extension is derived from - type). - | -
- testOutputDirectory
- |
- - The directory where compiled test classes are placed. - | -
- pluginManagement
- |
- - Default plugin information to be made available for reference by - projects derived from this one. This plugin configuration will not - be validated or bound to the lifecycle unless referenced. Any local - configuration for a given plugin will override the plugin's entire - definition here. - | -
- This element describes all of the resources associated with a project or - unit tests. Each resource is described by a resource element, which is - then described by additional elements (described - below). These resources are used to complete the - jar file or to run unit test. -
-Element | -Description | -
---|---|
- targetPath
- |
-
- Describe the resource target path. For example, if you want that
- resource appear into a specific package
- (org.apache.maven.messages ), you must specify this
- element with this value : org/apache/maven/messages
- |
-
- Section for management of default plugin information for use in a group of POMs. -
-Element | -Description | -
---|
Specifies the organization who produces this project.
-Element | -Description | -
---|---|
- name
- |
- The full name of the organization. | -
- url
- |
- The URL to the organization's home page. | -
- This elements describes all that pertains to distribution for a project. - It is primarily used for deployment of artifacts and distributions - produced by the build. -
-Element | -Description | -
---|---|
- repository
- |
- - Information needed for deploying to remote repository artifacts - generated by the project - | -
- site
- |
- - Information needed for deploying website files of the project. - | -
- downloadUrl
- |
-
- The URL of the project's download page. If not given users will be referred to the homepage given by
- url .
- |
-
- Site contains the information needed - for deploying websites. -
-Element | -Description | -
---|---|
- id
- |
- - A unique identifier for a deployment locataion. - | -
- name
- |
- - Human readable name of the deployment location - | -
- url
- |
- - The url of the location where website is deployed - | -
- Section for management of default dependency information for use in a group of POMs. -
-Element | -Description | -
---|---|
- dependencies
- |
- - The dependencies specified here are not validated until they - are referenced in a POM within the group. This allows the - specification of a "standard" version for a particular - dependency. - | -
- User-specific configuration for maven. Includes things that should not - be distributed with the pom.xml file, such as developer identity, along with - local settings, like proxy information.
- - -Root element of the user configuration file.
-Element | -Description | -
---|---|
- proxies
- |
- - Configuration for different proxy profiles. Multiple proxy profiles - might come in handy for anyone working from a notebook or other - mobile platform, to enable easy switching of entire proxy - configurations by simply specifying the profile id, again either from - the command line or from the defaults section below. - | -
- servers
- |
- - Configuration of server-specific settings, mainly authentication - method. This allows configuration of authentication on a per-server - basis. - | -
- mirrors
- |
- - Configuration of download mirrors for repositories. - | -
- profiles
- |
- - Configuration for different runtime profiles for maven itself. For - example, this will allow plugin developers to switch from a "work" - local repository to a "testing" local repository. It may also allow - configuration of such things as password keystore, etc. Once again, - the active profile will be switchable via either the defaults section - or the command line (read: system properties). - | -
Element | -Description | -
---|---|
- active
- |
- Whether this proxy configuration is the active one. | -
- protocol
- |
- The proxy protocol. | -
- username
- |
- The proxy user. | -
- password
- |
- The proxy password. | -
- port
- |
- The proxy port. | -
- host
- |
- The proxy host. | -
- nonProxyHosts
- |
- - The list of non-proxied hosts (usually - comma-delimited). - | -
Element | -Description | -
---|---|
- id
- |
- - The ID of this configuration for indicating the default or "active" - profile. - | -
- username
- |
- The username used to authenticate. | -
- password
- |
- - The password used in conjunction with the username to authenticate. - | -
- privateKey
- |
- The private key location used to authenticate. | -
- passphrase
- |
- - The passphrase used in conjunction with the privateKey to authenticate. - | -
- A download mirror for a given repository. -
-Element | -Description | -
---|---|
- id
- |
- - The server ID of this mirror. This must -not- be the same as that of the repository you are mirroring. - | -
- mirrorOf
- |
- - The server ID of the repository being mirrored, eg "central". - | -
- name
- |
- - The optional name that describes the mirror. - | -
- url
- |
- - The URL of the mirror repository. - | -
Element | -Description | -
---|---|
- active
- |
- Whether this is the active maven profile. | -
- localRepository
- |
- The local repository. | -
- offline
- |
- Indicate whether maven should operate in offline mode full-time. | -