POM.XML文档汉化

#class_issueManagement

project

所述 <project> 元素是描述符的根。下表列出了所有可能的子元素。

modelVersionString:声明此POM符合哪个版本的项目描述符。

parentParent:父项目的位置(如果存在)。如果未指定,则父项目中的值将是此项目的默认值。该位置以组ID,工件ID和版本的形式给出。

groupIdString:项目的通用唯一标识符。使用完全限定的包名称以区别于具有类似名称的其他项目(例如org.apache.maven)是正常的。

artifactIdString:此工件的标识符在组ID指定的组中是唯一的。工件是由项目生成或使用的东西。Maven为项目生成的工件示例包括:JAR,源和二进制分发以及WAR。

versionString:此项目生成的工件的当前版本。

packagingString:这个项目产生的神器类型,例如jar war ear pom。插件可以创建自己的包装,因此也可以创建自己的包装类型,因此该列表不包含所有可能的类型。

nameString:项目的全名。

descriptionString:项目的详细描述,Maven在需要描述项目时使用,例如在网站上。虽然可以将此元素指定为CDATA以在说明中使用HTML标记,但不鼓励允许纯文本表示。如果需要修改生成的网站的索引页面,则可以指定自己的索引页面,而不是调整此文本。

urlString:项目主页的URL。 
默认值为:父值[+路径调整] +(artifactId或 project.directory属性)

inceptionYearString:项目开始的那一年,用4位数字指定。在生成版权声明和信息时使用此值。

organizationOrganization:此元素描述项目所属组织的各种属性。创建文档时使用这些属性(用于版权声明和链接)。

licenses/license*List<License>:(很多)此元素描述了此项目的所有许可证。每个许可证都由 许可证元素描述,然后由其他元素描述。项目应仅列出适用于项目的许可证,而不是列出适用于依赖项的许可证。如果列出了多个许可证,则假定用户可以选择其中任何一个,而不是他们必须接受所有许可证。

developers/developer*List<Developer>:(很多)描述项目的提交者。

contributors/contributor*List<Contributor>:(很多)描述了尚未提交的项目的贡献者。

mailingLists/mailingList*List<MailingList>:(很多)包含有关项目邮件列表的信息。

prerequisitesPrerequisites:描述此项目的构建环境中的先决条件。

modules/module*List<String>:(很多)作为该项目的一部分构建的模块(有时称为子项目)。列出的每个模块都是包含该模块的目录的相对路径。为了与从父计算默认URL的方式一致,建议使模块名称与工件ID匹配。

scmScm:项目使用的SCM规范,如CVS,Subversion等。

issueManagementIssueManagement:该项目的问题管理系统信息。

ciManagementCiManagement:该项目的持续整合信息。

distributionManagementDistributionManagement:项目的分发信息,可以分别将站点和工件部署到远程Web服务器和存储库。

properties/key=value*Properties:(多个)可以在整个POM中用作替换的属性,并在启用时用作资源中的过滤器。格式为 <name> value </ name>。

dependencyManagementDependencyManagement:从这个项目继承的项目的默认依赖项信息。本节中的依赖项不会立即解决。相反,当从这个派生的POM声明由匹配的groupId和artifactId描述的依赖关系时,如果尚未指定该依赖关系,则此部分的版本和其他值将用于该依赖关系。

dependencies/dependency*List<Dependency>:(很多)此元素描述与项目关联的所有依赖项。这些依赖项用于在构建过程中为项目构造类路径。它们会自动从此项目中定义的存储库下载。有关更多信息,请参阅 依赖性机制。

repositories/repository*List<Repository>:(多个)用于发现依赖关系和扩展的远程存储库的列表。

pluginRepositories/pluginRepository*List<Repository>:(多个)用于发现构建和报告的插件的远程存储库的列表。

buildBuild:构建项目所需的信息。

reportsDOM:不推荐。现在被Maven忽略了。

reportingReporting:此元素包括用于在Maven生成的站点上生成报告的报告插件的规范。当用户执行mvn站点时,将运行这些报告 。所有报告都将包含在导航栏中以供浏览。

