0

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?

long
  • 414
  • 4
  • 15

1 Answers1

0

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.

rea-al
  • 91
  • 4
  • so, `maven-invoker-plugin` doesn't have the way to specify some special module to run as a cleanup, right? – long Apr 05 '16 at 18:27
  • Not to clean up, only for setting up you can define which projects should run. See https://maven.apache.org/plugins/maven-invoker-plugin/examples/prepare-build-env.html – rea-al Apr 06 '16 at 00:11