public Maven getMaven() { if (maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }
/** * @param plugin * @param entry */ protected <T> T customize(T plugin, Attrs map) { if (plugin instanceof Plugin) { if (map != null) ((Plugin) plugin).setProperties(map); ((Plugin) plugin).setReporter(this); } if (plugin instanceof RegistryPlugin) { ((RegistryPlugin) plugin).setRegistry(this); } return plugin; }
protected static File[] requestAll(ResourceHandle[] handles) throws Exception { File[] result; if (handles == null) result = new File[0]; else { result = new File[handles.length]; for (int i = 0; i < result.length; i++) { result[i] = handles[i].request(); } } return result; }
protected void fireBundleAdded(Jar jar, File file) { if (registry == null) return; List<RepositoryListenerPlugin> listeners = registry .getPlugins(RepositoryListenerPlugin.class); for (RepositoryListenerPlugin listener : listeners) { try { listener.bundleAdded(this, jar, file); } catch (Exception e) { if (reporter != null) reporter.warning("Repository listener threw an unexpected exception: %s", e); } } }
@Override public void handle(URLConnection connection) throws Exception { for (URLConnectionHandler h : registry.getPlugins(URLConnectionHandler.class)) { h.handle(connection); } }
/** * Notify all {@link RepositoryListenerPlugin}s that this repository is * updated. */ private void notifyRepositoryListeners() { registry.getPlugins(RepositoryListenerPlugin.class) .forEach((RepositoryListenerPlugin rp) -> rp.repositoryRefreshed(this)); }
/** * Just report success to all download listeners * * @param blockers * @param file */ void ok(DownloadListener[] blockers, File file) { for (DownloadListener dl : blockers) { try { dl.success(file); } catch (Exception e) { // } } }
/** * Run all before command plugins */ void before(@SuppressWarnings("unused") Project p, String a) { List<CommandPlugin> testPlugins = getPlugins(CommandPlugin.class); for (CommandPlugin testPlugin : testPlugins) { testPlugin.before(this, a); } }
/** * @param plugin * @param entry */ protected <T> T customize(T plugin, Map<String, String> map) { if (plugin instanceof Plugin) { if (map != null) ((Plugin) plugin).setProperties(map); ((Plugin) plugin).setReporter(this); } if (plugin instanceof RegistryPlugin) { ((RegistryPlugin) plugin).setRegistry(this); } return plugin; }
public Maven getMaven() { if (maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }
/** * Notify all {@link RepositoryListenerPlugin}s that this repository is * updated. */ private void notifyRepositoryListeners() { registry.getPlugins(RepositoryListenerPlugin.class) .forEach((RepositoryListenerPlugin rp) -> rp.repositoryRefreshed(this)); }
/** * Just report success to all download listeners * * @param blockers * @param file */ void ok(DownloadListener[] blockers, File file) { for (DownloadListener dl : blockers) { try { dl.success(file); } catch (Exception e) { // } } }
protected static File[] requestAll(ResourceHandle[] handles) throws IOException { File[] result = (handles == null) ? new File[0] : new File[handles.length]; for (int i = 0; i < result.length; i++) { result[i] = handles[i].request(); } return result; }
public Maven getMaven() { if (maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }
/** * Just report success to all download listeners * * @param blockers * @param file */ void ok(DownloadListener[] blockers, File file) { for (DownloadListener dl : blockers) { try { dl.success(file); } catch (Exception e) { // } } }
protected static File[] requestAll(ResourceHandle[] handles) throws Exception { File[] result; if (handles == null) result = new File[0]; else { result = new File[handles.length]; for (int i = 0; i < result.length; i++) { result[i] = handles[i].request(); } } return result; }
public Maven getMaven() { if ( maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }
/** * Just report success to all download listeners * * @param blockers * @param file */ void ok(DownloadListener[] blockers, File file) { for (DownloadListener dl : blockers) { try { dl.success(file); } catch (Exception e) { // } } }
public Maven getMaven() { if (maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }
public Maven getMaven() { if (maven != null) return maven; maven = registry.getPlugin(Maven.class); return maven; }