Package org.apache.tools.ant.taskdefs

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


      execute.setStreamHandler(streamHandler);
      execute.setNewenvironment(newEnvironment);
      if (env.getVariables() != null)
        execute.setEnvironment(env.getVariables());
      log("Starting JVM J" + slaveInfo.id, Project.MSG_DEBUG);
      int exitStatus = execute.execute();
      log("Forked JVM J" + slaveInfo.id + " finished with exit code: "
          + exitStatus, Project.MSG_DEBUG);

      if (execute.isFailure()) {
        if (exitStatus == SlaveMain.ERR_NO_JUNIT) {
View Full Code Here


        Execute exe = new Execute();
        setupExecutable(exe, cmdl.getCommandline());
       
        int result = -1;
        try {
            result = exe.execute();
        } catch (IOException e) {
            throw new BuildException(e, getLocation());
        }
       
        if (result != 0) {
View Full Code Here

        checkForkedPath(cmd);

        TestResultHolder result = new TestResultHolder();
        try {
            result.exitCode = execute.execute();
        } catch (IOException e) {
            throw new BuildException("Process fork failed.", e, getLocation());
        } finally {
            String vmCrashString = "unknown";
            BufferedReader br = null;
View Full Code Here

        exe.setWorkingDirectory(buildDir);

        exe.setCommandline(cmd.getCommandline());
        int result=0;
        try {
            result=exe.execute();
        } catch (IOException e) {
            throw new BuildException(e, location);
        }
        return result;
    }
View Full Code Here

        if (getOutputFile() != null) {
            log("Output to be stored in " + getOutputFile().getPath());
        }
        log(commandline.describeCommand(), Project.MSG_VERBOSE);
        try {
            return execute.execute();
        } catch (IOException e) {
            throw new BuildException("Process fork failed.", e, getLocation());
        }
    }
View Full Code Here

        }

        Execute exe = getExecute(toExecute, streamhandler);
        try {
            log("Building the RPM based on the " + specFile + " file");
            int returncode = exe.execute();
            if (Execute.isFailure(returncode)) {
                String msg = "'" + toExecute.getExecutable()
                    + "' failed with exit code " + returncode;
                if (failOnError) {
                    throw new BuildException(msg);
View Full Code Here

            exe.setAntRun(getProject());
            exe.setWorkingDirectory(getProject().getBaseDir());
            exe.setCommandline(cmd.getCommandline());
            // Use the OS launcher so we get environment variables
            exe.setVMLauncher(false);
            return exe.execute();
        } catch (IOException e) {
            throw new BuildException(e, getLocation());
        }
    }
View Full Code Here

                    exe.setVMLauncher(true);
                }
                exe.setAntRun(project);
                exe.setWorkingDirectory(project.getBaseDir());
                exe.setCommandline(commandArray);
                exe.execute();
                return exe.getExitValue();
            } catch (IOException e) {
                throw new BuildException("Error running " + args[0]
                        + " compiler", e, location);
            }
View Full Code Here

        exec.setCommandline( cmdLine.toArray(new String[] {}) );
        List<String> env = getCommandEnvironment(command);
        if (!env.isEmpty()) {
            exec.setEnvironment(env.toArray(new String[] {}) );
        }
        exec.execute();
    }
   
    protected List<String> getCommandArguments(String command) {
        if (GSH.equals(command)) {
            return Arrays.asList("-T", "false");
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, location);
    }
  }
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.