import java.io.*; import java.util.*; String[] paths = { "org/apache/maven/its/install/skip/test/maven-metadata-local.xml", "org/apache/maven/its/install/skip/test/1.0/test-1.0.pom", "org/apache/maven/its/install/skip/test/1.0/test-1.0.jar", }; for ( String path : paths ) { File file = new File( localRepositoryPath, path ); System.out.println( "Checking for non existence of " + file ); if ( file.isFile() ) { throw new Exception( "Existence of file: " + file.getAbsolutePath() ); } } return true;