deployParams.force = true;
deployParams.dropandcreatetables = false;
deployParams.createtables = false;
deployParams.target = DOMAIN_TARGET;
ActionReport report = new DoNothingActionReporter();
commandRunner.getCommandInvocation("deploy", report, kernelIdentity.getSubject()).parameters(deployParams).execute();
// should we delete the temp file after we are done
// it seems it might be useful to keep it around for debugging purpose
if (report.getActionExitCode().equals(ActionReport.ExitCode.FAILURE)) {
logger.log(Level.SEVERE, "Redeployment of application " + app.getName() + " failed: " + report.getMessage() + "\nPlease redeploy " + app.getName() + " manually.", report.getFailureCause());
return false;
}
return true;
}