• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ModuleSpecification类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.as.server.deployment.module.ModuleSpecification的典型用法代码示例。如果您正苦于以下问题:Java ModuleSpecification类的具体用法?Java ModuleSpecification怎么用?Java ModuleSpecification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModuleSpecification类属于org.jboss.as.server.deployment.module包,在下文中一共展示了ModuleSpecification类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
/**
 * Add dependencies for modules required for NoSQL deployments
 */
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final Map<String, String> nosqlDriverModuleNameMap = DriverScanDependencyProcessor.getPerDeploymentDeploymentModuleName(deploymentUnit);
    if (nosqlDriverModuleNameMap == null) {
        return;
    }
    for (String nosqlDriverModuleName : nosqlDriverModuleNameMap.values()) {
        if (nosqlDriverModuleName != null) {
            final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
            final ModuleLoader moduleLoader = Module.getBootModuleLoader();
            addDependency(moduleSpecification, moduleLoader, ModuleIdentifier.fromString(nosqlDriverModuleName));
            addMongoCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addCassandraCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addNeo4jCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addOrientCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:22,代码来源:DriverDependencyProcessor.java


示例2: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    
    if(deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT) != null) {
        return;
    }
    
    final String deploymentName = deploymentUnit.getName();
    final VirtualFile deploymentContents = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_CONTENTS);

    // internal deployments do not have any contents, so there is nothing to mount
    if (deploymentContents == null)
        return;
    
    if (deploymentName.endsWith(DYNAMIC_VDB_STRUCTURE)) {
        // use the contents directly
        // nothing was mounted
        final ResourceRoot resourceRoot = new ResourceRoot(deploymentContents, null);
        ModuleRootMarker.mark(resourceRoot);
        deploymentUnit.putAttachment(Attachments.DEPLOYMENT_ROOT, resourceRoot);
        deploymentUnit.putAttachment(Attachments.MODULE_SPECIFICATION, new ModuleSpecification());            
    }
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:24,代码来源:DynamicVDBRootMountDeployer.java


示例3: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();
    // Add the logging modules
    for (ModuleIdentifier moduleId : LOGGING_MODULES) {
        try {
            LoggingLogger.ROOT_LOGGER.tracef("Adding module '%s' to deployment '%s'", moduleId, deploymentUnit.getName());
            moduleLoader.loadModule(moduleId);
            moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleId, false, false, false, false));
        } catch (ModuleLoadException ex) {
            LoggingLogger.ROOT_LOGGER.debugf("Module not found: %s", moduleId);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:LoggingDependencyDeploymentProcessor.java


示例4: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
    final ServiceModuleLoader moduleLoader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    List<ResourceRoot> resourceRoots = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS);


    //List<VirtualFile> jars = getJarList(deploymentRoot.getRoot());


    try {
        processBlackList(resourceRoots);
    } catch (IOException e) {
        SDDLogger.ROOT_LOGGER.couldNotProcessBlacklist(e);
    }

}
 
开发者ID:ctomc,项目名称:wildfly-sdd,代码行数:20,代码来源:ClassBlackListDetectorProcessor.java


示例5: addDependencies

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addDependencies(DeploymentUnit deploymentUnit) {
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();

    moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, MICROPROFILE_CONFIG_API, false, false, true, false));

    if (WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, MICROPROFILE_CONFIG_EXTENSION, false, false, true, false));
    }
}
 
开发者ID:wildfly-extras,项目名称:wildfly-microprofile-config,代码行数:11,代码来源:DependencyProcessor.java


示例6: addDependencies

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addDependencies(DeploymentUnit deploymentUnit) {
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();

    moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, MICROPROFILE_HEALTH_API, false, false, true, false));

    if (WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, MICROPROFILE_HEALTH_EXTENSION, false, false, true, false));
    }
}
 
开发者ID:jmesnil,项目名称:wildfly-microprofile-health,代码行数:11,代码来源:DependencyProcessor.java


