use of org.jboss.as.ee.subsystem.GlobalModulesDefinition.GlobalModule in project wildfly by wildfly.
the class GlobalModuleDependencyProcessor method deploy.
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
final List<GlobalModule> globalMods = this.globalModules;
for (final GlobalModule module : globalMods) {
final ModuleDependency dependency = new ModuleDependency(Module.getBootModuleLoader(), module.getModuleIdentifier(), false, false, module.isServices(), false);
if (module.isMetaInf()) {
dependency.addImportFilter(PathFilters.getMetaInfSubdirectoriesFilter(), true);
dependency.addImportFilter(PathFilters.getMetaInfFilter(), true);
}
if (module.isAnnotations()) {
deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, module.getModuleIdentifier());
}
moduleSpecification.addSystemDependency(dependency);
}
}
Aggregations