/** * Adds direct command-line to execute. * * @param c command line to execute */ public void addConfiguredCommandline(Commandline c) { this.addConfiguredCommandline(c, false); }
/** * Adds direct command-line to execute. * * @param c command line to execute */ public void addConfiguredCommandline(Commandline c) { this.addConfiguredCommandline(c, false); }
/** * 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); } }