Package org.eclipse.wst.server.core

Examples of org.eclipse.wst.server.core.IModule


      if(GeronimoUtils.isEarModule(module)) {
        IEnterpriseApplication application = (IEnterpriseApplication) module.loadAdapter(IEnterpriseApplication.class, null);
        if( application != null ){
          IModule[] children = application.getModules();
           for (int i = 0; i < children.length; i++) {
               IModule child = children[i];
              IPath childPath = output.append(child.getName() + getModuleExtension(child));
              IModuleResource[] childResources = getModuleResources(child);
              PublishUtil.publishSmart(childResources, childPath, new NullProgressMonitor());
              if(GeronimoUtils.isWebModule(child)) {
                IWebModule webModule = (IWebModule) module.loadAdapter(IWebModule.class, null);
                IModule[] libs = webModule.getModules();
                IPath webLibPath = childPath.append("WEB-INF").append("lib");
                for(int j = 0; j < libs.length; j++) {
                  IModule lib = libs[j];
                  IModuleResource[] libResources = getModuleResources(lib);
                  PublishUtil.publishSmart(libResources, webLibPath.append(lib.getName() + getModuleExtension(lib)), new NullProgressMonitor());
                }
              }
           }
        }
      }
View Full Code Here


        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");
View Full Code Here

        Trace.tracePoint("Entry", "GeronimoServerBehaviourDelegate.getModulePath", Arrays.asList(module).toString(), baseURL);

    IPath modulePath = new Path(baseURL.getFile());

    if (module.length == 2) {
      IModule workingModule = module[module.length - 1];
      modulePath = modulePath.append(workingModule.getName());
      if (GeronimoUtils.isWebModule(workingModule)) {
        modulePath = modulePath.addFileExtension("war");
      } else if (GeronimoUtils.isEjbJarModule(workingModule)) {
        modulePath = modulePath.addFileExtension("jar");
      } else if (GeronimoUtils.isRARModule(workingModule)) {
View Full Code Here

      }
    } catch (CoreException ex) {
      return new IModule[0];
    }   
   
    IModule module = createModule(getBundleSymbolicName(project), project.getName(), MODULE_TYPE, VERSION, project);
    return new IModule[] { module };
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.server.core.IModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.