throws CommandException, CommandValidationException
{
System.setProperty(DefaultConfiguration.REDIRECTION, "false");
validateOptions();
JESProgressObject progressObject = callDeploy();
DeploymentStatus status = df.waitFor(progressObject);
String statusString = status.getStageStatusMessage();
if (statusString.indexOf("302")>-1) {
setOption(SECURE, "true");
progressObject = this.callDeploy();
status = df.waitFor(progressObject);
statusString = status.getStageStatusMessage();
}
if (status != null && status.getStatus() == DeploymentStatus.FAILURE) {
checkDeployStatus(status, statusString);
}
final String retrievePath = getOption(RETRIEVE_DIR);
if (retrievePath != null){
try {
CLILogger.getInstance().printDebugMessage("componentName = " + componentName +
" retrievePath = " + retrievePath);
final String fileName = df.downloadFile(new File(retrievePath), componentName, null);
CLILogger.getInstance().printDebugMessage("downloaded stubs to : " + fileName );
}
catch(Exception e){
throw new CommandException((getLocalizedString(
"InvalidValueInOption", new Object[] {RETRIEVE_DIR,
retrievePath})) + "\n"+ e.getLocalizedMessage());
}
}
if (status != null && status.getStatus() == DeploymentStatus.WARNING) {
CLILogger.getInstance().printDetailMessage(getLocalizedString(
"CommandSuccessfulWithMsg",
new Object[] {name, statusString}));
} else {
CLILogger.getInstance().printDetailMessage(getLocalizedString(