import java.io.*; import java.util.*; import java.util.regex.*; import org.codehaus.plexus.util.*; try { File buildLog = new File( basedir, "build.log" ); String log = FileUtils.fileRead( buildLog ); if ( log.indexOf( "[echo] [ANTRUN-OUTPUT-MARKER:IF]" ) < 0 ) { System.err.println( "Generated console output does not contain expected marker output" ); return false; } if ( log.indexOf( "[echo] [ANTRUN-OUTPUT-MARKER:UNLESS]" ) >= 0 ) { System.err.println( "Generated console output contains unexpected marker output" ); return false; } } catch( Throwable t ) { t.printStackTrace(); return false; } return true;