import java.io.*;
import org.codehaus.plexus.util.FileUtils;


String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
String expected = "jruby-1.5.6 mode 1.8: An error occurred";
if ( !log.contains( expected ) )
{
    throw new RuntimeException( "log file does not contain '" + expected + "'" );
}

expected = "jruby-1.6.1 mode 1.8: An error occurred";
if ( !log.contains( expected ) )
{
    throw new RuntimeException( "log file does not contain '" + expected + "'" );
}

expected = "jruby-1.6.1 mode 1.9: An error occurred";
if ( !log.contains( expected ) )
{
    throw new RuntimeException( "log file does not contain '" + expected + "'" );
}


expected = "BUILD FAILURE";
if ( !log.contains( expected ) )
{
    throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
