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

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

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

Project.fireBuildFinished介绍

[英]Send a "build finished" event to the build listeners for this project.
[中]将“build finished”事件发送到此项目的生成侦听器。

代码示例

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

if (!projectHelp) {
  try {
    project.fireBuildFinished(error);
  } catch (final Throwable t) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

@Override
public void fireBuildFinished(Throwable exception) {
  super.fireBuildFinished(exception);
  Enumeration<BuildListener> e = getBuildListeners().elements();
  while (e.hasMoreElements()) {
    BuildListener listener = e.nextElement();
    removeBuildListener(listener);
  }
}

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

public void close() {
  Project project = getProject();
  project.fireBuildFinished(null);
  ComponentHelper helper = ComponentHelper.getComponentHelper(project);
  helper.getAntTypeTable().clear();
  helper.getDataTypeDefinitions().clear();
  project.getReferences().clear();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

private void cleanup() {
  AntProjectNode projectNode = getProjectNode();
  if (projectNode != null) {
    // cleanup the introspection helpers that may have been generated
    IntrospectionHelper.clearCache();
    projectNode.getProject().fireBuildFinished(null);
  }
  fEncoding = null;
}

代码示例来源:origin: net.sf.jabb/jabb-core

@Override
public void execute() throws BuildException{
  getProject().fireBuildStarted();
  super.execute();
  getProject().fireBuildFinished(null);
}

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

throw e;
} finally {
 _project.fireBuildFinished(error);

代码示例来源:origin: org.paxml/PaxmlCore

p.fireBuildFinished(null);
} catch (Exception e) {
  p.fireBuildFinished(e);
  if (failOnError) {
    throw new PaxmlRuntimeException(e);

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

p.fireBuildFinished(null);
} catch (Throwable e) {
  p.fireBuildFinished(e);
  if (failOnError) {
    throw new PaxmlRuntimeException(e);

代码示例来源:origin: jetoile/hadoop-unit

private void makeRedis() throws IOException, InterruptedException {
  LOGGER.info("> make");
  File makeFilePath = getInstallationDirectory();
  DefaultLogger consoleLogger = getConsoleLogger();
  Project project = new Project();
  File buildFile = getAntFile();
  project.setUserProperty("ant.file", buildFile.getAbsolutePath());
  project.addBuildListener(consoleLogger);
  try {
    project.fireBuildStarted();
    project.init();
    ProjectHelper projectHelper = ProjectHelper.getProjectHelper();
    project.addReference("ant.projectHelper", projectHelper);
    project.setProperty("redisDirectory", makeFilePath.getAbsolutePath());
    projectHelper.parse(project, buildFile);
    project.executeTarget("init");
    project.fireBuildFinished(null);
  } catch (BuildException buildException) {
    project.fireBuildFinished(buildException);
    throw new RuntimeException("!!! Unable to compile redis !!!", buildException);
  }
}

代码示例来源:origin: stackoverflow.com

public final void launch(final String antScriptFile) {
/* configure Ant and execute the task */
 final File buildFile = new File(antScriptFile);
 final Project p = new Project();
 p.setUserProperty("ant.file", buildFile.getAbsolutePath());
 final DefaultLogger consoleLogger = new DefaultLogger();
 consoleLogger.setErrorPrintStream(System.err);
 consoleLogger.setOutputPrintStream(System.out);
 consoleLogger.setMessageOutputLevel(Project.MSG_INFO);
 p.addBuildListener(consoleLogger);
 try {
   p.fireBuildStarted();
   p.init();
   final ProjectHelper helper = ProjectHelper.getProjectHelper();
   p.addReference("ant.projectHelper", helper);
   helper.parse(p, buildFile);
   p.executeTarget(p.getDefaultTarget());
   p.fireBuildFinished(null);
 } catch (final BuildException e) {
   p.fireBuildFinished(e);
 }
 /* exit the current VM */
 System.exit(0);

代码示例来源:origin: eu.mihosoft.vrl/vrl

/**
   * Cleans the specified project.
   *
   * To prevent cleaning of the whole project one may considder
   * {@link VProjectController#removeInnerClassFilesOf(java.lang.String) }
   * instead of setting the
   * <code>clean</code> property to
   * <code>true</code>.
   *
   * @param vpc project controller
   * @throws BuildException
   *
   */
  public static void clean(VProjectController vpc) throws BuildException {
    Project p = prepare(vpc);
    try {
      p.fireBuildStarted();
      p.init();
      ProjectHelper helper = ProjectHelper.getProjectHelper();
      p.addReference("ant.projectHelper", helper);
      helper.parse(p, getBuildFile(vpc));

      p.executeTarget("clean");
      p.fireBuildFinished(null);
    } catch (BuildException e) {
      p.fireBuildFinished(e);
      throw e;
    }
  }
}

代码示例来源:origin: stackoverflow.com

project.fireBuildFinished(null);
 success = true;
} catch (BuildException buildException) {
 project.fireBuildFinished(buildException);

代码示例来源:origin: eu.mihosoft.vrl/vrl

public static void main(String[] args) {
    
    
    File buildFile = new File("/home/miho/tmp/anttest/build.xml");
    Project p = new Project();
    p.setUserProperty("ant.file", buildFile.getAbsolutePath());

    p.setProperty("name", "World");

    DefaultLogger consoleLogger = new DefaultLogger();
    consoleLogger.setErrorPrintStream(System.err);
    consoleLogger.setOutputPrintStream(System.out);
    consoleLogger.setMessageOutputLevel(Project.MSG_INFO);
    p.addBuildListener(consoleLogger);

    try {
      p.fireBuildStarted();
      p.init();
      ProjectHelper helper = ProjectHelper.getProjectHelper();
      p.addReference("ant.projectHelper", helper);
      helper.parse(p, buildFile);
      p.createClassLoader(ClassLoader.getSystemClassLoader(),new Path(p));
      p.executeTarget(p.getDefaultTarget());
      p.fireBuildFinished(null);
    } catch (BuildException e) {
      p.fireBuildFinished(e);
    }
  }
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

public static VBuildResult build(VProjectController vpc, boolean overwriteBuildScript) {
  Project p = prepare(vpc, overwriteBuildScript);
  ProjectBuildListener buildListener = new ProjectBuildListener(vpc);
  p.addBuildListener(buildListener);
  BuildException exception = null;
  try {
    p.fireBuildStarted();
    p.init();
    ProjectHelper helper = ProjectHelper.getProjectHelper();
    p.addReference("ant.projectHelper", helper);
    helper.parse(p, getBuildFile(vpc));
    p.executeTarget(p.getDefaultTarget());
    p.fireBuildFinished(null);
     } catch (BuildException e) {
    p.fireBuildFinished(e);
    exception = e;
  }
  return buildListener.getBuildResult();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

getClassLoader(null);
System.setSecurityManager(origSM);
project.fireBuildFinished(null); // cleanup (IntrospectionHelper)

代码示例来源:origin: stackoverflow.com

p.fireBuildFinished(e);
throw new AssertionError(e);

代码示例来源:origin: stackoverflow.com

ex = e;
} finally {
 p.fireBuildFinished(ex);

代码示例来源:origin: stackoverflow.com

ex = e;
} finally {
  p.fireBuildFinished(ex);

代码示例来源:origin: org.metaeffekt.dcc/dcc-commons

project.fireBuildFinished(null);

代码示例来源:origin: openimaj/openimaj

} finally {
  project.log("finished");
  project.fireBuildFinished(caught);

相关文章