Example #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());
 }
Example #2
0
 public void stop() {
   if (classLoaders != null) {
     classLoaders.clean();
     classLoaders = null;
   }
 }