我正在尝试将jbehave-maven-plugin
与cargo-maven2-plugin
进行整合。
jbehave-maven-plugin
配置为在integration-test
阶段
<configuration>
<scope>compile</scope>
<ignoreFailureInStories>true</ignoreFailureInStories>
<ignoreFailureInView>false</ignoreFailureInView>
<verboseFailures>true</verboseFailures>
<batch>true</batch>
...
</configuration>
<executions>
<execution>
<id>run-stories-as-embeddables</id>
<phase>integration-test</phase>
<goals>
<goal>run-stories-as-embeddables</goal>
</goals>
</execution>
cargo-maven2-plugin
已配置为cargo:start服务器,并在war
阶段和pre-integration-test
cargo:stop服务器中部署网络应用post-integration-test
我的意图是
pre-integration-test
阶段integration-test
阶段post-integration-test
阶段停止服务器verify
阶段当我尝试使用
运行此设置时mvn clean verify
没有测试失败时,它可以正常工作。
然而,当测试失败时,maven在integration-test
阶段停止,其余阶段不会执行。这导致无法停止服务器。
有没有办法让这个设置工作,以便生成报告并在verify
阶段报告失败
就像Maven Failsafe Plugin有两个不同的目标(failsafe:integration-test
&amp; failsafe:verify
)?