/** @see PublishOperation#execute(IProgressMonitor, IAdaptable) */ public void execute(IProgressMonitor monitor, IAdaptable info) throws CoreException { List status = new ArrayList(); // If parent web module if (module.length == 1) { if (!ServerUtil.isExtProject(module[0].getProject())) { publishDir(module[0], status, monitor); } } // Else a child module else { Properties p = server.loadModulePublishLocations(); // Try to determine the URI for the child module IWebModule webModule = (IWebModule) module[0].loadAdapter(IWebModule.class, monitor); String childURI = null; if (webModule != null) { childURI = webModule.getURI(module[1]); } // Try to determine if child is binary IJ2EEModule childModule = (IJ2EEModule) module[1].loadAdapter(IJ2EEModule.class, monitor); boolean isBinary = false; if (childModule != null) { isBinary = childModule.isBinary(); } if (isBinary) { publishArchiveModule(childURI, p, status, monitor); } else { publishJar(childURI, p, status, monitor); } server.saveModulePublishLocations(p); } throwException(status); server.setModulePublishState2(module, IServer.PUBLISH_STATE_NONE); }