Velocity.evaluate(velocityContext, sw, "DownloadResultsRunnable.run", template); FileUtils.writeStringToFile(downloadResultsFile, sw.toString()); Executor chmodExecutor = new Executor("chmod 755 " + downloadResultsFile.getAbsolutePath()); chmodExecutor.execute(); } catch (ExecutorException e) { Executor downloadResultsExecutor = new Executor(downloadResultsFile.getAbsolutePath()); downloadResultsExecutor.execute(); } catch (ExecutorException e) {
Velocity.evaluate(velocityContext, sw, "SubmitCallable.call", template); FileUtils.writeStringToFile(submitFile, sw.toString()); Executor chmodExecutor = new Executor("chmod 755 " + submitFile.getAbsolutePath()); chmodExecutor.execute(); } catch (ExecutorException e) { Executor submitExecutor = new Executor(submitFile.getAbsolutePath()); submitExecutor.execute(); String stdout = submitExecutor.getStdout();
Velocity.evaluate(velocityContext, sw, "CheckStatusCallable.call", template); FileUtils.writeStringToFile(checkStatusFile, sw.toString()); Executor chmodExecutor = new Executor("chmod 755 " + checkStatusFile.getAbsolutePath()); chmodExecutor.execute(); } catch (ExecutorException e) { Executor checkStatusExecutor = new Executor(checkStatusFile.getAbsolutePath()); checkStatusExecutor.execute(); String stdout = checkStatusExecutor.getStdout();
public void run() { for (LaunchDescriptorBean ldb : getLaunchDescriptorBeans()) { String command = ldb.getCommands().get(0); logger.debug("command = " + command); Executor sh = new Executor(command); sh.setEnvironment(new HashMap<String, String>()); sh.setWorkDir(getWorkDirectory()); try { sh.execute(); } catch (ExecutorException e) { logger.error("Execution error: " + e.getMessage()); } setStdOut(sh.getStdout()); setStdErr(sh.getStderr()); setExitCode(sh.getExitCode()); } }