/** * Get the VM command parameters, including memory settings. * @return the VM command parameters. */ protected Commandline getActualVMCommand() { Commandline actualVMCommand = (Commandline) vmCommand.clone(); if (maxMemory != null) { if (vmVersion.startsWith("1.1")) { actualVMCommand.createArgument().setValue("-mx" + maxMemory); } else { actualVMCommand.createArgument().setValue("-Xmx" + maxMemory); } } return actualVMCommand; }
/** * do the work * @throws BuildException if failonerror is set to true and the * cvs command fails. */ @Override public void execute() throws BuildException { String savedCommand = getCommand(); if (this.getCommand() == null && commandlines.isEmpty()) { // re-implement legacy behaviour: this.setCommand(AbstractCvsTask.DEFAULT_COMMAND); } String c = this.getCommand(); Commandline cloned = null; if (c != null) { cloned = (Commandline) cmd.clone(); cloned.createArgument(true).setLine(c); this.addConfiguredCommandline(cloned, true); } try { commandlines.forEach(this::runCommand); } finally { if (cloned != null) { removeCommandline(cloned); } setCommand(savedCommand); FileUtils.close(outputStream); FileUtils.close(errorStream); } }
getLocation()); Commandline toExecute = (Commandline) cmd.clone(); toExecute.setExecutable(PATCH);
Commandline cloned = (Commandline) cmdl.clone(); cloned.createArgument().setValue(defaultSet.getDir(getProject()) .getPath());
final Commandline toExecute = (Commandline) cmd.clone(); if (executable != null) { toExecute.setExecutable(executable);
/** * do the work * * @throws BuildException if failonerror is set to true and the cvs command fails. */ public void execute() throws BuildException { String savedCommand = getCommand(); if (this.getCommand() == null && vecCommandlines.size() == 0) { // re-implement legacy behaviour: this.setCommand(AbstractCvsTask.DEFAULT_COMMAND); } String c = this.getCommand(); Commandline cloned = null; if (c != null) { cloned = (Commandline) cmd.clone(); cloned.createArgument(true).setLine(c); this.addConfiguredCommandline(cloned, true); } try { for (int i = 0; i < vecCommandlines.size(); i++) { this.runCommand((Commandline) vecCommandlines.elementAt(i)); } } finally { if (cloned != null) { removeCommandline(cloned); } setCommand(savedCommand); } }
/** * do the work * * @throws BuildException if failonerror is set to true and the cvs command fails. */ public void execute() throws BuildException { String savedCommand = getCommand(); if (this.getCommand() == null && vecCommandlines.size() == 0) { // re-implement legacy behaviour: this.setCommand(AbstractCvsTask.DEFAULT_COMMAND); } String c = this.getCommand(); Commandline cloned = null; if (c != null) { cloned = (Commandline) cmd.clone(); cloned.createArgument(true).setLine(c); this.addConfiguredCommandline(cloned, true); } try { for (int i = 0; i < vecCommandlines.size(); i++) { this.runCommand((Commandline) vecCommandlines.elementAt(i)); } } finally { if (cloned != null) { removeCommandline(cloned); } setCommand(savedCommand); } }