private Set<Resource> findJarResource(URL url, String findDirPath, String subPattern) throws IOException {
        Set<Resource> resources = new HashSet<Resource>();
        URLConnection con = url.openConnection();
        if (con instanceof JarURLConnection) {
            JarURLConnection jarCon = (JarURLConnection) con;
            JarFile jarFile = jarCon.getJarFile();
            logger.info("load from jar file {}", jarCon.getJarFileURL().toExternalForm());
            for (Enumeration<JarEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
                JarEntry entry = entries.nextElement();
                String entryPath = entry.getName();
                if (entryPath.startsWith(findDirPath)) {
                    if (isMatch(entryPath, subPattern)) {
                        resources.add(new Resource(2, entryPath));
                    }
                }
            }
            jarFile.close();
        }
        return resources;
    }