示例7: addMongoCDIDependency

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addMongoCDIDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, String nosqlDriverModuleName) {
    try {
        moduleLoader.loadModule(ModuleIdentifier.fromString(nosqlDriverModuleName)).getClassLoader().loadClass(NoSQLConstants.MONGOCLIENTCLASS);
    } catch (ClassNotFoundException expected) {
        // ignore CNFE which just means that module is not a MongoDB module
        return;
    } catch (ModuleLoadException e) {
        throw new RuntimeException("could not load NoSQL driver module " + nosqlDriverModuleName, e);
    }
    // only reach this point if module is a MongoDB driver
    ModuleIdentifier mongoCDIExtensionModule = ModuleIdentifier.create(NoSQLConstants.MONGOCDIEXTENSIONMODULE);
    addDependency(moduleSpecification, moduleLoader, mongoCDIExtensionModule);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:14,代码来源:DriverDependencyProcessor.java


示例8: addNeo4jCDIDependency

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addNeo4jCDIDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, String nosqlDriverModuleName) {
    try {
        moduleLoader.loadModule(ModuleIdentifier.fromString(nosqlDriverModuleName)).getClassLoader().loadClass(NoSQLConstants.NEO4JDRIVERCLASS);
    } catch (ClassNotFoundException expected) {
        // ignore CNFE which just means that module is not a Neo4j module
        return;
    } catch (ModuleLoadException e) {
        throw new RuntimeException("could not load NoSQL driver module " + nosqlDriverModuleName, e);
    }
    // only reach this point if module is a Neo4j driver
    ModuleIdentifier mongoCDIExtensionModule = ModuleIdentifier.create(NoSQLConstants.NEO4JCDIEXTENSIONMODULE);
    addDependency(moduleSpecification, moduleLoader, mongoCDIExtensionModule);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:14,代码来源:DriverDependencyProcessor.java


示例9: addCassandraCDIDependency

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addCassandraCDIDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, String nosqlDriverModuleName) {
    try {
        moduleLoader.loadModule(ModuleIdentifier.fromString(nosqlDriverModuleName)).getClassLoader().loadClass(NoSQLConstants.CASSANDRACLUSTERCLASS);
    } catch (ClassNotFoundException expected) {
        // ignore CNFE which just means that module is not a Cassandra module
        return;
    } catch (ModuleLoadException e) {
        throw new RuntimeException("could not load NoSQL driver module " + nosqlDriverModuleName, e);
    }
    // only reach this point if module is a Cassandra driver
    ModuleIdentifier mongoCDIExtensionModule = ModuleIdentifier.create(NoSQLConstants.CASSANDRACDIEXTENSIONMODULE);
    addDependency(moduleSpecification, moduleLoader, mongoCDIExtensionModule);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:14,代码来源:DriverDependencyProcessor.java


示例10: addOrientCDIDependency

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addOrientCDIDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, String nosqlDriverModuleName) {
    try {
        moduleLoader.loadModule(ModuleIdentifier.fromString(nosqlDriverModuleName)).getClassLoader().loadClass(NoSQLConstants.ORIENTDBPARTIONEDDBPOOLCLASS);
    } catch (ClassNotFoundException expected) {
        // ignore CNFE which just means that module is not a OrientDB module
        return;
    } catch (ModuleLoadException e) {
        throw new RuntimeException("could not load NoSQL driver module " + nosqlDriverModuleName, e);
    }
    // only reach this point if module is a OrientDB driver
    ModuleIdentifier mongoCDIExtensionModule = ModuleIdentifier.create(NoSQLConstants.ORIENTDBCDIEXTENSIONMODULE);
    addDependency(moduleSpecification, moduleLoader, mongoCDIExtensionModule);
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:14,代码来源:DriverDependencyProcessor.java


示例11: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
	DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
       try {
		final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
		final ModuleLoader moduleLoader = Module.getCallerModule().getModule(ModuleIdentifier.create("org.jboss.teiid")).getModuleLoader(); //$NON-NLS-1$
		moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.jboss.teiid.api"), false, false, false, false)); //$NON-NLS-1$
		moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("org.jboss.teiid.common-core"), false, false, false, false)); //$NON-NLS-1$
		moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("javax.api"), false, false, false, false)); //$NON-NLS-1$
		moduleSpecification.addLocalDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create("javax.resource.api"), false, false, false, false)); //$NON-NLS-1$
	} catch (ModuleLoadException e) {
		throw new DeploymentUnitProcessingException(e);
	}	
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:15,代码来源:TranslatorDependencyDeployer.java


