Package org.eclipse.ant.core

Examples of org.eclipse.ant.core.AntRunner


  protected void createFile(
      IResource resource,
      String fileName,
      IProgressMonitor monitor)
  throws CoreException {
    AntRunner runner = new AntRunner();
    ForrestPlugin plugin = ForrestPlugin.getDefault();
    String strPluginDir = plugin.getBundle().getLocation();
    if (strPluginDir.startsWith("update@")) {
      strPluginDir = strPluginDir.substring(8);
    }
    runner.setBuildFileLocation(strPluginDir + resourceAntScript);
    String strPath = resource.getLocation().toOSString();
    StringBuffer sb = new StringBuffer("-Dresource.dir=");
    sb.append(strPath);
    sb.append(" ");
    sb.append("-Dresource.name=");
    sb.append(fileName);
    runner.setArguments(sb.toString());
    runner.run(monitor);
      resource.refreshLocal(IProject.DEPTH_INFINITE, monitor);
  }
View Full Code Here


    if (cmdString != null) {
      String fhome = ForrestPlugin.getDefault().getPluginPreferences()
          .getString(ForrestPreferences.FORREST_HOME);
      String antFile = fhome + File.separatorChar + "main"
          + File.separatorChar + "forrest.build.xml";
      AntRunner runner = new AntRunner();
      runner.setCustomClasspath(getAntClasspath());
      runner.addBuildListener(AntBuildListener.class.getName());
      runner.setMessageOutputLevel(Project.MSG_INFO);
      try {
        runner.setBuildFileLocation(antFile);
        runner.setArguments(cmdString);
        logger.info("Running ANT with command string = " + cmdString);
        runner.run(monitor);
      } catch (CoreException e) {
        String userMsg;
        String errMsg = e.getMessage();
        if (errMsg.indexOf(VALIDATION_ERROR_MESSAGE) > 0) {
          String file = errMsg.substring(errMsg
View Full Code Here

  protected void createFile(
      IResource resource,
      String fileName,
      IProgressMonitor monitor)
  throws CoreException {
    AntRunner runner = new AntRunner();
    ForrestPlugin plugin = ForrestPlugin.getDefault();
    String strPluginDir = plugin.getBundle().getLocation();
    if (strPluginDir.startsWith("update@")) {
      strPluginDir = strPluginDir.substring(8);
    }
    runner.setBuildFileLocation(strPluginDir + resourceAntScript);
    String strPath = resource.getLocation().toOSString();
    StringBuffer sb = new StringBuffer("-Dresource.dir=");
    sb.append(strPath);
    sb.append(" ");
    sb.append("-Dresource.name=");
    sb.append(fileName);
    sb.append(" ");
    sb.append("-verbose");
    runner.setArguments(sb.toString());
    runner.run(monitor);
      resource.refreshLocal(IProject.DEPTH_INFINITE, monitor);
  }
View Full Code Here

        }

        obrComplete = false;

        File buildFile;
        final AntRunner runner = new AntRunner();

        try {
            buildFile = getAntBuildFile();

            runner.setBuildFileLocation(buildFile.getAbsolutePath());
            runner.setArguments("-Dobr.filename=" + obrFile.getAbsolutePath());
            runner.run(monitor);
        } catch (final CoreException e) {
            monitor.setCanceled(true);

            return Status.CANCEL_STATUS;
        } catch (final IOException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.ant.core.AntRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.