Sometimes, integration tests running with maven-invoker-plugin
need some environment preparation.
There is a good way of doing this setup - use setupIncludes
configuration property to specify set of special integration modules, which will be executed before the others (
http://maven.apache.org/plugins/maven-invoker-plugin/examples/prepare-build-env.html)
That's nice, but sometimes we also need a teardown procedure, to cleanup the environment after all integration tests are finished (whenever they where passed or not).
Is there any way to perform this kind of teardown activity with maven-invoker-plugin
?
You can indicate a pre/post script to perform any cleaning or validation tasks for each project in the org.apache.maven.plugins:maven-invoker-plugin:2.0.0:integration-test goal but also you may want to perform any set up or tear down by executing any plugins in the pre-integration-test and post-integration-test lifecycles.