long
long

Reputation: 414

Howto cleanup build environment with maven-invoker-plugin

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?

Upvotes: 0

Views: 590

Answers (1)

rea-al
rea-al

Reputation: 91

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.

Upvotes: 0

Related Questions