示例12: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext context) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = context.getDeploymentUnit();
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();

    moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, elytronIdentifier, false, false, true, false));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:9,代码来源:DependencyProcessor.java


示例13: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    if (deploymentUnit.getParent() != null) {
        return;
    }

    final List<DeploymentUnit> deploymentUnits = new ArrayList<DeploymentUnit>();
    deploymentUnits.add(deploymentUnit);
    deploymentUnits.addAll(deploymentUnit.getAttachmentList(Attachments.SUB_DEPLOYMENTS));

    for (DeploymentUnit unit : deploymentUnits) {

        final ResourceRoot mainRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
        if (mainRoot == null)
            continue;

        VirtualFile root = mainRoot.getRoot();
        for (String path : SEAM_FILES) {
            if (root.getChild(path).exists()) {
                final ModuleSpecification moduleSpecification = deploymentUnit
                        .getAttachment(Attachments.MODULE_SPECIFICATION);
                final ModuleLoader moduleLoader = Module.getBootModuleLoader();
                moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, VFS_MODULE, false, false, false,
                        false)); // for VFS scanner

                try {
                    ResourceLoader resourceLoader = ResourceLoaders.createJarResourceLoader(SEAM_INT_JAR, new JarFile(
                            getSeamIntResourceRoot().getRoot().getPathName()));
                    moduleSpecification.addResourceLoader(ResourceLoaderSpec.createResourceLoaderSpec(resourceLoader));
                } catch (Exception e) {
                    throw new DeploymentUnitProcessingException(e);
                }

                unit.addToAttachmentList(Attachments.RESOURCE_ROOTS, getSeamIntResourceRoot());
                return;
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:40,代码来源:Seam2Processor.java


示例14: handleDeployment

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void handleDeployment(final DeploymentPhaseContext phaseContext, final DeploymentUnit deploymentUnit, final ModuleSpecification moduleSpec, final ModuleStructureSpec rootDeploymentSpecification, Set<ModuleIdentifier> additionalModules) throws DeploymentUnitProcessingException {
    final Map<VirtualFile, ResourceRoot> resourceRoots = resourceRoots(deploymentUnit);
    moduleSpec.addUserDependencies(rootDeploymentSpecification.getModuleDependencies());
    moduleSpec.addExclusions(rootDeploymentSpecification.getExclusions());
    moduleSpec.addAliases(rootDeploymentSpecification.getAliases());
    moduleSpec.addModuleSystemDependencies(rootDeploymentSpecification.getSystemDependencies());
    for (final ResourceRoot additionalResourceRoot : rootDeploymentSpecification.getResourceRoots()) {

        final ResourceRoot existingRoot = resourceRoots.get(additionalResourceRoot.getRoot());
        if (existingRoot != null) {
            //we already have to the resource root
            //so now we want to merge it
            existingRoot.merge(additionalResourceRoot);
        } else if (!additionalResourceRoot.getRoot().exists()) {
            ServerLogger.DEPLOYMENT_LOGGER.additionalResourceRootDoesNotExist(additionalResourceRoot.getRoot().getPathName());
        } else {
            deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot);
            //compute the annotation index for the root
            ResourceRootIndexer.indexResourceRoot(additionalResourceRoot);
            ModuleRootMarker.mark(additionalResourceRoot);
        }
    }
    for (final String classFileTransformer : rootDeploymentSpecification.getClassFileTransformers()) {
        moduleSpec.addClassFileTransformer(classFileTransformer);
    }
    //handle annotations
    for (final ModuleIdentifier dependency : rootDeploymentSpecification.getAnnotationModules()) {
        deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, dependency);
        //additional modules will not be created till much later, a dep on them would fail
        if(dependency.getName().startsWith(ServiceModuleLoader.MODULE_PREFIX) && !additionalModules.contains(dependency)) {
            phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, ServiceModuleLoader.moduleServiceName(dependency));
        }
    }
    moduleSpec.setLocalLast(rootDeploymentSpecification.isLocalLast());

    if(rootDeploymentSpecification.getExcludedSubsystems() != null) {
        deploymentUnit.putAttachment(Attachments.EXCLUDED_SUBSYSTEMS, rootDeploymentSpecification.getExcludedSubsystems());
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:40,代码来源:DeploymentStructureDescriptorParser.java


示例15: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
/**
 * Add the dependencies if the deployment contains a service activator loader entry.
 * @param phaseContext the deployment unit context
 * @throws DeploymentUnitProcessingException
 */
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final ResourceRoot deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
    final ModuleSpecification moduleSpecification = phaseContext.getDeploymentUnit().getAttachment(
            Attachments.MODULE_SPECIFICATION);
    if(deploymentRoot == null)
        return;
    final ServicesAttachment servicesAttachments = phaseContext.getDeploymentUnit().getAttachment(Attachments.SERVICES);
    if(servicesAttachments != null && !servicesAttachments.getServiceImplementations(ServiceActivator.class.getName()).isEmpty()) {
        moduleSpecification.addSystemDependency(MSC_DEP);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:ServiceActivatorDependencyProcessor.java


示例16: createAndInitializeDeploymentUnit

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
protected DeploymentUnit createAndInitializeDeploymentUnit(ServiceRegistry registry) {
    final String deploymentName = deploymentRoot.getRootName();
    final DeploymentUnit deploymentUnit = new DeploymentUnitImpl(parent, deploymentName, registry);
    deploymentUnit.putAttachment(Attachments.DEPLOYMENT_ROOT, deploymentRoot);
    deploymentUnit.putAttachment(Attachments.MODULE_SPECIFICATION, new ModuleSpecification());
    deploymentUnit.putAttachment(DeploymentResourceSupport.REGISTRATION_ATTACHMENT, registration);
    deploymentUnit.putAttachment(DeploymentResourceSupport.MUTABLE_REGISTRATION_ATTACHMENT, mutableRegistration);
    deploymentUnit.putAttachment(DeploymentResourceSupport.DEPLOYMENT_RESOURCE, resource);
    deploymentUnit.putAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT, new DeploymentResourceSupport(deploymentUnit));
    deploymentUnit.putAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT, capabilityServiceSupport);
    deploymentUnit.putAttachment(Attachments.VAULT_READER_ATTACHMENT_KEY, vaultReader);
    deploymentUnit.putAttachment(Attachments.DEPLOYMENT_OVERLAY_INDEX, parent.getAttachment(Attachments.DEPLOYMENT_OVERLAY_INDEX));
    deploymentUnit.putAttachment(Attachments.PATH_MANAGER, pathManager);
    return deploymentUnit;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:16,代码来源:SubDeploymentUnitService.java


示例17: addSystemDependencies

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addSystemDependencies(ModuleLoader moduleLoader, final ModuleSpecification moduleSpecification) {
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_PROCESS_ENGINE);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_XML_MODEL);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_BPMN_MODEL);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_CMMN_MODEL);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_DMN_MODEL);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_SPIN);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_CONNECT);
  addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFYER_ENGINE_DMN);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:ModuleDependencyProcessor.java


