/** * Return a String that describes the command and arguments suitable for * verbose output before a call to <code>Runtime.exec(String[])</code>. * @return the description string. * @since Ant 1.5 */ public String describeCommand() { return Commandline.describeCommand(getCommandline()); }
/** * Get a string description. * @return the command line as a string. */ @Override public String toString() { return Commandline.toString(getCommandline()); }
arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); Execute.runCommand(this, cmdl.getCommandline());
null); log(cmdl.describeCommand(), Project.MSG_VERBOSE); process.setCommandline(cmdl.getCommandline());
null); log(cmdl.describeCommand(), Project.MSG_VERBOSE); process.setCommandline(cmdl.getCommandline());
if (fork) { if (spawn) { spawn(commandLine.getCommandline()); return 0; return fork(commandLine.getCommandline());
Execute execute= new Execute(new TestNGLogSH(this, Project.MSG_INFO, Project.MSG_WARN, (m_verbose == null || m_verbose < 5)), watchdog); execute.setCommandline(cmd.getCommandline()); execute.setAntRun(getProject()); if(m_workingDir != null) {
this, Project.MSG_INFO, Project.MSG_WARN, (m_verbose == null || m_verbose < 5)), watchdog); execute.setCommandline(cmd.getCommandline()); execute.setAntRun(getProject()); if (m_workingDir != null) {
exe.setAntRun(pc.getProject()); if (Os.isFamily("openvms")) { setupCommandLineForVMS(exe, cmdl.getCommandline()); } else { exe.setCommandline(cmdl.getCommandline());
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()); } }
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()); } }
exe.setAntRun(pc.getProject()); String[] cl = command.getCommandline(); for (int i = 0; i < cl.length; i++) { if (cl[i].endsWith("\n")) {
private int executeRunnerClassAsForked() throws BuildException { CommandlineJava cmd = initializeJavaCommand(); Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); String[] commandLine = cmd.getCommandline(); log("Executing: " + StringUtils.join(Arrays.asList(commandLine), " ")); execute.setCommandline(commandLine); execute.setNewenvironment(false); execute.setAntRun(getProject()); log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try { retVal = execute.execute(); } catch (IOException e) { throw new BuildException("Process fork failed.", e, getLocation()); } return retVal; }
@Override protected void compile() { try { if (getFork()) { setupCommand(); setupForkCommand("com.sun.tools.jxc.SchemaGeneratorFacade"); int status = run(getCommandline().getCommandline()); if (status != 0) { if (!getVerbose()) { log("Command invoked: " + "schemagen" + getCommandline().toString()); } throw new BuildException("schemagen" + " failed", getLocation()); } } else { super.compile(); } } catch (Exception ex) { if (ex instanceof BuildException) { throw (BuildException) ex; } else { throw new BuildException("Error starting " + "schemagen" + ": " + ex.getMessage(), ex, getLocation()); } } }
private int executeRunnerClassAsForked() throws BuildException { CommandlineJava cmd = initializeJavaCommand(); Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); String[] commandLine = cmd.getCommandline(); log("Executing: " + StringUtils.join(Arrays.asList(commandLine), " ")); execute.setCommandline(commandLine); execute.setNewenvironment(false); execute.setAntRun(getProject()); log(cmd.describeCommand(), Project.MSG_VERBOSE); int retVal; try { retVal = execute.execute(); } catch (IOException e) { throw new BuildException("Process fork failed.", e, getLocation()); } return retVal; }
int status = run(getCommandline().getCommandline()); ok = (status == 0); } else {
@Override protected void compile() { try { if (getFork()) { setupCommand(); setupForkCommand("com.sun.tools.jxc.SchemaGeneratorFacade"); int status = run(getCommandline().getCommandline()); if (status != 0) { if (!getVerbose()) { log("Command invoked: " + "schemagen" + getCommandline().toString()); } throw new BuildException("schemagen" + " failed", getLocation()); } } else { super.compile(); } } catch (Exception ex) { if (ex instanceof BuildException) { throw (BuildException) ex; } else { throw new BuildException("Error starting " + "schemagen" + ": " + ex.getMessage(), ex, getLocation()); } } }
int status = run(getCommandline().getCommandline()); ok = (status == 0); } else {
slaveInfo.slaveCommandLine = escapeAndJoin(commandline.getCommandline()); log("Forked child JVM at '" + cwd.toAbsolutePath().normalize() + "', command (may need escape sequences for your shell):\n" + execute.setCommandline(commandline.getCommandline()); execute.setVMLauncher(true); execute.setWorkingDirectory(cwd.toFile());
slaveInfo.slaveCommandLine = escapeAndJoin(commandline.getCommandline()); log("Forked child JVM at '" + cwd.toAbsolutePath().normalize() + "', command (may need escape sequences for your shell):\n" + execute.setCommandline(commandline.getCommandline()); execute.setVMLauncher(true); execute.setWorkingDirectory(cwd.toFile());