------ Installing Artifacts Example ------ Paul Gier ------ 22 April 2008 ------ Example using postBuildHookScript Here is an example of how the Invoker Plugin can be used to run a set of Maven projects and then verify their output with a BeanShell script. The name of the script file in this case is <<>>. ------------------- maven-invoker-plugin 1.2 integration-test run true src/it **/pom.xml **/child*/pom.xml **/module*/pom.xml verify.bsh ------------------- Here is an example post build script (<<>>) that checks for the existence of a jar file after the build has run. If the jar file does not exist, the script returns <<>> which causes the Invoker Plugin to log that the build failed. The global variable <<>> of type <<>> can be used to refer to the base directory of the current integration test. ------------------- import java.io.*; try { File file = new File( basedir, "target/my-test-project-1.0-SNAPSHOT.jar" ); if ( !file.isFile() ) { System.err.println( "Could not find generated jar: " + file ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true; -------------------