import java.io.*;
import java.util.jar.*;
import java.util.*;
import java.net.*;

File file = new File( basedir, "target/manifest-with-mainClass-1-jar-with-dependencies.jar" );

System.out.println( "file: " + file + " exists? " + file.exists() );

JarFile jarFile = new JarFile( file );

Manifest mf = jarFile.getManifest();

Attributes attrs = mf.getMainAttributes();

String mainClass = (String) attrs.get( Attributes.Name.MAIN_CLASS );

System.out.println( "Got Main-Class: " + mainClass );

return "test.App".equals( mainClass );
