import java.io.*; File f = new File( basedir, "target/parent-1-src.dir/child/test.txt" ); if ( !f.exists() ) { System.out.println( "Filtered file from file-set: " + f + " is missing." ); return false; } String line = null; BufferedReader reader = new BufferedReader( new FileReader( f ) ); line = reader.readLine(); reader.close(); System.out.println( "First line of test.txt: '" + line + "' should equal the project version: '1'." ); return "1".equals( line.trim() );