return Status.CANCEL_STATUS;
sharedLibLocation = server.getRuntime().getLocation().append(sharedLibPath);
for(int i = 0; i < modules.length; i++) {
IModule module = modules[i];
IProject project = module.getProject();
File dummyJarFile = sharedLibLocation.append(project.getName() + ".eclipse.jar").toFile();
// delete the dummy jar if module no longer associated with server
if (!ServerUtil.containsModule(server, module, monitor) && dummyJarFile.exists()) {
deleteList.add(dummyJarFile);
} else {
HashSet entries = new HashSet();
J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
if(GeronimoUtils.isEarModule(module)) {
IModule[] childModules = j2eeModule.getChildModules();
for(int j = 0; j < modules.length; j++) {
entries.addAll(processModule(childModules[i]));
}
} else {
entries.addAll(processModule(module));
}
// regen the jar only if required
if (regenerate(dummyJarFile, entries)) {
TEMP_LOCATION.toFile().mkdirs();
File temp = TEMP_LOCATION.append(project.getName() + ".eclipse.jar").toFile();
Trace.trace(Trace.INFO, "Updating external sharedlib entries for " + module.getName());
if(temp.exists())
delete(temp);
Manifest manifest = new Manifest();
Attributes attributes = manifest.getMainAttributes();
attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0");