private void loadClassPathPlugins(final ModuleDescriptorFactory moduleDescriptorFactory) throws PluginParseException { final Enumeration<URL> pluginDescriptorFiles; try { pluginDescriptorFiles = ClassLoaderUtils.getResources(fileNameToLoad, this.getClass()); } catch (final IOException e) { log.error("Could not load classpath plugins: " + e, e); return; } pluginLoaderMap = new LinkedHashMap<>(); while (pluginDescriptorFiles.hasMoreElements()) { final URL url = pluginDescriptorFiles.nextElement(); final SinglePluginLoader singlePluginLoader = new SinglePluginLoader(url); for (final Plugin plugin : singlePluginLoader.loadAllPlugins(moduleDescriptorFactory)) { pluginLoaderMap.put(plugin, singlePluginLoader); } } }