if ( !interactive )
{
cl.createArgument().setValue( "--batch-mode" );
}
StreamConsumer stdOut = new TeeConsumer( System.out );
StreamConsumer stdErr = new TeeConsumer( System.err );
try
{
relResult.appendInfo( "Executing: " + cl.toString() );
getLogger().info( "Executing: " + cl.toString() );
int result = CommandLineUtils.executeCommandLine( cl, stdOut, stdErr );
if ( result != 0 )
{
throw new MavenExecutorException( "Maven execution failed, exit code: \'" + result + "\'", result,
stdOut.toString(), stdErr.toString() );
}
}
catch ( CommandLineException e )
{
throw new MavenExecutorException( "Can't run goal " + goals, stdOut.toString(), stdErr.toString(), e );
}
finally
{
relResult.appendOutput( stdOut.toString() );
}