示例#1
0
 void doStart(List<RemotePlugin> remotePlugins) {
   PluginFilter filter = new PluginFilter(settings, analysisMode);
   metadataByKey = Maps.newHashMap();
   for (RemotePlugin remote : remotePlugins) {
     if (filter.accepts(remote.getKey())) {
       File pluginFile = pluginDownloader.downloadPlugin(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());
 }
示例#2
0
 public void start() {
   LOG.info("Install plugins");
   doStart(pluginDownloader.downloadPluginIndex());
 }