/** * Cleans up any resources held by this classloader. Any open archive * files are closed. */ public synchronized void cleanup() { for (Enumeration e = jarFiles.elements(); e.hasMoreElements();) { JarFile jarFile = (JarFile) e.nextElement(); try { jarFile.close(); } catch (IOException ioe) { // ignore } } jarFiles = new Hashtable(); if (project != null) { project.removeBuildListener(this); } project = null; }
/** * @since 1.6.2 */ public void cleanup() { closeFile(); if (project != null) { project.removeBuildListener(this); } project = null; }
/** * Cleans up any resources held by this classloader. Any open archive * files are closed. */ public synchronized void cleanup() { for (final JarFile jarFile : jarFiles.values()) { FileUtils.close(jarFile); } jarFiles = new Hashtable<>(); if (project != null) { project.removeBuildListener(this); } project = null; }
/** * cleans recorder registry and removes itself from BuildListener list. * * @since Ant 1.7 */ private void cleanup() { recorderEntries.entrySet().removeIf(e -> e.getValue().getProject() == getProject()); getProject().removeBuildListener(this); } }
/** * Cleans up any resources held by this classloader. Any open archive * files are closed. */ public synchronized void cleanup() { for (Enumeration e = jarFiles.elements(); e.hasMoreElements();) { JarFile jarFile = (JarFile) e.nextElement(); try { jarFile.close(); } catch (IOException ioe) { // ignore } } jarFiles = new Hashtable(); if (project != null) { project.removeBuildListener(this); } project = null; }
public void taskFinished(BuildEvent event) { // NB: There is somtimes task created by an other task // in that case, we should not uninit Message. The log should stay associated // with the initial task, except if it was an antcall, ant or subant target // NB2 : Testing the identity of the task is not enought, event.getTask() return // an instance of UnknownElement is wrapping the concrete instance stackDepth--; if (stackDepth == -1) { ivy.getLoggerEngine().popLogger(); event.getProject().removeBuildListener(this); } }
public static void setProject(Project project, BuildLogger logger) { _antProjectInstance = project; if (logger != null) { project.removeBuildListener(_logger); _logger = logger; logger.setMessageOutputLevel(Project.MSG_INFO); logger.setOutputPrintStream(System.out); logger.setErrorPrintStream(System.err); project.addBuildListener(logger); } }
for (BuildListener bl : orig) project.removeBuildListener(bl);
if (splash != null) { splash.setVisible(false); getProject().removeBuildListener(splash); splash.dispose();
public DefaultAntBuilder create() { AntLoggingAdapter loggingAdapter = loggingAdapterFactory.create(); DefaultAntBuilder antBuilder = new DefaultAntBuilder(project, loggingAdapter); antBuilder.getProject().setBaseDir(project.getProjectDir()); antBuilder.getProject().removeBuildListener(antBuilder.getProject().getBuildListeners().get(0)); antBuilder.getProject().addBuildListener(loggingAdapter); stoppable.add(antBuilder); return antBuilder; }