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

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

本文整理了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

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

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

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

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

  1. private void addModulesToDefaultPlan(Application application, Set<Module<?, ?>> modules) {
  2. for (Module module : modules) {
  3. ConfigurationModuleType configurationModuleType = module.getType();
  4. org.apache.openejb.jee.Module newModule = new org.apache.openejb.jee.Module();
  5. if (configurationModuleType.equals(ConfigurationModuleType.WAR)) {
  6. WebModule webModule = (WebModule) module;
  7. Web web = new Web();
  8. web.setContextRoot(webModule.getContextRoot());
  9. web.setWebUri(webModule.getTargetPath());
  10. newModule.setWeb(web);
  11. } else if (configurationModuleType.equals(ConfigurationModuleType.EJB)) {
  12. newModule.setEjb(module.getTargetPath());
  13. } else if (configurationModuleType.equals(ConfigurationModuleType.RAR)) {
  14. newModule.setConnector(module.getTargetPath());
  15. } else if (configurationModuleType.equals(ConfigurationModuleType.CAR)) {
  16. newModule.setJava(module.getTargetPath());
  17. }
  18. application.getModule().add(newModule);
  19. }
  20. }

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

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

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

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

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

  1. private void installModule(Module module, EARContext earContext) throws DeploymentException {
  2. registerModule(module, earContext);
  3. JarFile moduleFile = module.getModuleFile();
  4. try {
  5. if (module.isStandAlone()) {
  6. JarUtils.unzipToDirectory(new JarFile(moduleFile.getName()), earContext.getBaseDir());
  7. } else {
  8. // extract the ejbJar file into a standalone packed jar file and add the contents to the output
  9. earContext.addIncludeAsPackedJar(URI.create(module.getTargetPath()), moduleFile);
  10. // add manifest class path entries to the ejb module classpath
  11. Collection<String> EjbModuleClasspaths = module.getClassPath();
  12. EjbModuleClasspaths.add(module.getTargetPath());
  13. Collection<String> moduleLocations = module.isStandAlone() ? null : module.getParentModule()
  14. .getModuleLocations();
  15. URI baseUri = URI.create(module.getTargetPath());
  16. earContext.getCompleteManifestClassPath(module.getDeployable(), baseUri, URI.create("."), EjbModuleClasspaths, moduleLocations);
  17. for (String classpath:EjbModuleClasspaths){
  18. earContext.addToClassPath(classpath);
  19. }
  20. }
  21. //earContext.addInclude(".", moduleFile);
  22. } catch (IOException e) {
  23. throw new DeploymentException("Unable to copy ejb module jar into configuration: " + moduleFile.getName(), e);
  24. }
  25. }

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

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

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

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

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

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

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

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

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

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

相关文章