IServerWorkingCopy wc = server.createWorkingCopy();
wc = server.createWorkingCopy();
IStatus status = wc.canModifyModules(add, null, null);
if (status.getSeverity() != IStatus.ERROR) {
CloudFoundryPlugin.getModuleCache().getData(wc.getOriginal())
.tagForAutomaticRepublish(new RepublishModule(add[0], appModule.getDeploymentInfo()));
// publish the module
wc.modifyModules(add, null, monitor);
wc.save(true, null);
republished = true;