blob: 8a98f90d0002dc1cc03a75bd306a4bef14513d60 [file] [log] [blame]
import java.io.*;
import java.util.zip.*;
File attachedJarFile = new File( basedir, "excluded.jar" );
System.out.println( "Checking for existence of " + attachedJarFile );
if ( !attachedJarFile.isFile() )
{
throw new Exception( "missing " + attachedJarFile );
}
ZipFile attachedJar = new ZipFile( attachedJarFile );
System.out.println( "Checking for absence of " + attachedJarFile.getName() + "!/META-INF/TESTING.SF" );
if ( attachedJar.getEntry( "META-INF/TESTING.SF" ) != null )
{
throw new Exception( "present " + attachedJarFile.getName() + "!/META-INF/TESTING.SF" );
}
System.out.println( "Checking for absence of " + attachedJarFile.getName() + "!/META-INF/TESTING.DSA" );
if ( attachedJar.getEntry( "META-INF/TESTING.DSA" ) != null )
{
throw new Exception( "present " + attachedJarFile.getName() + "!/META-INF/TESTING.DSA" );
}
attachedJar.close();
return true;