maven 是否将ear-element 从“defaultjavabundledir”更改为“defaultjavabundledir”?到“defaultlibbundledir”,如果是的话什么时候?
在 POM 文件中,我发现一个使用“defaultJavaBundleDir”的“maven-ear-plugin”配置,但似乎“defaultLibBundleDir”是正确的(根据架构和各种文档)。
Maven POM 架构的版本为 4.0.0。
这是旧版本的残留吗?我找不到对此更改的解释,并且想确保我们可靠地使用正确的符号。
In a POM-file i found a "maven-ear-plugin" configuration that uses "defaultJavaBundleDir", but it seems that "defaultLibBundleDir" is the correct (according to the schema and various documentation).
The Maven POM schema is version 4.0.0.
Is this a remnant from an older version? I couldn't find an explanation for this change, and would like to make sure we are using the correct notation reliably.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上,
plugin
的configuration
元素可以包含任何内容。因此bar
是有效的(如果它是未知参数,则只会被给定插件“忽略”)。此更改是为了解决 MEAR-46 引入的,我们可以在 (近似) svn 提交:r471886。
如果您仔细查看差异,您会看到
defaultLibBundleDir
是参数的新名称,旧的defaultJavaBundleDir
被声明为别名。所以两者都有效,都做同样的事情,但只有“新”的一个记录在
ear
mojo 的参数列表中。您可以安全地更改为defaultLibBundleDir
这会让事情变得更加清晰。Actually, the
configuration
element of aplugin
can contain anything. So<foo>bar</foo>
is valid (and will just be "ignored" by a given plugin if it's an unknown parameter).This change has been introduced for the resolution of MEAR-46 as we can read in the (approximative) comment of the svn commit: r471886.
If you look closer at the diff, you'll see that
defaultLibBundleDir
is the new name of the parameter and that the olddefaultJavaBundleDir
is declared as an alias.So both work, both do the same thing, but only the "new" one is documented in the parameters list of the
ear
mojo. You can safely change todefaultLibBundleDir
and this will make things more clear.另外值得注意的是,Maven Integration for WTP eclipse 插件 (m2e-wtp) 仅支持已记录的
defaultLibBundleDir
选项,而不支持旧的defaultJavaBundleDir
。https://github.com/eclipse/ m2e.wtp/search?utf8=%E2%9C%93&q=defaultLibBundleDir
https://github.com/eclipse/ m2e.wtp/search?utf8=%E2%9C%93&q=defaultJavaBundleDir
Also worth noting is that the Maven Integration for WTP eclipse plugin (m2e-wtp) only supports the documented
defaultLibBundleDir
option, not the olderdefaultJavaBundleDir
.https://github.com/eclipse/m2e.wtp/search?utf8=%E2%9C%93&q=defaultLibBundleDir
https://github.com/eclipse/m2e.wtp/search?utf8=%E2%9C%93&q=defaultJavaBundleDir