import java.io.*; import java.util.*; String[] paths = { "gid/test/0.1/test-0.1.jar", }; for ( String path : paths ) { File file = new File( new File( basedir, "target/local-repo" ), path ); System.out.println( "Checking for existence of " + file ); if ( !file.isFile() ) { throw new FileNotFoundException( "Existing: " + file.getAbsolutePath() ); } } return true;