profiles/profile*List<Profile>:(很多)项目本地构建配置文件的列表,它将在激活时修改构建过程。

parent

所述 <parent>元素包含以定位父项目从该项目将继承所需的信息。 注意:此元素的子元素不是插值的,必须以文字值的形式给出

groupIdString:要继承的父项目的组ID。

artifactIdString:要继承的父项目的工件ID。

versionString:要继承的父项目的版本。

relativePathString:签出中父pom.xml文件的相对路径 。如果未指定,则默认为../pom.xml。Maven首先在文件系统上的这个位置查找父POM,然后是本地存储库,最后在远程仓库中查找。 relativePath允许您选择不同的位置,例如,当您的结构是平的时,或者更深,没有中间父POM。但是,组ID,工件ID和版本仍然是必需的,并且必须与给定位置中的文件匹配,否则它将恢复为POM的存储库。此功能仅用于增强该项目的本地结帐的开发。如果要禁用该功能,请将值设置为空字符串,并始终从存储库中解析父POM。
默认值为:../ pom.xml。

organization

指定生成此项目的组织。

nameString:组织的全名。

urlString:组织主页的URL。

license

描述此项目的许可证。这用于生成项目网站的许可页面,以及在其他报告和验证中考虑。为项目列出的许可证是项目本身的许可证,而不是依赖项。

nameString:许可证的完整法定名称。

urlString:许可证文本的官方URL。

distributionString:可以分发此项目的主要方法。

commentsString:有关此许可证的附录信息。

developer

有关此项目的其中一个提交者的信息。

idString:SCM中开发人员的唯一ID。

nameString:贡献者的全名。

emailString:贡献者的电子邮件地址。

urlString:贡献者主页的URL。

organizationString:贡献者所属的组织。

organizationUrlString:组织的URL。

roles/role*List<String>:(很多)贡献者在项目中扮演的角色。每个角色由角色元素描述,角色元素的主体是角色名称。这也可以用来描述贡献。

timezoneString:贡献者所在的时区。通常,这是-12到 +14范围内的数字, 或者是“America / Montreal”(UTC-05:00)或“Europe / Paris”(UTC + 01)的有效时区ID :00)。

properties/key=value*Properties:(很多)关于贡献者的属性,例如即时消息句柄。

contributor

对项目有贡献但没有提交权限的人员的描述。通常,这些贡献以提交的补丁的形式出现。

nameString:贡献者的全名。

emailString:贡献者的电子邮件地址。

urlString:贡献者主页的URL。

organizationString:贡献者所属的组织。

organizationUrlString:组织的URL。

roles/role*List<String>:(很多)贡献者在项目中扮演的角色。每个角色由角色元素描述,角色元素的主体是角色名称。这也可以用来描述贡献。

timezoneString:贡献者所在的时区。通常,这是-12到 +14范围内的数字, 或者是“America / Montreal”(UTC-05:00)或“Europe / Paris”(UTC + 01)的有效时区ID :00)。

properties/key=value*Properties:(很多)关于贡献者的属性,例如即时消息句柄。

mailingList

此元素描述与项目关联的所有邮件列表。自动生成的站点引用此信息。

name:String:邮件列表的名称。

subscribe:String:可用于订阅邮件列表的电子邮件地址或链接。如果这是电子邮件地址, 则在创建文档时将自动创建mailto:链接。

unsubscribe:String:可用于取消订阅邮件列表的电子邮件地址或链接。如果这是电子邮件地址, 则在创建文档时将自动创建mailto:链接。

post:String:可用于发布到邮件列表的电子邮件地址或链接。如果这是电子邮件地址, 则在创建文档时将自动创建mailto:链接。

archive:String:指向您可以浏览邮件列表存档的URL的链接。

otherArchives/otherArchive*:List<String>:(多个)指向备用URL的链接,您可以在其中浏览列表存档。

prerequisites

描述项目可以具有的先决条件。

maven:String:对于插件项目(打包是 maven-plugin),使用生成的插件需要Maven的最低版本。 
在Maven 2中,这也指定了构建项目所需的Maven的最低版本,但是这种用法 在Maven 3中已弃用,而不再被检查:使用 Maven Enforcer插件的requireMavenVersion规则
默认值为2.0

