if (checkPackaging() && IgnoredPackageTypes.isIgnored(packaging)) {
getLog().debug(String.format("Ignoring packaging type %s.", packaging));
} else {
final InetAddress host = hostAddress();
getLog().info(String.format("Executing goal %s on server %s (%s) port %s.", goal(), host.getHostName(), host.getHostAddress(), port()));
final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client());
final DeploymentPlanBuilder builder = manager.newDeploymentPlan();
final DeploymentPlan plan = createPlan(builder);
if (plan == null) {
getLog().debug(String.format("Ignoring goal %s as the plan was null.", goal()));
} else {
if (plan.getDeploymentActions().size() > 0) {
final ServerDeploymentPlanResult planResult = manager.execute(plan).get();
// Check the results
for (DeploymentAction action : plan.getDeploymentActions()) {
final ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
final ServerUpdateActionResult.Result result = actionResult.getResult();
switch (result) {