Executes the task.
Builds a command line to execute cleartool and then calls Exec's run method
to execute the command line.
Commandline commandLine = new Commandline();
Project aProj = getProject();
int result = 0;
// Default the viewpath to basedir if it is not specified
if (getViewPath() == null) {
setViewPath(aProj.getBaseDir().getPath());
}
// build the command line from what we got the format is
// cleartool uncheckout [options...] [viewpath ...]
// as specified in the CLEARTOOL.EXE help
commandLine.setExecutable(getClearToolCommand());
commandLine.createArgument().setValue(COMMAND_UNCHECKOUT);
checkOptions(commandLine);
if (!getFailOnErr()) {
getProject().log("Ignoring any errors that occur for: "
+ getViewPathBasename(), Project.MSG_VERBOSE);
}
result = run(commandLine);
if (Execute.isFailure(result) && getFailOnErr()) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}