The following example shows a plugin configuration using the invoker:install goal. This will cause the project artifact(s) to be installed to a dedicated local repository before executing the projects. This can be helpful if you want to build your project and test the new artifacts artifact in a single step instead of installing first and then running tests.
<project> ... <build> <plugins> <plugin> <artifactId>maven-invoker-plugin</artifactId> <version>1.6</version> <configuration> <projectsDirectory>src/it</projectsDirectory> <localRepositoryPath>target/local-repo</localRepositoryPath> </configuration> <executions> <execution> <id>integration-test</id> <goals> <goal>install</goal> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ... </project>