I am trying to integrate jbehave-maven-plugin
with cargo-maven2-plugin
.
jbehave-maven-plugin
is configured to run during integration-test
phase
<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
is configured to cargo:start server and deploy web app war
in pre-integration-test
phase and cargo:stop server in post-integration-test
My Intention is to
- Starts server & deploy apps in
pre-integration-test
phase - Run jBehave tests in
integration-test
phase - Stop server in
post-integration-test
phase - Report any test failures in
verify
phase
when I try to run this setup with
mvn clean verify
it works fine when there are no test failures.
However when there are test failures maven stops in integration-test
phase and rest of the phases are not executed . this results in failure to stop server.
Is there any way to make this setup work so that reports are generated and failures are reported in verify
phase
just like Maven Failsafe Plugin does with two distinct goals (failsafe:integration-test
& failsafe:verify
) ?