< plugins>之间的差异和< pluginManagement>标记在Maven`pom.xml`中 [英] Difference between <plugins> and <pluginManagement> tag in Maven `pom.xml`

查看:125
本文介绍了< plugins>之间的差异和< pluginManagement>标记在Maven`pom.xml`中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

配置我的 pom.xml 时,我必须配置一个插件。我发现的是< plugin> 标签可以插入< plugins> < pluginManagement> 元素。我很困惑!

While configuring my pom.xml, I had to configure a plugin. What I found out is that the <plugin> tag may be inserted inside either <plugins> or <pluginManagement> elements. I am confused!

< plugins> < pluginManagement>

推荐答案

来自 Maven文档

From Maven documentation:


pluginManagement :是一个沿侧插件看到的元素。插件管理以大致相同的方式包含插件元素,除了不是为此特定项目构建配置插件信息,它旨在配置从此继承的项目构建。但是,这仅配置在子节点的plugins元素中实际引用的插件。孩子们有权覆盖插件管理定义。

pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions.

你可以看看更好的答案

这篇关于&lt; plugins&gt;之间的差异和&lt; pluginManagement&gt;标记在Maven`pom.xml`中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