scm

所述 <SCM>元素包含该项目的所需的SCM(源控制管理)信息。

connectionString源代码管理系统URL,用于描述存储库以及如何连接到存储库。有关更多信息,请参阅 URL格式 支持的SCM列表。此连接是只读的。
默认值为:父值
[+路径调整] +artifactIdproject.directory属性) 

developerConnectionString就像连接一样 ,但对于开发人员来说,即这个scm连接不会是只读的。 
默认值为:父值[+路径调整] +artifactIdproject.directory属性)

tagString当前代码的标记。默认情况下,它在开发期间设置为HEAD
默认值为:
HEAD

urlString项目可浏览的SCM存储库的URL,例如ViewVCFisheye 
默认值为:父值[+路径调整] +artifactIdproject.directory属性)

issueManagement

有关用于管理此项目的问题跟踪(或错误跟踪)系统的信息。

ElementTypeDescription
systemString问题管理系统的名称,例如Bugzilla
urlString项目使用的问题管理系统的URL。

ciManagement

所述 <CiManagement>元素包含所需项目的持续集成系统信息。

systemString:持续集成系统的名称,例如 连续统一体。

urlString:项目使用的持续集成系统的URL(如果它具有Web界面)。

notifiers/notifier*List<Notifier>:(多个)用于在构建不成功时通知开发人员/用户的配置,包括用户信息和通知模式。

notifier

配置一种在构建中断时通知用户/开发人员的方法。

typeString:用于传递通知的机制。
默认值为:mail。

sendOnErrorboolean:是否发送错误通知。
默认值为:true。

sendOnFailureboolean:是否在发生故障时发送通知。
默认值为:true。

sendOnSuccessboolean:是否发送成功通知。
默认值为:true。

sendOnWarningboolean:是否发送警告通知。
默认值为:true。

addressString:不推荐。在何处发送通知 - 例如电子邮件地址。

configuration/key=value*Properties:(很多)特定于此通知程序的扩展配置在此处。

distributionManagement

此元素描述了与项目分发相关的所有内容。它主要用于部署工件和构建生成的站点。

repositoryDeploymentRepository:将项目生成的工件部署到远程存储库所需的信息。

snapshotRepositoryDeploymentRepository:何处将工件快照部署到。如果没有给出,则默认为 repository元素。

siteSite:部署项目网站所需的信息。

downloadUrlString:项目下载页面的URL。如果没有给出用户将被引用到url给出的主页 。这是为了帮助定位由于许可限制而不在存储库中的工件。

relocationRelocation:工件的重定位信息(如果已移动到新的组ID和/或工件ID)。

statusString:在远程存储库中提供此工件的状态。这不能在您的本地项目中设置,因为它是由放置在reposiory中的工具更新的。有效值包括:无(默认), 转换(存储库管理器从Maven 1 POM转换), 合作伙伴(直接从合作伙伴Maven 2存储库同步), 部署(从Maven 2实例部署), 验证(已手动)验证为正确且最终)。

repository

存储库包含部署到远程存储库所需的信息。

uniqueVersionboolean:无论分配快照包含时间戳的独特版本和版本号,或者使用相同的版本,每次
默认值是:true。

releasesRepositoryPolicy:如何处理从此存储库下载的版本。

snapshotsRepositoryPolicy:如何处理从此存储库下载快照。

idString:存储库的唯一标识符。例如,这用于将存储库与settings.xml文件中的配置进行匹配 。此外,在POM继承和配置文件注入期间使用标识符来检测应合并的存储库。

nameString:人类可读的存储库名称。

urlString:存储库的URL,格式为 protocol:// hostname / path。

layoutString:此存储库用于定位和存储工件的布局类型 - 可以是 旧版或 默认版。
默认值为:default。

releases

下载政策。

