File logFile = new File( "target/build.log" );
if ( logFile.exists() )
{
logFile.delete();
}
SystemStreamLog systemStreamLog = new SystemStreamLog();
ScriptRunner scriptRunner = new ScriptRunner( systemStreamLog );
scriptRunner.setGlobalVariable( "globalVar", "Yeah baby it's rocks" );
scriptRunner.run( "test", new File( "src/test/resources/groovy-test" ), "verify", buildContext(),
new FileLogger( logFile ), "foo", true );