org.apache.geronimo.j2ee.deployment.Module.getTargetPath()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.apache.geronimo.j2ee.deployment.Module.getTargetPath()方法的一些代码示例,展示了Module.getTargetPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getTargetPath()方法的具体详情如下:
包路径:org.apache.geronimo.j2ee.deployment.Module
类名称:Module
方法名:getTargetPath

Module.getTargetPath介绍

暂无

代码示例

代码示例来源:origin: org.apache.geronimo.modules/geronimo-j2ee-builder

public void addAsChildConfiguration() throws DeploymentException {
  if (rootEarContext != null && rootEarContext != earContext && !(earContext instanceof FragmentContext)) {
    ConfigurationData moduleConfigurationData = earContext.getConfigurationData();
    rootEarContext.addChildConfiguration(getTargetPath(), moduleConfigurationData);
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder

public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {
  try {
    JarFile moduleFile = module.getModuleFile();
    // add the manifest classpath entries declared in the connector to the class loader
    // we have to explicitly add these since we are unpacking the connector module
    // and the url class loader will not pick up a manifiest from an unpacked dir
    // N.B. If we ever introduce a separate configuration/module for a rar inside an ear
    // this will need to be modified to use "../" instead of module.getTargetPath().
    // See AbstractWebModuleBuilder.
    earContext.addManifestClassPath(moduleFile, URI.create(module.getTargetPath()));
    URI targetURI = URI.create(module.getTargetPath() + "/");
    Enumeration entries = moduleFile.entries();
    while (entries.hasMoreElements()) {
      ZipEntry entry = (ZipEntry) entries.nextElement();
      URI target = targetURI.resolve(entry.getName());
      if (entry.getName().endsWith(".jar")) {
        earContext.addInclude(target, moduleFile, entry);
      } else {
        earContext.addFile(target, moduleFile, entry);
      }
    }
  } catch (IOException e) {
    throw new DeploymentException("Problem deploying connector", e);
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-j2ee-builder

private void addModulesToDefaultPlan(Application application, Set<Module<?, ?>> modules) {
  for (Module module : modules) {
    ConfigurationModuleType configurationModuleType = module.getType();
    org.apache.openejb.jee.Module newModule = new org.apache.openejb.jee.Module();
    if (configurationModuleType.equals(ConfigurationModuleType.WAR)) {
      WebModule webModule = (WebModule) module;
      Web web = new Web();
      web.setContextRoot(webModule.getContextRoot());
      web.setWebUri(webModule.getTargetPath());
      newModule.setWeb(web);
    } else if (configurationModuleType.equals(ConfigurationModuleType.EJB)) {
      newModule.setEjb(module.getTargetPath());
    } else if (configurationModuleType.equals(ConfigurationModuleType.RAR)) {
      newModule.setConnector(module.getTargetPath());
    } else if (configurationModuleType.equals(ConfigurationModuleType.CAR)) {
      newModule.setJava(module.getTargetPath());
    }
    application.getModule().add(newModule);
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-myfaces-builder

protected Set<ConfigurationResource> findMetaInfConfigurationResources(EARContext earContext, Module module, Bundle bundle) throws DeploymentException {
  final Set<ConfigurationResource> metaInfConfigurationResources = new HashSet<ConfigurationResource>();
  String moduleNamePrefix = module.isStandAlone() ? "" : module.getTargetPath() + "/";

代码示例来源:origin: org.apache.geronimo.modules/geronimo-myfaces-builder

protected Set<ConfigurationResource> findFaceletConfigResources(EARContext earContext, Module module, Bundle bundle) throws DeploymentException {
  final Set<ConfigurationResource> metaInfConfigurationResources = new HashSet<ConfigurationResource>();
  String moduleNamePrefix = module.isStandAlone() ? "" : module.getTargetPath() + "/";

代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb-builder

private void installModule(Module module, EARContext earContext) throws DeploymentException {
  registerModule(module, earContext);
  JarFile moduleFile = module.getModuleFile();
  try {
    if (module.isStandAlone()) {
      JarUtils.unzipToDirectory(new JarFile(moduleFile.getName()), earContext.getBaseDir());
    } else {
      // extract the ejbJar file into a standalone packed jar file and add the contents to the output
      earContext.addIncludeAsPackedJar(URI.create(module.getTargetPath()), moduleFile);
      // add manifest class path entries to the ejb module classpath
      Collection<String> EjbModuleClasspaths = module.getClassPath();
      EjbModuleClasspaths.add(module.getTargetPath());
      Collection<String> moduleLocations = module.isStandAlone() ? null : module.getParentModule()
          .getModuleLocations();
      URI baseUri = URI.create(module.getTargetPath());
      earContext.getCompleteManifestClassPath(module.getDeployable(), baseUri, URI.create("."), EjbModuleClasspaths, moduleLocations);
      for (String classpath:EjbModuleClasspaths){
        earContext.addToClassPath(classpath);
      }
    }
    //earContext.addInclude(".", moduleFile);
  } catch (IOException e) {
    throw new DeploymentException("Unable to copy ejb module jar into configuration: " + moduleFile.getName(), e);
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6

earContext.addManifestClassPath(moduleFile, URI.create(module.getTargetPath()), module.getClassPath());

代码示例来源:origin: org.apache.geronimo.modules/geronimo-persistence-jpa20-builder

GBeanData data = installPersistenceUnitGBean(persistenceUnit, module, module.getTargetPath());
respectExcludeUnlistedClasses(data);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder

public static void processWebFragmentsAndAnnotations(EARContext earContext, Module module, Bundle bundle, WebApp webApp) throws DeploymentException {
  final Map<String, WebFragment> jarUrlWebFragmentDocumentMap = new LinkedHashMap<String, WebFragment>();
  final String validJarNamePrefix = module.isStandAlone() ? "WEB-INF/lib" : module.getTargetPath() + "/WEB-INF/lib";
  WebFragmentEntry[] webFragmentEntries = null;
  Enumeration<String> enumeration = bundle.getEntryPaths(validJarNamePrefix);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat-builder

earContext.addChildConfiguration(module.getTargetPath(), moduleConfigurationData);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-jetty6-builder

earContext.addChildConfiguration(module.getTargetPath(), moduleConfigurationData);

相关文章