use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class JSFDependencyProcessor method addJSFAPI.
private void addJSFAPI(String jsfVersion, ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL))
return;
ModuleIdentifier jsfModule = moduleIdFactory.getApiModId(jsfVersion);
ModuleDependency jsfAPI = new ModuleDependency(moduleLoader, jsfModule, false, false, false, false);
moduleSpecification.addSystemDependency(jsfAPI);
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class DependencyProcessor method addDependencies.
private void addDependencies(DeploymentUnit deploymentUnit) {
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, "org.eclipse.microprofile.config.api", false, false, true, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, "io.smallrye.config", false, false, true, false));
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class MicroProfileFaultToleranceDependenciesProcessor method deploy.
@Override
public void deploy(DeploymentPhaseContext phaseContext) {
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
CapabilityServiceSupport support = deploymentUnit.getAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT);
Optional<WeldCapability> weldCapability = support.getOptionalCapabilityRuntimeAPI(WELD_CAPABILITY_NAME, WeldCapability.class);
if (weldCapability.isPresent() && weldCapability.get().isPartOfWeldDeployment(deploymentUnit) && MicroProfileFaultToleranceMarker.hasMicroProfileFaultToleranceAnnotations(deploymentUnit)) {
MicroProfileFaultToleranceMarker.mark(deploymentUnit);
ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
ModuleLoader moduleLoader = Module.getBootModuleLoader();
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, "org.eclipse.microprofile.fault-tolerance.api", false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, "org.wildfly.microprofile.fault-tolerance-smallrye.executor", false, false, true, false));
}
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class ApplicationClientDependencyProcessor 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 ModuleLoader loader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
moduleSpecification.addSystemDependency(new ModuleDependency(loader, CORBA_ID, false, true, true, false));
moduleSpecification.addSystemDependency(new ModuleDependency(loader, XNIO, false, true, true, false));
final Set<ModuleIdentifier> moduleIdentifiers = new HashSet<ModuleIdentifier>();
final DeploymentUnit top = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
moduleIdentifiers.add(top.getAttachment(Attachments.MODULE_IDENTIFIER));
for (final DeploymentUnit module : top.getAttachmentList(Attachments.SUB_DEPLOYMENTS)) {
moduleIdentifiers.add(module.getAttachment(Attachments.MODULE_IDENTIFIER));
}
final ListIterator<ModuleDependency> iterator = moduleSpecification.getMutableUserDependencies().listIterator();
while (iterator.hasNext()) {
final ModuleDependency dep = iterator.next();
final ModuleIdentifier identifier = dep.getIdentifier();
if (identifier.getName().startsWith(ServiceModuleLoader.MODULE_PREFIX) && !identifier.getName().startsWith(ExtensionIndexService.MODULE_PREFIX) && !moduleIdentifiers.contains(identifier)) {
iterator.remove();
}
}
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class BatchDependencyProcessor 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 ModuleLoader moduleLoader = Module.getBootModuleLoader();
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, batchModule, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, jberetModule, false, false, true, false));
}
Aggregations