java - Force execution of a Maven phase -


i have maven pom pre-integration-test , post-integration-test phases follows.

<execution>     <id>start-server</id>     <phase>pre-integration-test</phase>     <goals>         <goal>start-server</goal>     </goals>     <configuration>     </configuration> </execution> <execution>     <id>stop-running-server</id>     <phase>post-integration-test</phase>     <goals>         <goal>stop-server</goal>     </goals>     <configuration>         <skip>false</skip>     </configuration> </execution> 

how force post-integration-test phase executed when pre-integration-test phase fails? right now, if pre-integration-test phase fails post-integration-test phase doesn't executed.

taken http://maven.apache.org/surefire/maven-failsafe-plugin/

if use surefire plugin running tests, when have test failure, build stop @ integration-test phase , integration test environment not have been torn down correctly.

the failsafe plugin used during integration-test , verify phases of build lifecycle execute integration tests of application. failsafe plugin not fail build during integration-test phase, enabling post-integration-test phase execute.

note: when running integration tests, should invoke maven (shorter type too)


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -