#class_issueManagementhtml
所述 <project> 元素是描述符的根。下表列出了全部可能的子元素。java
modelVersion:String:声明此POM符合哪一个版本的项目描述符。git
parent:Parent:父项目的位置(若是存在)。若是未指定,则父项目中的值将是此项目的默认值。该位置以组ID,工件ID和版本的形式给出。github
groupId:String:项目的通用惟一标识符。使用彻底限定的包名称以区别于具备相似名称的其余项目(例如org.apache.maven)是正常的。web
artifactId:String:此工件的标识符在组ID指定的组中是惟一的。工件是由项目生成或使用的东西。Maven为项目生成的工件示例包括:JAR,源和二进制分发以及WAR。apache
version:String:此项目生成的工件的当前版本。windows
packaging:String:这个项目产生的神器类型,例如jar war ear pom。插件能够建立本身的包装,所以也能够建立本身的包装类型,所以该列表不包含全部可能的类型。api
name:String:项目的全名。服务器
description:String:项目的详细描述,Maven在须要描述项目时使用,例如在网站上。虽然能够将此元素指定为CDATA以在说明中使用HTML标记,但不鼓励容许纯文本表示。若是须要修改生成的网站的索引页面,则能够指定本身的索引页面,而不是调整此文本。app
url:String:项目主页的URL。
默认值为:父值[+路径调整] +(artifactId或 project.directory属性)
inceptionYear:String:项目开始的那一年,用4位数字指定。在生成版权声明和信息时使用此值。
organization:Organization:此元素描述项目所属组织的各类属性。建立文档时使用这些属性(用于版权声明和连接)。
licenses/license*:List<License>:(不少)此元素描述了此项目的全部许可证。每一个许可证都由 许可证元素描述,而后由其余元素描述。项目应仅列出适用于项目的许可证,而不是列出适用于依赖项的许可证。若是列出了多个许可证,则假定用户能够选择其中任何一个,而不是他们必须接受全部许可证。
developers/developer*:List<Developer>:(不少)描述项目的提交者。
contributors/contributor*:List<Contributor>:(不少)描述了还没有提交的项目的贡献者。
mailingLists/mailingList*:List<MailingList>:(不少)包含有关项目邮件列表的信息。
prerequisites:Prerequisites:描述此项目的构建环境中的先决条件。
modules/module*:List<String>:(不少)做为该项目的一部分构建的模块(有时称为子项目)。列出的每一个模块都是包含该模块的目录的相对路径。为了与从父计算默认URL的方式一致,建议使模块名称与工件ID匹配。
scm:Scm:项目使用的SCM规范,如CVS,Subversion等。
issueManagement:IssueManagement:该项目的问题管理系统信息。
ciManagement:CiManagement:该项目的持续整合信息。
distributionManagement:DistributionManagement:项目的分发信息,能够分别将站点和工件部署到远程Web服务器和存储库。
properties/key=value*:Properties:(多个)能够在整个POM中用做替换的属性,并在启用时用做资源中的过滤器。格式为 <name> value </ name>。
dependencyManagement:DependencyManagement:从这个项目继承的项目的默认依赖项信息。本节中的依赖项不会当即解决。相反,当从这个派生的POM声明由匹配的groupId和artifactId描述的依赖关系时,若是还没有指定该依赖关系,则此部分的版本和其余值将用于该依赖关系。
dependencies/dependency*:List<Dependency>:(不少)此元素描述与项目关联的全部依赖项。这些依赖项用于在构建过程当中为项目构造类路径。它们会自动今后项目中定义的存储库下载。有关更多信息,请参阅 依赖性机制。
repositories/repository*:List<Repository>:(多个)用于发现依赖关系和扩展的远程存储库的列表。
pluginRepositories/pluginRepository*:List<Repository>:(多个)用于发现构建和报告的插件的远程存储库的列表。
build:Build:构建项目所需的信息。
reports:DOM:不推荐。如今被Maven忽略了。
reporting:Reporting:此元素包括用于在Maven生成的站点上生成报告的报告插件的规范。当用户执行mvn站点时,将运行这些报告 。全部报告都将包含在导航栏中以供浏览。
profiles/profile*:List<Profile>:(不少)项目本地构建配置文件的列表,它将在激活时修改构建过程。
所述 <parent>元素包含以定位父项目从该项目将继承所需的信息。 注意:此元素的子元素不是插值的,必须以文字值的形式给出
groupId:String:要继承的父项目的组ID。
artifactId:String:要继承的父项目的工件ID。
version:String:要继承的父项目的版本。
relativePath:String:签出中父pom.xml文件的相对路径 。若是未指定,则默认为../pom.xml。Maven首先在文件系统上的这个位置查找父POM,而后是本地存储库,最后在远程仓库中查找。 relativePath容许您选择不一样的位置,例如,当您的结构是平的时,或者更深,没有中间父POM。可是,组ID,工件ID和版本仍然是必需的,而且必须与给定位置中的文件匹配,不然它将恢复为POM的存储库。此功能仅用于加强该项目的本地结账的开发。若是要禁用该功能,请将值设置为空字符串,并始终从存储库中解析父POM。
默认值为:../ pom.xml。
指定生成此项目的组织。
name:String:组织的全名。
url:String:组织主页的URL。
描述此项目的许可证。这用于生成项目网站的许可页面,以及在其余报告和验证中考虑。为项目列出的许可证是项目自己的许可证,而不是依赖项。
name:String:许可证的完整法定名称。
url:String:许可证文本的官方URL。
distribution:String:能够分发此项目的主要方法。
comments:String:有关此许可证的附录信息。
有关此项目的其中一个提交者的信息。
id:String:SCM中开发人员的惟一ID。
name:String:贡献者的全名。
email:String:贡献者的电子邮件地址。
url:String:贡献者主页的URL。
organization:String:贡献者所属的组织。
organizationUrl:String:组织的URL。
roles/role*:List<String>:(不少)贡献者在项目中扮演的角色。每一个角色由角色元素描述,角色元素的主体是角色名称。这也能够用来描述贡献。
timezone:String:贡献者所在的时区。一般,这是-12到 +14范围内的数字, 或者是“America / Montreal”(UTC-05:00)或“Europe / Paris”(UTC + 01)的有效时区ID :00)。
properties/key=value*:Properties:(不少)关于贡献者的属性,例如即时消息句柄。
对项目有贡献但没有提交权限的人员的描述。一般,这些贡献以提交的补丁的形式出现。
name:String:贡献者的全名。
email:String:贡献者的电子邮件地址。
url:String:贡献者主页的URL。
organization:String:贡献者所属的组织。
organizationUrl:String:组织的URL。
roles/role*:List<String>:(不少)贡献者在项目中扮演的角色。每一个角色由角色元素描述,角色元素的主体是角色名称。这也能够用来描述贡献。
timezone:String:贡献者所在的时区。一般,这是-12到 +14范围内的数字, 或者是“America / Montreal”(UTC-05:00)或“Europe / Paris”(UTC + 01)的有效时区ID :00)。
properties/key=value*:Properties:(不少)关于贡献者的属性,例如即时消息句柄。
此元素描述与项目关联的全部邮件列表。自动生成的站点引用此信息。
name:String:邮件列表的名称。
subscribe:String:可用于订阅邮件列表的电子邮件地址或连接。若是这是电子邮件地址, 则在建立文档时将自动建立mailto:连接。
unsubscribe:String:可用于取消订阅邮件列表的电子邮件地址或连接。若是这是电子邮件地址, 则在建立文档时将自动建立mailto:连接。
post:String:可用于发布到邮件列表的电子邮件地址或连接。若是这是电子邮件地址, 则在建立文档时将自动建立mailto:连接。
archive:String:指向您能够浏览邮件列表存档的URL的连接。
otherArchives/otherArchive*:List<String>:(多个)指向备用URL的连接,您能够在其中浏览列表存档。
描述项目能够具备的先决条件。
maven:String:对于插件项目(打包是 maven-plugin),使用生成的插件须要Maven的最低版本。
在Maven 2中,这也指定了构建项目所需的Maven的最低版本,可是这种用法 在Maven 3中已弃用,而再也不被检查:使用 Maven Enforcer插件的requireMavenVersion规则。
默认值为:2.0。
所述 <SCM>元素包含该项目的所需的SCM(源控制管理)信息。
connection:String:源代码管理系统URL,用于描述存储库以及如何链接到存储库。有关更多信息,请参阅 URL格式和 支持的SCM列表。此链接是只读的。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)
developerConnection:String:就像链接同样 ,但对于开发人员来讲,即这个scm链接不会是只读的。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)
tag:String:当前代码的标记。默认状况下,它在开发期间设置为HEAD。
默认值为:HEAD。
url:String:项目可浏览的SCM存储库的URL,例如ViewVC或Fisheye。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)
有关用于管理此项目的问题跟踪(或错误跟踪)系统的信息。
Element | Type | Description |
---|---|---|
system | String | 问题管理系统的名称,例如Bugzilla |
url | String | 项目使用的问题管理系统的URL。 |
所述 <CiManagement>元素包含所需项目的持续集成系统信息。
system:String:持续集成系统的名称,例如 连续统一体。
url:String:项目使用的持续集成系统的URL(若是它具备Web界面)。
notifiers/notifier*:List<Notifier>:(多个)用于在构建不成功时通知开发人员/用户的配置,包括用户信息和通知模式。
配置一种在构建中断时通知用户/开发人员的方法。
type:String:用于传递通知的机制。
默认值为:mail。
sendOnError:boolean:是否发送错误通知。
默认值为:true。
sendOnFailure:boolean:是否在发生故障时发送通知。
默认值为:true。
sendOnSuccess:boolean:是否发送成功通知。
默认值为:true。
sendOnWarning:boolean:是否发送警告通知。
默认值为:true。
address:String:不推荐。在何处发送通知 - 例如电子邮件地址。
configuration/key=value*:Properties:(不少)特定于此通知程序的扩展配置在此处。
此元素描述了与项目分发相关的全部内容。它主要用于部署工件和构建生成的站点。
repository:DeploymentRepository:将项目生成的工件部署到远程存储库所需的信息。
snapshotRepository:DeploymentRepository:何处将工件快照部署到。若是没有给出,则默认为 repository元素。
site:Site:部署项目网站所需的信息。
downloadUrl:String:项目下载页面的URL。若是没有给出用户将被引用到url给出的主页 。这是为了帮助定位因为许可限制而不在存储库中的工件。
relocation:Relocation:工件的重定位信息(若是已移动到新的组ID和/或工件ID)。
status:String:在远程存储库中提供此工件的状态。这不能在您的本地项目中设置,由于它是由放置在reposiory中的工具更新的。有效值包括:无(默认), 转换(存储库管理器从Maven 1 POM转换), 合做伙伴(直接从合做伙伴Maven 2存储库同步), 部署(从Maven 2实例部署), 验证(已手动)验证为正确且最终)。
存储库包含部署到远程存储库所需的信息。
uniqueVersion:boolean:不管分配快照包含时间戳的独特版本和版本号,或者使用相同的版本,每次
默认值是:true。
releases:RepositoryPolicy:如何处理今后存储库下载的版本。
snapshots:RepositoryPolicy:如何处理今后存储库下载快照。
id:String:存储库的惟一标识符。例如,这用于将存储库与settings.xml文件中的配置进行匹配 。此外,在POM继承和配置文件注入期间使用标识符来检测应合并的存储库。
name:String:人类可读的存储库名称。
url:String:存储库的URL,格式为 protocol:// hostname / path。
layout:String:此存储库用于定位和存储工件的布局类型 - 能够是 旧版或 默认版。
默认值为:default。
下载政策。
Element | Type | Description |
---|---|---|
enabled | String | 是否使用此存储库下载此类工件。注意:虽然出于技术缘由,此字段的类型为 String,但语义类型其实是 布尔值。默认值为 true。 |
updatePolicy | String | 下载更新的频率 - 能够是 始终, 天天(默认), 间隔:XXX(以分钟为单位)或 从不(仅在本地不存在时) |
checksumPolicy | String | 验证工件校验和失败时该怎么办。有效值为 ignore, fail或warn(默认值)。 |
下载政策。
Element | Type | Description |
---|---|---|
enabled | String | Whether to use this repository for downloading this type of artifact. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value istrue. |
updatePolicy | String | The frequency for downloading updates - can be always,daily (default), interval:XXX (in minutes) or never (only if it doesn't exist locally). |
checksumPolicy | String | What to do when verification of an artifact checksum fails. Valid values are ignore , fail or warn (the default). |
存储库包含部署到远程存储库所需的信息。
Element | Type | Description |
---|---|---|
uniqueVersion | boolean | Whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time Default value is: true. |
releases | RepositoryPolicy | How to handle downloading of releases from this repository. |
snapshots | RepositoryPolicy | How to handle downloading of snapshots from this repository. |
id | String | A unique identifier for a repository. This is used to match the repository to configuration in thesettings.xml file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged. |
name | String | Human readable name of the repository. |
url | String | The url of the repository, in the formprotocol://hostname/path. |
layout | String | The type of layout this repository uses for locating and storing artifacts - can be legacy or default. Default value is: default. |
包含部署网站所需的信息。
Element | Type | Description |
---|---|---|
id | String | A unique identifier for a deployment location. This is used to match the site to configuration in the settings.xml file, for example. |
name | String | Human readable name of the deployment location. |
url | String | The url of the location where website is deployed, in the formprotocol://hostname/path. Default value is: parent value [+ path adjustment] + (artifactId orproject.directory property) |
描述工件移动到的位置。若是省略任何值,则假定它与以前相同。
Element | Type | Description |
---|---|---|
groupId | String | The group ID the artifact has moved to. |
artifactId | String | The new artifact ID of the artifact. |
version | String | The new version of the artifact. |
message | String | An additional message to show the user about the move, such as the reason. |
用于管理在一组POM中使用的默认依赖关系信息的部分。
Element | Type | Description |
---|---|---|
dependencies/dependency* | List<Dependency> | (Many) The dependencies specified here are not used until they are referenced in a POM within the group. This allows the specification of a "standard" version for a particular dependency. |
所述 <依赖性>元素包含关于该项目的相关性信息。
Element | Type | Description |
---|---|---|
groupId | String | The project group that produced the dependency, e.g. org.apache.maven. |
artifactId | String | The unique id for an artifact produced by the project group, e.g. maven-artifact. |
version | String | The version of the dependency, e.g. 3.2.1. In Maven 2, this can also be specified as a range of versions. |
type | String | The type of dependency. While it usually represents the extension on the filename of the dependency, that is not always the case. A type can be mapped to a different extension and a classifier. The type often corresponds to the packaging used, though this is also not always the case. Some examples are jar, war, ejb-client andtest-jar: see default artifact handlers for a list. New types can be defined by plugins that set extensions to true, so this is not a complete list. Default value is: jar. |
classifier | String | The classifier of the dependency. It is appended to the filename after the version. This allows:
|
scope | String | The scope of the dependency - compile,runtime, test, system, and provided. Used to calculate the various classpaths used for compilation, testing, and so on. It also assists in determining which artifacts to include in a distribution of this project. For more information, see the dependency mechanism. The default scope iscompile. |
systemPath | String | FOR SYSTEM SCOPE ONLY. Note that use of this property is discouraged and may be replaced in later versions. This specifies the path on the filesystem for this dependency. Requires an absolute path for the value, not relative. Use a property that gives the machine specific absolute path, e.g.${java.home}. |
exclusions/exclusion* | List<Exclusion> | (Many) Lists a set of artifacts that should be excluded from this dependency's artifact list when it comes to calculating transitive dependencies. |
optional | String | Indicates the dependency is optional for use of this library. While the version of the dependency will be taken into account for dependency calculation if the library is used elsewhere, it will not be passed on transitively. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is false. |
所述 <排除>元素包含以排除伪影到该项目所需的信息。
Element | Type | Description |
---|---|---|
artifactId | String | The artifact ID of the project to exclude. |
groupId | String | The group ID of the project to exclude. |
存储库包含与远程存储库创建链接所需的信息。
Element | Type | Description |
---|---|---|
releases | RepositoryPolicy | How to handle downloading of releases from this repository. |
snapshots | RepositoryPolicy | How to handle downloading of snapshots from this repository. |
id | String | A unique identifier for a repository. This is used to match the repository to configuration in the settings.xml file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged. |
name | String | Human readable name of the repository. |
url | String | The url of the repository, in the formprotocol://hostname/path. |
layout | String | The type of layout this repository uses for locating and storing artifacts - can be legacy or default. Default value is: default. |
存储库包含与远程存储库创建链接所需的信息。
Element | Type | Description |
---|---|---|
releases | RepositoryPolicy | How to handle downloading of releases from this repository. |
snapshots | RepositoryPolicy | How to handle downloading of snapshots from this repository. |
id | String | A unique identifier for a repository. This is used to match the repository to configuration in the settings.xml file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged. |
name | String | Human readable name of the repository. |
url | String | The url of the repository, in the formprotocol://hostname/path. |
layout | String | The type of layout this repository uses for locating and storing artifacts - can be legacy or default. Default value is: default. |
所述 <build>元素包含创建该项目所需的信息。默认值在Super POM中定义。
sourceDirectory:String:此元素指定包含项目源的目录。生成的构建系统将在构建项目时今后目录编译源。给定的路径是相对于项目描述符的。默认值为src / main / java。
scriptSourceDirectory:String:此元素指定包含项目脚本源的目录。此目录与sourceDirectory的不一样之处在于,在大多数状况下,其内容将被复制到输出目录(由于脚本是解释而不是编译的)。默认值为src / main / scripts。
testSourceDirectory:String:此元素指定包含项目的单元测试源的目录。生成的构建系统将在测试项目时编译这些目录。给定的路径是相对于项目描述符的。默认值为 src / test / java。
outputDirectory:String:放置已编译应用程序类的目录。默认值为target / classes。
testOutputDirectory:String:放置已编译测试类的目录。默认值为target / test-classes。
extensions/extension*:List<Extension>:(不少)从这个项目中使用的一组构建扩展。
defaultGoal:String:当没有为项目指定时,要执行的默认目标(或Maven 2中的阶段)。请注意,在多模块构建的状况下,只有顶级项目的默认目标是相关的,即忽略子模块的默认目标。从Maven 3开始,多个目标/阶段能够用空格分隔。
resources/resource*:List<Resource>:(不少)此元素描述全部类路径资源,例如与项目关联的属性文件。这些资源一般包含在最终包中。默认值为 src / main / resources。
testResources/testResource*:List<Resource>:(不少)此元素描述全部类路径资源,例如与项目的单元测试关联的属性文件。默认值为 src / test / resources。
directory:String:放置构建生成的全部文件的目录。默认值为target。
finalName:String:生成的工件将被调用的文件名(不包括扩展名,没有路径信息)。默认值为 $ {artifactId} - $ {version}。
filters/filter*:List<String>:(多个)启用过滤时使用的过滤器属性文件列表。
pluginManagement:PluginManagement:默认插件信息可供今后项目派生的项目参考。除非引用,不然此插件配置将不会被解析或绑定到生命周期。给定插件的任何本地配置都将覆盖插件的整个定义。
plugins/plugin*:List<Plugin>:(不少)要使用的插件列表。
描述要使用的构建扩展。
Element | Type | Description |
---|---|---|
groupId | String | The group ID of the extension's artifact. |
artifactId | String | The artifact ID of the extension. |
version | String | The version of the extension. |
此元素描述与项目或单元测试关联的全部类路径资源。
Element | Type | Description |
---|---|---|
targetPath | String | Describe the resource target path. The path is relative to the target/classes directory (i.e.${project.build.outputDirectory}). For example, if you want that resource to appear in a specific package ( org.apache.maven.messages), you must specify this element with this value:org/apache/maven/messages. This is not required if you simply put the resources in that directory structure at the source, however. |
filtering | String | Whether resources are filtered to replace tokens with parameterised values or not. The values are taken from the properties element and from the properties in the files listed in the filters element. Note: While the type of this field is String for technical reasons, the semantic type is actuallyBoolean. Default value is false. |
directory | String | Describe the directory where the resources are stored. The path is relative to the POM. |
includes/include* | List<String> | (Many) A list of patterns to include, e.g. **/*.xml. |
excludes/exclude* | List<String> | (Many) A list of patterns to exclude, e.g. **/*.xml |
此元素描述与项目或单元测试关联的全部类路径资源。
Element | Type | Description |
---|---|---|
targetPath | String | Describe the resource target path. The path is relative to the target/classes directory (i.e.${project.build.outputDirectory}). For example, if you want that resource to appear in a specific package ( org.apache.maven.messages), you must specify this element with this value:org/apache/maven/messages. This is not required if you simply put the resources in that directory structure at the source, however. |
filtering | String | Whether resources are filtered to replace tokens with parameterised values or not. The values are taken from the properties element and from the properties in the files listed in the filters element. Note: While the type of this field is String for technical reasons, the semantic type is actuallyBoolean. Default value is false. |
directory | String | Describe the directory where the resources are stored. The path is relative to the POM. |
includes/include* | List<String> | (Many) A list of patterns to include, e.g. **/*.xml. |
excludes/exclude* | List<String> | (Many) A list of patterns to exclude, e.g. **/*.xml |
用于管理在一组POM中使用的默认插件信息的部分。
Element | Type | Description |
---|---|---|
plugins/plugin* | List<Plugin> | (Many) The list of plugins to use. |
所述<plugin>元素包含一个插件所需信息。
groupId:String:存储库中插件的组ID。
默认值为:org.apache.maven.plugins。
artifactId:String:存储库中插件的工件ID。
version:String:要使用的插件的版本(或有效版本范围)。
extensions:String:是否今后插件加载Maven扩展(例如打包和类型处理程序)。出于性能缘由,只应在必要时启用此功能。注意:虽然出于技术缘由,此字段的类型为 String,但语义类型其实是 布尔值。默认值为 false。
executions/execution*:List<PluginExecution>:(不少)在构建生命周期中要执行的一组目标的多个规范,每一个目标都具备(可能)不一样的配置。
dependencies/dependency*:List<Dependency>:(不少)此项目须要引入插件的类加载器的其余依赖项。
goals:DOM:不推荐。未被Maven使用。
inherited:String:是否应将任何配置传播到子POM。注意:虽然出于技术缘由,此字段的类型为 String,但语义类型其实是布尔值。默认值为 true。
所述<execution>元素包含一个插件的执行所须要的信息。
Element | Type | Description |
---|---|---|
id | String | The identifier of this execution for labelling the goals during the build, and for matching executions to merge during inheritance and profile injection. Default value is: default. |
phase | String | The build lifecycle phase to bind the goals in this execution to. If omitted, the goals will be bound to the default phase specified by the plugin. |
goals/goal* | List<String> | (Many) The goals to execute with the given configuration. |
inherited | String | Whether any configuration should be propagated to child POMs. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is true. |
configuration | DOM | The configuration as DOM object. By default, every element content is trimmed, but starting with Maven 3.1.0, you can add xml:space="preserve" to elements you want to preserve whitespace. You can control how child POMs inherit configuration from parent POMs by adding combine.children or combine.self attributes to the children of the configuration element:
See POM Reference documentation and Xpp3DomUtils for more information. |
报告及其配置管理部分。
Element | Type | Description |
---|---|---|
excludeDefaults | String | If true, then the default reports are not included in the site generation. This includes the reports in the "Project Info" menu. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is false. |
outputDirectory | String | Where to store all of the generated reports. The default is${project.build.directory}/site. |
plugins/plugin* | List<ReportPlugin> | (Many) The reporting plugins to use and their configuration. |
所述 <plugin>元素包含报告插件所需信息。
groupId:String:存储库中报告插件的组ID。
默认值为:org.apache.maven.plugins。
artifactId:String:存储库中报告插件的工件ID。
version:String:要使用的报告插件的版本。
reportSets/reportSet*:List<ReportSet>:(多个)一组报告的多个规范,每一个报告具备(可能)不一样的配置。这是与构建中的执行并行的报告 。
inherited:String:是否应将任何配置传播到子POM。注意:虽然出于技术缘由,此字段的类型为 String,但语义类型其实是 布尔值。默认值为 true。
configuration:DOM:配置为DOM对象。
默认状况下,每一个元素内容都会被修剪,但从Maven 3.1.0开始,您能够将xml:space =“preserve”添加到要保留空格的元素中。
您能够经过将combine.children或combine.self属性添加到配置元素的子项来控制子POM如何从父POM继承配置:
combine.children:可用值是merge(默认)和append,
combine.self:可用值是merge(默认)和override。
有关更多信息,请参阅POM参考文档和Xpp3DomUtils。
表示用于生成它们的一组报告和配置。
id:String:此报告集的惟一ID,用于在POM继承和概要文件注入期间用于合并报告集。
默认值为:default。
reports/report*:List<String>:(不少)此插件的报告列表应该今后集合生成。
inherited:String:是否应将任何配置传播到子POM。注意:虽然出于技术缘由,此字段的类型为String,但语义类型其实是 布尔值。默认值为 true。
configuration:DOM:配置为DOM对象。
默认状况下,每一个元素内容都会被修剪,但从Maven 3.1.0开始,您能够将xml:space =“preserve”添加到要保留空格的元素中。
您能够经过将combine.children或combine.self属性添加到配置元素的子项来控制子POM如何从父POM继承配置:
combine.children:可用值是merge(默认)和append,
combine.self:可用值是merge(默认)和override。
有关更多信息,请参阅POM参考文档和Xpp3DomUtils。
对基于环境参数或命令行参数激活的构建过程的修改。
id:String:此构建配置文件的标识符。这用于命令行激活,并标识要合并的配置文件。
默认值为:default。
activation:Activation:条件逻辑将自动触发包含此配置文件。
build:BuildBase:构建项目所需的信息。
modules/module*:List<String>:(不少)做为该项目的一部分构建的模块(有时称为子项目)。列出的每一个模块都是包含该模块的目录的相对路径。为了与从父计算默认URL的方式一致,建议使模块名称与工件ID匹配。
distributionManagement:DistributionManagement:项目的分发信息,能够分别将站点和工件部署到远程Web服务器和存储库。
properties/key=value*:Properties:(多个)能够在整个POM中用做替换的属性,并在启用时用做资源中的过滤器。格式为 <name> value </ name>。
dependencyManagement:DependencyManagement:从这个项目继承的项目的默认依赖项信息。本节中的依赖项不会当即解决。相反,当从这个派生的POM声明由匹配的groupId和artifactId描述的依赖关系时,若是还没有指定该依赖关系,则此部分的版本和其余值将用于该依赖关系。
dependencies/dependency*:List<Dependency>:(不少)此元素描述与项目关联的全部依赖项。这些依赖项用于在构建过程当中为项目构造类路径。它们会自动今后项目中定义的存储库下载。有关更多信息,请参阅 依赖性机制。
repositories/repository*:List<Repository>:(多个)用于发现依赖关系和扩展的远程存储库的列表。
pluginRepositories/pluginRepository*:List<Repository>:(多个)用于发现构建和报告的插件的远程存储库的列表。
reports:DOM:不推荐。如今被Maven忽略了。
reporting:Reporting:此元素包括用于在Maven生成的站点上生成报告的报告插件的规范。当用户执行mvn站点时,将运行这些报告 。全部报告都将包含在导航栏中以供浏览。
构建运行时环境中的条件将触发自动包含构建配置文件。能够定义多个条件,激活配置文件必须知足全部条件。
activeByDefault:boolean:若是设置为true,则此配置文件将处于活动状态,除非使用命令行-P选项或该配置文件的激活器之一激活此pom中的另外一个配置文件。
默认值为:false。
jdk:String:指定在检测到匹配的JDK时将激活此配置文件。例如, 1.4仅在JDK版本1.4上激活,而 !1.4匹配任何不是版本1.4的JDK。也支持范围: 当JDK最小为1.5时,[1.5,]激活。
os:ActivationOS:指定在检测到匹配的操做系统属性时将激活此配置文件。
property:ActivationProperty:指定在指定此系统属性时将激活此配置文件。
file:ActivationFile:指定将根据文件的存在激活此配置文件。
这是一个激活器,它将检测操做系统的属性以激活其配置文件。
name:String:用于激活配置文件的操做系统的名称。这必须与$ {os.name} Java属性彻底匹配 ,例如 Windows XP。
family:String:用于激活配置文件的OS的通常系列,例如 windows或 unix。
arch:String:用于激活配置文件的操做系统的体系结构。
version:String:用于激活配置文件的操做系统版本。
这是用于激活配置文件的属性规范。若是value字段为空,则named属性的存在将激活配置文件,不然它也会对属性值进行区分大小写的匹配。
Element | Type | Description |
---|---|---|
name | String | 用于激活配置文件的属性的名称。 |
value | String | 激活配置文件所需的属性值。 |
这是用于激活配置文件的文件规范。的 缺失值是须要存在的文件的位置,若是没有,配置文件将被激活。另外一方面, exists将测试文件是否存在,若是存在,则激活配置文件。
这些文件规范的可变插值仅限于 $ {basedir},系统属性和请求属性。
Element | Type | Description |
---|---|---|
missing | String | 激活配置文件时必须缺乏的文件名。 |
exists | String | 激活配置文件必须存在的文件的名称。 |
构建的通用信息。
defaultGoal:String:当没有为项目指定时,要执行的默认目标(或Maven 2中的阶段)。请注意,在多模块构建的状况下,只有顶级项目的默认目标是相关的,即忽略子模块的默认目标。从Maven 3开始,多个目标/阶段能够用空格分隔。
resources/resource*:List<Resource>:(不少)此元素描述全部类路径资源,例如与项目关联的属性文件。这些资源一般包含在最终包中。默认值为 src / main / resources。
testResources/testResource*:List<Resource>:(不少)此元素描述全部类路径资源,例如与项目的单元测试关联的属性文件。默认值为 src / test / resources。
directory:String:放置构建生成的全部文件的目录。默认值为target。
finalName:String:生成的工件将被调用的文件名(不包括扩展名,没有路径信息)。默认值为 $ {artifactId} - $ {version}。
filters/filter*:List<String>:(多个)启用过滤时使用的过滤器属性文件列表。
pluginManagement:PluginManagement:默认插件信息可供今后项目派生的项目参考。除非引用,不然此插件配置将不会被解析或绑定到生命周期。给定插件的任何本地配置都将覆盖插件的整个定义。
plugins/plugin*:List<Plugin>:(不少)要使用的插件列表。
#
connection:String:源代码管理系统URL,用于描述存储库以及如何链接到存储库。有关更多信息,请参阅 URL格式和 支持的SCM列表。此链接是只读的。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)
developerConnection:String:就像链接同样 ,但对于开发人员来讲,即这个scm链接不会是只读的。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)
tag:String:当前代码的标记。默认状况下,它在开发期间设置为HEAD。
默认值为:HEAD。
url:String:项目可浏览的SCM存储库的URL,例如ViewVC或Fisheye。
默认值为:父值[+路径调整] +(artifactId或project.directory属性)