我有两个不同的pom.xml
定义相同plugin
(相同groupId
和artifactId
不同execution
:-))的地方profiles
.在executions
以相同的定义phase
,因此,为了通过从XML的顺序计算:
4.0.0 echo test echo-test 1.0.0 pom 1st-profile true maven-antrun-plugin 1st-antrun-echo test run 1st antrun plugin 2nd-profile true com.soebes.maven.plugins maven-echo-plugin 0.1 1st-soebes-echo test echo 1st echo-plugin maven-antrun-plugin 2nd-antrun-echo test run 2nd antrun plugin
所有插件执行都在test
阶段中定义,因此我希望以下顺序:
1st antrun plugin 1st echo-plugin 2nd antrun plugin
但是,由于antrun-plugins
合并,我得到这个输出:
1st echo-plugin 1st antrun plugin 2nd antrun plugin
此命令解释了为什么会发生这种情况: mvn help:effective-pom
除了引入新阶段之外,还有其他解决方案可以保留订单吗?我们的项目非常大,这是一个非常简单的例子.
为什么maven的限制是将插件合并为多个执行的插件?