示例18: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
    if (depUnit.hasAttachment(GraviaConstants.RESOURCE_KEY)) {
        ModuleSpecification moduleSpecification = depUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
        moduleSpecification.addSystemDependencies(systemDependencies);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:9,代码来源:ModuleDependenciesProcessor.java


示例19: addDependency

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader,
                           ModuleIdentifier... moduleIdentifiers) {
    for (ModuleIdentifier moduleIdentifier : moduleIdentifiers) {
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, true, false));
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:7,代码来源:DriverDependencyProcessor.java


示例20: deploy

import org.jboss.as.server.deployment.module.ModuleSpecification; //导入依赖的package包/类
/**
 * Add dependencies for modules required for metric deployments
 *
 */
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();

//    ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
    //   final VirtualFile rootBeansXml = deploymentRoot.getRoot().getChild("META-INF/beans.xml");
    //   final boolean rootBeansXmlPresent = rootBeansXml.exists() && rootBeansXml.isFile();
    //   System.out.println("rootBeansXmlPresent " + rootBeansXmlPresent);
/*    Map<ResourceRoot, ExplicitBeanArchiveMetadata> beanArchiveMetadata = new HashMap<>();
     PropertyReplacingBeansXmlParser parser = new PropertyReplacingBeansXmlParser(deploymentUnit);

     ResourceRoot classesRoot = null;
     List<ResourceRoot> structure = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS);
     for (ResourceRoot resourceRoot : structure) {
     if (ModuleRootMarker.isModuleRoot(resourceRoot) && !SubDeploymentMarker.isSubDeployment(resourceRoot)) {
     if (resourceRoot.getRootName().equals("classes")) {
     // hack for dealing with war modules
     classesRoot = resourceRoot;
     deploymentUnit.putAttachment(WeldAttachments.CLASSES_RESOURCE_ROOT, resourceRoot);
     } else {
     VirtualFile beansXml = resourceRoot.getRoot().getChild("META-INF/beans.xml");
     if (beansXml.exists() && beansXml.isFile()) {
     System.out.println("rootBeansXmlPresent found");
     beanArchiveMetadata.put(resourceRoot, new ExplicitBeanArchiveMetadata(beansXml, resourceRoot, parseBeansXml(beansXml, parser, deploymentUnit), false));
     }
     }
     }
     }
     */
    //   BeansXml beansXml = deployment.getBeanDeploymentArchive().getBeansXml();
    if (!WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
        return; // Skip if there are no beans.xml files in the deployment
    }

    ModuleDependency dep = new ModuleDependency(moduleLoader, ORG_JAM_METRICS, false, false, true, false);
    dep.addImportFilter(PathFilters.getMetaInfFilter(), true);
    dep.addExportFilter(PathFilters.getMetaInfFilter(), true);
    moduleSpecification.addSystemDependency(dep);

    ModuleDependency dep2 = new ModuleDependency(moduleLoader, ORG_JAM_METRICS_API, false, false, true, false);
    dep2.addImportFilter(PathFilters.getMetaInfFilter(), true);
    dep2.addExportFilter(PathFilters.getMetaInfFilter(), true);
    moduleSpecification.addSystemDependency(dep2);

    ModuleDependency dep3 = new ModuleDependency(moduleLoader, ORG_JAM_METRICS_PROPERTIES, false, false, true, false);
    dep3.addImportFilter(PathFilters.getMetaInfFilter(), true);
    dep3.addExportFilter(PathFilters.getMetaInfFilter(), true);
    moduleSpecification.addSystemDependency(dep3);

    ModuleDependency dep4 = new ModuleDependency(moduleLoader, ORG_JAM_METRICS_LIBRARY, false, false, true, false);
    dep4.addImportFilter(PathFilters.getMetaInfFilter(), true);
    dep4.addExportFilter(PathFilters.getMetaInfFilter(), true);
    moduleSpecification.addSystemDependency(dep4);

    ModuleDependency dep5 = new ModuleDependency(moduleLoader, ORG_JAM_METRICS_LIBRARY2, false, false, true, false);
    dep5.addImportFilter(PathFilters.getMetaInfFilter(), true);
    dep5.addExportFilter(PathFilters.getMetaInfFilter(), true);
    moduleSpecification.addSystemDependency(dep5);
}
 
开发者ID:panossot,项目名称:jam-metrics,代码行数:66,代码来源:JamMetricsDependencyProcessor.java



注:本文中的org.jboss.as.server.deployment.module.ModuleSpecification类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IntegerLiteralExpr类代码示例发布时间:2022-05-22
下一篇:
Java NameMatchTransactionAttributeSource类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap