【发布时间】:2016-02-02 07:38:29
【问题描述】:
默认 Maven 生命周期的测试阶段绑定了两个目标。第一个目标(按 pom.xml 中出现的顺序)是:
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>update</id>
<phase>test</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
第二个是:
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.1</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
在测试阶段,先执行surefire插件,这与Maven 3 FIFO在同一阶段的目标顺序相矛盾。我验证了目标在有效的 pom 中具有相同的顺序。是否有可能其中一个插件覆盖了默认顺序?为什么surefire插件在liquibase之前执行?
【问题讨论】:
标签: maven maven-3 maven-surefire-plugin