import java.io.*; import java.util.*; import java.util.regex.*; try { File itDir = new File( basedir, "target/it" ); if ( !itDir.isDirectory() ) { System.out.println( "IT directory not existent: " + itDir ); return false; } // NOTE: It is part of the test design that "module" is a prefix of "module-1" String[] paths = { "module", "module/pom.xml", "module-1", "module-1/pom.xml", "module-1/empty-dir", "module-1/sub-module", "module-1/sub-module/pom.xml", }; for ( String path : paths ) { File file = new File( itDir, path ); if ( !file.exists() ) { System.out.println( "Cloned file/directory not existent: " + file ); return false; } } } catch( Throwable t ) { t.printStackTrace(); return false; } return true;