/** * Executes the given source-file or classname with the given arguments in a separate VM. * @param command String[] of command-line arguments. */ private int fork(String[] command) throws BuildException { Execute exe = new Execute(redirector.createHandler(), createWatchdog()); setupExecutable(exe, command); try { int rc = exe.execute(); redirector.complete(); if (exe.killedProcess()) { throw new BuildException(TIMEOUT_MESSAGE); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
if (exe.killedProcess()) { String msg = "Timeout: killed the sub-process"; if (failOnError) {
throw new BuildException(e); } finally { timedOut = exe.killedProcess();
/** * Executes the given classname with the given arguments in a separate VM. */ private int run(String[] command) throws BuildException { LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(logstr); exe.setAntRun(project); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, location); } }
/** * Executes the given classname with the given arguments in a separate VM. */ private int run(String[] command) throws BuildException { LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(logstr); exe.setAntRun(project); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, location); } }
/** * Executes the given classname with the given arguments in a separate VM. */ private int run(String[] command) throws BuildException { for (int i = 0; i < command.length; i++) { System.out.println("#### command[" + i + "] =" + command[i]); } Execute exe = null; exe = new Execute(); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given classname with the given arguments in a separate VM. */ private int run(String[] command) throws BuildException { LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(logstr); exe.setAntRun(project); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, location); } }
/** * Executes the given classname with the given arguments in a separate VM. */ private int run(String[] command) throws BuildException { LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(logstr); exe.setAntRun(project); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, location); } }
public void execute() throws BuildException { buildCommandLine(); LogStreamHandler log = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(log); exe.setAntRun(getProject()); exe.setCommandline(cmd.getCommandline()); try { int rc = exe.execute(); if (exe.killedProcess() || rc != 0) { throw new BuildException("java2ws failed", getLocation()); } } catch (IOException e) { throw new BuildException(e, getLocation()); } }
public void execute() throws BuildException { buildCommandLine(); LogStreamHandler log = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); Execute exe = new Execute(log); exe.setAntRun(getProject()); exe.setCommandline(cmd.getCommandline()); try { int rc = exe.execute(); if (exe.killedProcess() || rc != 0) { throw new BuildException("wsdl2java failed", getLocation()); } } catch (IOException e) { throw new BuildException(e, getLocation()); } }
throw new BuildException(e); } finally { timedOut = exe.killedProcess();
private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } } }
private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }
/** * Executes the given class name with the given arguments in a separate VM. * * @param command arguments. * @return return value from the executed process. */ private int run(String[] command) throws BuildException { Execute exe; LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN); exe = new Execute(logstr); exe.setAntRun(getProject()); exe.setCommandline(command); try { int rc = exe.execute(); if (exe.killedProcess()) { log("Timeout: killed the sub-process", Project.MSG_WARN); } return rc; } catch (IOException e) { throw new BuildException(e, getLocation()); } }