static void scanJarForMatchingFiles(List<String> matchingFiles, File jarfile, Logger log) {
        try {
            JarFile jar = new JarFile(jarfile);
            Enumeration<JarEntry> entries = jar.entries();
            while (entries.hasMoreElements()) {
                String name = entries.nextElement().toString();
                if (name.endsWith(PACKAGE_INFO_CLASS)) {
                    String className = name.substring(0, name.length() - DOT_CLASS.length())
                            .replaceAll(SLASH_REGEX, ".");
                    if (log != null && log.isLoggable(FINEST)) {
                        StringBuilder sb = new StringBuilder("scan found class ");
                        sb.append(className);
                        sb.append(" in jar ");
                        sb.append(jarfile);
                        log.log(FINEST, sb.toString());
                    }
                    matchingFiles.add(className);
                }
            }
        } catch (Exception e) {
            if (log != null && log.isLoggable(SEVERE)) {
                log.log(SEVERE, "problem scanning jar for matching files", e);
            }
        }
    }