开发者

Has maven changed ear-element from "defaultjavabundledir" to "defaultlibbundledir", if so when?

开发者 https://www.devze.com 2023-01-24 22:57 出处:网络
In a POM-file i found a \"maven-ear-plugin\" configuration that uses \"default开发者_Go百科JavaBundleDir\", but it seems that \"defaultLibBundleDir\" is the correct (according to the schema and variou

In a POM-file i found a "maven-ear-plugin" configuration that uses "default开发者_Go百科JavaBundleDir", 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.


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

Actually, the configuration element of a plugin can contain anything. So <foo>bar</foo> is valid (and will just be "ignored" by a given plugin if it's an unknown parameter).

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.

This change has been introduced for the resolution of MEAR-46 as we can read in the (approximative) comment of the svn commit: r471886.

Added defaultLibDir as an alias of defaultJavaBundleDir which is more understable

If you look closer at the diff, you'll see that defaultLibBundleDir is the new name of the parameter and that the old defaultJavaBundleDir 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 to defaultLibBundleDir and this will make things more clear.


Also worth noting is that the Maven Integration for WTP eclipse plugin (m2e-wtp) only supports the documented defaultLibBundleDir option, not the older 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号