My test setup is such that before integration-test phase I need to start
server A and stop server B. After integration-test phase I need to stop
server A and start server B again.

Now I have done this by adding executions and binding them to
pre-integration-test and post-integration-test phases:

                            <execution>
                                <id>update tomcats after integration
tests</id>
                                <phase>post-integration-test</phase>
                                <configuration>
                                    <tasks>
                                        <echo>
                                            stopping test tomcat for
continuum
                                        </echo>
                                        <exec
executable="${test.container.stop.command}" 
                                         spawn="true" />
                                        <echo>
                                            starting test tomcat
                                        </echo>
                                        <exec
executable="${dev.container.start.command}" 
                                         spawn="true" />
                                        <echo>integration tests done, dev
tomcat running again</echo>
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>

This works fine when the integration test pass. My integration test phase
calls Canoo Webtest to test web pages, and does this by simply executing an
ant command. 

When web tests fail, I get BUILD ERROR and post-integration-test phase is
never reached. Hence the "cleanup" is not done and wrong server is left
running.

How could I ensure that my cleanup is done also when integration-test phase
fails?
-- 
View this message in context: 
http://www.nabble.com/Cleanup-after-failed-integration-test-phase--tp16002531s177p16002531.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to