org.apache.tools.ant.Project.removeBuildListener()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中org.apache.tools.ant.Project.removeBuildListener()方法的一些代码示例,展示了Project.removeBuildListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.removeBuildListener()方法的具体详情如下:
包路径:org.apache.tools.ant.Project
类名称:Project
方法名:removeBuildListener

Project.removeBuildListener介绍

[英]Remove a build listener from the list. This listener will no longer be notified of build events for this project.
[中]从列表中删除生成侦听器。此侦听器将不再被通知此项目的生成事件。

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * 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;
}

代码示例来源:origin: org.apache.ant/ant

/**
 * @since 1.6.2
 */
public void cleanup() {
  closeFile();
  if (project != null) {
    project.removeBuildListener(this);
  }
  project = null;
}

代码示例来源:origin: org.apache.ant/ant

/**
 * 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;
}

代码示例来源:origin: org.apache.ant/ant

/**
   * 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);
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * 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;
}

代码示例来源:origin: org.apache.ivy/ivy

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);
  }
}

代码示例来源:origin: org.gosu-lang.aardvark/aardvark-core

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);
 }
}

代码示例来源:origin: de.unkrig/antology

for (BuildListener bl : orig) project.removeBuildListener(bl);

代码示例来源:origin: org.apache.ant/ant-swing

if (splash != null) {
  splash.setVisible(false);
  getProject().removeBuildListener(splash);
  splash.dispose();

代码示例来源:origin: org.gradle/gradle-core

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;
}

相关文章