import java.io.*; import java.util.*; import java.util.regex.*; try { // check for primary artifact, which is the unshaded one! File file = new File( basedir, "target/finalNameShadeAttached-1.0.jar" ); System.out.println( "file with finalName : " + file ); if ( !file.exists() ) { System.out.println( "file with finalName does not exist: " + file ); return false; } // check for the shaded jar File shaded = new File( basedir, "target/MyFinalShadeName.jar" ); System.out.println( "shaded file with name : " + shaded ); if ( !shaded.exists() ) { System.out.println( "shaded file does not exist: " + shaded ); return false; } // check for the artifact in the repo File rfile = new File( localRepositoryPath , "org/apache/maven/its/shade/fnsa/finalNameShadeAttached/1.0/finalNameShadeAttached-1.0.jar" ); System.out.println( "Checking for existence in repo: " + rfile ); if ( !rfile.isFile() ) { throw new FileNotFoundException( "Missing: " + rfile.getAbsolutePath() ); } // check for the shaded artifact in the repo File afile = new File( localRepositoryPath , "org/apache/maven/its/shade/fnsa/finalNameShadeAttached/1.0/finalNameShadeAttached-1.0-shaded.jar" ); System.out.println( "Checking for existence in repo: " + afile ); if ( !afile.isFile() ) { throw new FileNotFoundException( "Missing: " + afile.getAbsolutePath() ); } } catch( Throwable t ) { t.printStackTrace(); return false; } return true;