* <p>
* Builds a command line to execute ss and then calls Exec's run method
* to execute the command line.
*/
public void execute() throws BuildException {
Commandline commandLine = new Commandline();
int result = 0;
// first off, make sure that we've got a command and a vssdir ...
if (getVsspath() == null) {
String msg = "vsspath attribute must be set!";
throw new BuildException(msg, location);
}
// now look for illegal combinations of things ...
// build the command line from what we got the format is
// ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable(getSSCommand());
commandLine.createArgument().setValue(COMMAND_GET);
// VSS items
commandLine.createArgument().setValue(getVsspath());
// -GL
getLocalpathCommand(commandLine);
// -I- or -I-Y or -I-N
getAutoresponse(commandLine);
// -O-
getQuietCommand(commandLine);
// -R
getRecursiveCommand(commandLine);
// -V
getVersionCommand(commandLine);
// -W
getWritableCommand(commandLine);
// -Y
getLoginCommand(commandLine);
result = run(commandLine);
if (result != 0) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
}