private static void zipFileRec( File srcDir, String path, ZipOutputStream zout, List excludes ) throws IOException {
        if (excludes.contains(path))
            return;

        File longPath = new File( srcDir, path );
        File[] files = longPath.listFiles();
        for( int i = 0; i < files.length; i++ ) {
            File f = files[ i ];
            if( ".".equals( f.getName() ) || "..".equals( f.getName() ) )
                continue;
            else if( f.isDirectory() )
                zipFileRec( srcDir, path.length() == 0 ? f.getName() : path + "/" + f.getName(), zout, excludes );
            else {
                InputStream in = null;
                try {
                    in = new FileInputStream( new File( longPath, f.getName() ) );
                    String entryName = path.length() == 0 ? f.getName() : path + "/" + f.getName();
                    ZipEntry entry = new ZipEntry( entryName );
                    zout.putNextEntry( entry );
                    IOUtil.copy(in, zout);
                    zout.closeEntry();
                }
                finally {
                    in.close();
                }
            }
        }

    }