Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.Execute.execute()


                    final Execute executor = new Execute(); // new LogStreamHandler ( attributes , Project.MSG_INFO , Project.MSG_WARN ) ) ;
                    executor.setAntRun(getProject());
                    executor.setWorkingDirectory(getProject().getBaseDir());
                    executor.setCommandline(commandLine);
                    try {
                        executor.execute();
                    }
                    catch (final IOException ioe) {
                        throw new BuildException("Error running forked groovyc.", ioe);
                    }
                    final int returnCode = executor.getExitValue();
View Full Code Here


    execute.setWorkingDirectory(new File(jmeterHome.getAbsolutePath() + File.separator + "bin"));
    log(cmd.describeCommand(), Project.MSG_VERBOSE);

    try {
      execute.execute();
    }
    catch (IOException e) {
      throw new BuildException("JMeter execution failed.", e, getLocation());
    }
  }
View Full Code Here

        Execute exe = new Execute(this);
        exe.setCommandline(toExecute.getCommandline());
        exe.setAntRun(project);
        exe.setWorkingDirectory(this.cvsWorkingDirectory);
        try {
            exe.execute();
        } catch (IOException e) {
            throw new BuildException(e);
        }
    }
View Full Code Here

        try {           
            Execute exe = new Execute(handler);
            exe.setAntRun(getProject());                        
            exe.setWorkingDirectory(getProject().getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        }
        catch (java.io.IOException e) {
            throw new BuildException(e, location);
        }
    }
View Full Code Here

            }
           
            exe.setAntRun(project);
            exe.setWorkingDirectory(project.getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        } catch (java.io.IOException e) {
            throw new BuildException(e, location);
        }
    }
View Full Code Here

            Project aProj = getProject();
            Execute exe = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN));
            exe.setAntRun(aProj);
            exe.setWorkingDirectory(aProj.getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        }
        catch (java.io.IOException e) {
            throw new BuildException(e, location);
        }
    }
View Full Code Here

                        null);
        log(cmdl.toString(), Project.MSG_VERBOSE);
        process.setCommandline(cmdl.getCommandline());

        try {
            if (process.execute() != 0) {
                throw new BuildException("JJTree failed.");
            }
        }
        catch (IOException e) {
            throw new BuildException("Failed to launch JJTree: " + e);
View Full Code Here

            Project aProj = getProject();
            Execute exe = new Execute(out);
            exe.setAntRun(aProj);
            exe.setWorkingDirectory(aProj.getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            return exe.execute();
        }
        catch (java.io.IOException e) {
            String msg = "Failed executing: " + cmd.toString() + ". Exception: "+e.getMessage();
            throw new BuildException(msg, location);
        }
View Full Code Here

      // use the custom handler for stdin issues
      LogStreamHandler handler = new CoverageStreamHandler(this);
      Execute exec = new Execute( handler );
      log(cmdl.toString(), Project.MSG_VERBOSE);
      exec.setCommandline(cmdl.getCommandline());
      int exitValue = exec.execute();
      if (exitValue != 0) {
        throw new BuildException("JProbe Coverage failed (" + exitValue + ")");
      }
    } catch (IOException e){
      throw new BuildException("Failed to execute JProbe Coverage.", e);
View Full Code Here

        execute.setEnvironment(environment);

        log(cmd.describeCommand(), Project.MSG_VERBOSE);
        int retVal;
        try {
            retVal = execute.execute();
        } catch (IOException e) {
            throw new BuildException("Process fork failed.", e, getLocation());
        } finally {
            if (watchdog != null && watchdog.killedProcess()) {
                logTimeout(feArray, test);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.