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

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

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

Project.fireBuildStarted介绍

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

代码示例

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

project.fireBuildStarted();

代码示例来源: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

_project.fireBuildStarted();

代码示例来源:origin: dita-ot/dita-ot

project.fireBuildStarted();
project.init();
project.setBaseDir(ditaDir);

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

p.fireBuildStarted();
p.init();
ProjectHelper helper = ProjectHelper.getProjectHelper();

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

p.fireBuildStarted();
p.init();
ProjectHelper helper = ProjectHelper.getProjectHelper();

代码示例来源:origin: com.legsem.legstar/legstar-cob2trans

/**
 * Generate JAXB classes from an XML Schema.
 * 
 * @param xsdFile
 *            the XML SChema file
 * @param srcDir
 *            the target source folder
 * @param model the options in effect
 * @throws Cob2TransException if JAXB generator produces nothing
 */
public static void jaxbgen(final File xsdFile, final File srcDir,
    final JaxbGenModel model) throws Cob2TransException {
  CobolJAXBGenerator jaxbGenerator = new CobolJAXBGenerator(model);
  jaxbGenerator.setProject(new Project());
  jaxbGenerator.init();
  jaxbGenerator.getProject().fireBuildStarted();
  jaxbGenerator.setXsdFile(xsdFile);
  jaxbGenerator.setTargetDir(srcDir);
  jaxbGenerator.execute();
  // If nothing created no need to continue
  if (FileUtils.listFiles(srcDir, new String[] { "java" }, true).size() == 0) {
    throw new Cob2TransException(
        "JAXB Generator did not find any complex types in "
            + xsdFile);
  }
}

代码示例来源: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

project.setUserProperty(m.getKey().toString(), m.getValue().toString());
project.fireBuildStarted();
project.init();
ProjectHelper helper = ProjectHelper.getProjectHelper();

代码示例来源: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: wala/WALA

p.setBaseDir(projectDir);
p.init();
p.fireBuildStarted();

代码示例来源: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: stackoverflow.com

BuildException ex = null;
try {
  p.fireBuildStarted();
  p.init();
  ProjectHelper helper = ProjectHelper.getProjectHelper();

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

BuildException ex = null;
try {
  p.fireBuildStarted();
  p.init();
  ProjectHelper helper = ProjectHelper.getProjectHelper();

代码示例来源:origin: dita-ot/dita-ot

System.setOut(new PrintStream(new DemuxOutputStream(project, false)));
System.setErr(new PrintStream(new DemuxOutputStream(project, true)));
project.fireBuildStarted();
project.init();
project.setUserProperty("transtype", transtype.name);

代码示例来源: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: dita-ot/dita-ot

System.setOut(new PrintStream(new DemuxOutputStream(project, false)));
System.setErr(new PrintStream(new DemuxOutputStream(project, true)));
project.fireBuildStarted();
project.init();
for (final String transtype : transtypes) {

代码示例来源: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: com.github.odavid.maven.plugins/plexus-ant-factory

project.fireBuildStarted();

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

project.setBaseDir(op.workingDir);
project.init();
project.fireBuildStarted();

相关文章