Using with other integration test frameworks
If you are using other integration test frameworks, or if you need to setup an integration test environment prior to test execution and tear that environment down afterwards, then you need to use the invoker:integration-test
and invoker:verify
goals in place of invoker:run
. For example:
<project> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-invoker-plugin</artifactId> <version>3.8.1</version> <executions> <execution> <id>integration-test</id> <goals> <!-- <goal>install</goal> --> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
This will allow any plugins bound to the post-integration-test
phase to execute before the verify
phase executes the invoker:verify
goal that we have just bound.