PluginFilter filter = new PluginFilter(settings, analysisMode);
metadataByKey = Maps.newHashMap();
for (RemotePlugin remote : remotePlugins) {
if (filter.accepts(remote.getKey())) {
File pluginFile = pluginsReferential.pluginFile(remote);
PluginMetadata metadata = pluginInstaller.installToCache(pluginFile, remote.isCore());
if (StringUtils.isBlank(metadata.getBasePlugin()) || filter.accepts(metadata.getBasePlugin())) {
metadataByKey.put(metadata.getKey(), metadata);
} else {
LOG.debug("Excluded plugin: " + metadata.getKey());
}
}
}
classLoaders = new PluginClassloaders(Thread.currentThread().getContextClassLoader());
pluginsByKey = classLoaders.init(metadataByKey.values());