ElementTypeDescription
enabledString是否使用此存储库下载此类工件。注意:虽然出于技术原因,此字段的类型为 String,但语义类型实际上是 布尔值。默认值为 true
updatePolicyString下载更新的频率 - 可以是 始终, 每天(默认), 间隔:XXX(以分钟为单位)或 从不(仅在本地不存在时)
checksumPolicyString验证工件校验和失败时该怎么办。有效值为 ignore, failwarn(默认值)。

snapshots

下载政策。

ElementTypeDescription
enabledStringWhether 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.
updatePolicyStringThe frequency for downloading updates - can be always,daily (default), interval:XXX (in minutes) or never (only if it doesn't exist locally).
checksumPolicyStringWhat to do when verification of an artifact checksum fails. Valid values are ignore , fail or warn (the default).

snapshotRepository

存储库包含部署到远程存储库所需的信息。

ElementTypeDescription
uniqueVersionbooleanWhether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time
Default value istrue.
releasesRepositoryPolicyHow to handle downloading of releases from this repository.
snapshotsRepositoryPolicyHow to handle downloading of snapshots from this repository.
idStringA 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.
nameStringHuman readable name of the repository.
urlStringThe url of the repository, in the formprotocol://hostname/path.
layoutStringThe type of layout this repository uses for locating and storing artifacts - can be legacy or default.
Default value isdefault.

site

包含部署网站所需的信息。

ElementTypeDescription
idStringA unique identifier for a deployment location. This is used to match the site to configuration in the settings.xml file, for example.
nameStringHuman readable name of the deployment location.
urlStringThe url of the location where website is deployed, in the formprotocol://hostname/path
Default value is: parent value [+ path adjustment] + (artifactId orproject.directory property)

relocation

描述工件移动到的位置。如果省略任何值,则假定它与之前相同。

ElementTypeDescription
groupIdStringThe group ID the artifact has moved to.
artifactIdStringThe new artifact ID of the artifact.
versionStringThe new version of the artifact.
messageStringAn additional message to show the user about the move, such as the reason.

dependencyManagement

用于管理在一组POM中使用的默认依赖关系信息的部分。

ElementTypeDescription
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.

dependency

所述 <依赖性>元素包含关于该项目的相关性信息。

ElementTypeDescription
groupIdStringThe project group that produced the dependency, e.g. org.apache.maven.
artifactIdStringThe unique id for an artifact produced by the project group, e.g. maven-artifact.
versionStringThe version of the dependency, e.g. 3.2.1. In Maven 2, this can also be specified as a range of versions.
typeStringThe 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 jarwarejb-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 isjar.
classifierStringThe classifier of the dependency. It is appended to the filename after the version. This allows:
  • referring to attached artifact, for example sources and javadoc: see default artifact handlers for a list,
  • distinguishing two artifacts that belong to the same POM but were built differently. For example, jdk14 and jdk15.
scopeStringThe scope of the dependency - compile,runtimetestsystem, 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.
systemPathStringFOR 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.
optionalStringIndicates 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.

exclusion

所述 <排除>元素包含以排除伪影到该项目所需的信息。

ElementTypeDescription
artifactIdStringThe artifact ID of the project to exclude.
groupIdStringThe group ID of the project to exclude.

repository

存储库包含与远程存储库建立连接所需的信息。

ElementTypeDescription
releasesRepositoryPolicyHow to handle downloading of releases from this repository.
snapshotsRepositoryPolicyHow to handle downloading of snapshots from this repository.
idStringA 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.
nameStringHuman readable name of the repository.
urlStringThe url of the repository, in the formprotocol://hostname/path.
layoutStringThe type of layout this repository uses for locating and storing artifacts - can be legacy or default.
Default value isdefault.

pluginRepository

存储库包含与远程存储库建立连接所需的信息。

ElementTypeDescription
releasesRepositoryPolicyHow to handle downloading of releases from this repository.
snapshotsRepositoryPolicyHow to handle downloading of snapshots from this repository.
idStringA 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.
nameStringHuman readable name of the repository.
urlStringThe url of the repository, in the formprotocol://hostname/path.
layoutStringThe type of layout this repository uses for locating and storing artifacts - can be legacy or default.
Default value isdefault.

build

所述 <build>元素包含建立该项目所需的信息。默认值在Super POM中定义。

sourceDirectoryString:此元素指定包含项目源的目录。生成的构建系统将在构建项目时从此目录编译源。给定的路径是相对于项目描述符的。默认值为src / main / java。

scriptSourceDirectoryString:此元素指定包含项目脚本源的目录。此目录与sourceDirectory的不同之处在于,在大多数情况下,其内容将被复制到输出目录(因为脚本是解释而不是编译的)。默认值为src / main / scripts。

testSourceDirectoryString:此元素指定包含项目的单元测试源的目录。生成的构建系统将在测试项目时编译这些目录。给定的路径是相对于项目描述符的。默认值为 src / test / java。

outputDirectoryString:放置已编译应用程序类的目录。默认值为target / classes。

testOutputDirectoryString:放置已编译测试类的目录。默认值为target / test-classes。

extensions/extension*List<Extension>:(很多)从这个项目中使用的一组构建扩展。

defaultGoalString:当没有为项目指定时,要执行的默认目标(或Maven 2中的阶段)。请注意,在多模块构建的情况下,只有顶级项目的默认目标是相关的,即忽略子模块的默认目标。从Maven 3开始,多个目标/阶段可以用空格分隔。

resources/resource*List<Resource>:(很多)此元素描述所有类路径资源,例如与项目关联的属性文件。这些资源通常包含在最终包中。默认值为 src / main / resources。

testResources/testResource*List<Resource>:(很多)此元素描述所有类路径资源,例如与项目的单元测试关联的属性文件。默认值为 src / test / resources。

directoryString:放置构建生成的所有文件的目录。默认值为target。

finalNameString:生成的工件将被调用的文件名(不包括扩展名,没有路径信息)。默认值为 $ {artifactId} - $ {version}。

filters/filter*List<String>:(多个)启用过滤时使用的过滤器属性文件列表。

pluginManagementPluginManagement:默认插件信息可供从此项目派生的项目参考。除非引用,否则此插件配置将不会被解析或绑定到生命周期。给定插件的任何本地配置都将覆盖插件的整个定义。

plugins/plugin*List<Plugin>:(很多)要使用的插件列表。


extension

描述要使用的构建扩展。

ElementTypeDescription
groupIdStringThe group ID of the extension's artifact.
artifactIdStringThe artifact ID of the extension.
versionStringThe version of the extension.

resource

此元素描述与项目或单元测试关联的所有类路径资源。

ElementTypeDescription
targetPathStringDescribe 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.
filteringStringWhether 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.
directoryStringDescribe 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

testResource

此元素描述与项目或单元测试关联的所有类路径资源。

ElementTypeDescription
targetPathStringDescribe 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.
filteringStringWhether 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.
directoryStringDescribe 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

pluginManagement

用于管理在一组POM中使用的默认插件信息的部分。

ElementTypeDescription
plugins/plugin*List<Plugin>(Many) The list of plugins to use.

plugin

所述<plugin>元素包含一个插件所需信息。

groupIdString:存储库中插件的组ID。
默认值为:org.apache.maven.plugins。

artifactIdString:存储库中插件的工件ID。

versionString:要使用的插件的版本(或有效版本范围)。

extensionsString:是否从此插件加载Maven扩展(例如打包和类型处理程序)。出于性能原因,只应在必要时启用此功能。注意:虽然出于技术原因,此字段的类型为 String,但语义类型实际上是 布尔值。默认值为 false。

executions/execution*List<PluginExecution>:(很多)在构建生命周期中要执行的一组目标的多个规范,每个目标都具有(可能)不同的配置。

dependencies/dependency*List<Dependency>:(很多)此项目需要引入插件的类加载器的其他依赖项。

goalsDOM:不推荐。未被Maven使用。

inheritedString:是否应将任何配置传播到子POM。注意:虽然出于技术原因,此字段的类型为 String,但语义类型实际上是布尔值。默认值为 true。

execution

所述<execution>元素包含一个插件的执行所需要的信息。

ElementTypeDescription
idStringThe identifier of this execution for labelling the goals during the build, and for matching executions to merge during inheritance and profile injection.
Default value isdefault.
phaseStringThe 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.
inheritedStringWhether 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.
configurationDOM

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:

  • combine.children: available values are merge(default) and append,
  • combine.self: available values are merge (default) and override.

See POM Reference documentation and Xpp3DomUtils for more information.

reporting

报告及其配置管理部分。

ElementTypeDescription
excludeDefaultsStringIf 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.
outputDirectoryStringWhere 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

所述 <plugin>元素包含报告插件所需信息。

groupIdString:存储库中报告插件的组ID。
默认值为:org.apache.maven.plugins。

artifactIdString:存储库中报告插件的工件ID。

versionString:要使用的报告插件的版本。

reportSets/reportSet*List<ReportSet>:多个一组报告的多个规范,每个报告具有(可能)不同的配置。这是与构建中的执行并行的报告 。

inheritedString:是否应将任何配置传播到子POM。注意:虽然出于技术原因,此字段的类型为 String,但语义类型实际上是 布尔值。默认值为 true。

configurationDOM:配置为DOM对象。
默认情况下,每个元素内容都会被修剪,但从Maven 3.1.0开始,您可以将xml:space =“preserve”添加到要保留空格的元素中。
您可以通过将combine.children或combine.self属性添加到配置元素的子项来控制子POM如何从父POM继承配置:
combine.children:可用值是merge(默认)和append,
combine.self:可用值是merge(默认)和override。
有关更多信息,请参阅POM参考文档和Xpp3DomUtils。

reportSet

表示用于生成它们的一组报告和配置。

idString:此报告集的唯一ID,用于在POM继承和概要文件注入期间用于合并报告集。
默认值为:default。

reports/report*List<String>:(很多)此插件的报告列表应该从此集合生成。

inheritedString:是否应将任何配置传播到子POM。注意:虽然出于技术原因,此字段的类型为String,但语义类型实际上是 布尔值。默认值为 true。

configurationDOM:配置为DOM对象。
默认情况下,每个元素内容都会被修剪,但从Maven 3.1.0开始,您可以将xml:space =“preserve”添加到要保留空格的元素中。
您可以通过将combine.children或combine.self属性添加到配置元素的子项来控制子POM如何从父POM继承配置:
combine.children:可用值是merge(默认)和append,
combine.self:可用值是merge(默认)和override。
有关更多信息,请参阅POM参考文档和Xpp3DomUtils。

profile

对基于环境参数或命令行参数激活的构建过程的修改。

idString此构建配置文件的标识符。这用于命令行激活,并标识要合并的配置文件。
默认值为:
default

activationActivation条件逻辑将自动触发包含此配置文件。

buildBuildBase构建项目所需的信息。

modules/module*List<String>(很多)作为该项目的一部分构建的模块(有时称为子项目)。列出的每个模块都是包含该模块的目录的相对路径。为了与从父计算默认URL的方式一致,建议使模块名称与工件ID匹配。

distributionManagementDistributionManagement项目的分发信息,可以分别将站点和工件部署到远程Web服务器和存储库。

properties/key=value*Properties(多个)可以在整个POM中用作替换的属性,并在启用时用作资源中的过滤器。格式为 <name> value </ name>

dependencyManagementDependencyManagement从这个项目继承的项目的默认依赖项信息。本节中的依赖项不会立即解决。相反,当从这个派生的POM声明由匹配的groupIdartifactId描述的依赖关系时,如果尚未指定该依赖关系,则此部分的版本和其他值将用于该依赖关系。

dependencies/dependency*List<Dependency>(很多)此元素描述与项目关联的所有依赖项。这些依赖项用于在构建过程中为项目构造类路径。它们会自动从此项目中定义的存储库下载。有关更多信息,请参阅 依赖性机制。

repositories/repository*List<Repository>(多个)用于发现依赖关系和扩展的远程存储库的列表。

pluginRepositories/pluginRepository*List<Repository>(多个)用于发现构建和报告的插件的远程存储库的列表。

reportsDOM不推荐。现在被Maven忽略了。

reportingReporting此元素包括用于在Maven生成的站点上生成报告的报告插件的规范。当用户执行mvn站点时,将运行这些报告 。所有报告都将包含在导航栏中以供浏览。

activation

构建运行时环境中的条件将触发自动包含构建配置文件。可以定义多个条件,激活配置文件必须满足所有条件。

activeByDefaultboolean如果设置为true,则此配置文件将处于活动状态,除非使用命令行-P选项或该配置文件的激活器之一激活此pom中的另一个配置文件。
默认值为:
false

jdkString指定在检测到匹配的JDK时将激活此配置文件。例如, 1.4仅在JDK版本1.4上激活,而 1.4匹配任何不是版本1.4JDK。也支持范围: JDK最小为1.5时,[1.5]激活。

osActivationOS指定在检测到匹配的操作系统属性时将激活此配置文件。

propertyActivationProperty指定在指定此系统属性时将激活此配置文件。

fileActivationFile指定将根据文件的存在激活此配置文件。

os

这是一个激活器,它将检测操作系统的属性以激活其配置文件。

nameString用于激活配置文件的操作系统的名称。这必须与$ {os.name} Java属性完全匹配 ,例如 Windows XP

familyString用于激活配置文件的OS的一般系列,例如 windows unix

archString用于激活配置文件的操作系统的体系结构。

versionString用于激活配置文件的操作系统版本。

property

这是用于激活配置文件的属性规范。如果value字段为空,则named属性的存在将激活配置文件,否则它也会对属性值进行区分大小写的匹配。

ElementTypeDescription
nameString用于激活配置文件的属性的名称。
valueString激活配置文件所需的属性值。

file

这是用于激活配置文件的文件规范。的 缺失值是需要存在的文件的位置,如果没有,配置文件将被激活。另一方面, exists将测试文件是否存在,如果存在,则激活配置文件。 
这些文件规范的可变插值仅限于 $ {basedir},系统属性和请求属性。

ElementTypeDescription
missingString激活配置文件时必须缺少的文件名。
existsString激活配置文件必须存在的文件的名称。

 

build

构建的通用信息。

defaultGoalString当没有为项目指定时,要执行的默认目标(或Maven 2中的阶段)。请注意,在多模块构建的情况下,只有顶级项目的默认目标是相关的,即忽略子模块的默认目标。从Maven 3开始,多个目标/阶段可以用空格分隔。

resources/resource*List<Resource>(很多)此元素描述所有类路径资源,例如与项目关联的属性文件。这些资源通常包含在最终包中。默认值为 src / main / resources

testResources/testResource*List<Resource>(很多)此元素描述所有类路径资源,例如与项目的单元测试关联的属性文件。默认值为 src / test / resources

directoryString放置构建生成的所有文件的目录。默认值为target

finalNameString生成的工件将被调用的文件名(不包括扩展名,没有路径信息)。默认值为 $ {artifactId} - $ {version}

filters/filter*List<String>(多个)启用过滤时使用的过滤器属性文件列表。

pluginManagementPluginManagement默认插件信息可供从此项目派生的项目参考。除非引用,否则此插件配置将不会被解析或绑定到生命周期。给定插件的任何本地配置都将覆盖插件的整个定义。

plugins/plugin*List<Plugin>(很多)要使用的插件列表。

 

 

 

 

 

 

 

#

connectionString源代码管理系统URL,用于描述存储库以及如何连接到存储库。有关更多信息,请参阅 URL格式 支持的SCM列表。此连接是只读的。
默认值为:父值
[+路径调整] +artifactIdproject.directory属性) 

developerConnectionString就像连接一样 ,但对于开发人员来说,即这个scm连接不会是只读的。 
默认值为:父值[+路径调整] +artifactIdproject.directory属性)

tagString当前代码的标记。默认情况下,它在开发期间设置为HEAD
默认值为:
HEAD

urlString项目可浏览的SCM存储库的URL,例如ViewVCFisheye 
默认值为:父值[+路径调整] +artifactIdproject.directory属性)

转载于:https://www.cnblogs.com/chenxygx/p/10154445.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值