use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class WeldBeanValidationDependencyProcessor method deploy.
@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();
final CapabilityServiceSupport support = deploymentUnit.getAttachment(Attachments.CAPABILITY_SERVICE_SUPPORT);
final WeldCapability weldCapability;
try {
weldCapability = support.getCapabilityRuntimeAPI(WELD_CAPABILITY_NAME, WeldCapability.class);
} catch (CapabilityServiceSupport.NoSuchCapabilityException ignored) {
return;
}
if (!weldCapability.isPartOfWeldDeployment(deploymentUnit)) {
// Skip if there are no beans.xml files in the deployment
return;
}
ModuleDependency cdiBeanValidationDep = new ModuleDependency(moduleLoader, CDI_BEAN_VALIDATION_ID, false, false, true, false);
moduleSpecification.addSystemDependency(cdiBeanValidationDep);
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class XTSDependenciesDeploymentProcessor method addXTSModuleDependency.
private void addXTSModuleDependency(final DeploymentUnit unit) {
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION);
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, XTS_MODULE, false, false, false, false));
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class CompensationsDependenciesDeploymentProcessor method addCompensationsModuleDependency.
private void addCompensationsModuleDependency(final DeploymentUnit unit) {
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION);
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, COMPENSATIONS_MODULE, false, false, true, false));
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class FederationDependencyProcessor method addDependency.
private void addDependency(DeploymentPhaseContext phaseContext, ServiceName federationServiceName) {
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
ModuleLoader moduleLoader = Module.getBootModuleLoader();
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, MODULE_ORG_PICKETLINK, false, false, true, false));
phaseContext.addDeploymentDependency(federationServiceName, DEPLOYMENT_ATTACHMENT_KEY);
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class SecurityDependencyProcessor method deploy.
/** {@inheritDoc} */
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, PICKETBOX_ID, false, false, false, false));
//add the remoting login module
final ModuleDependency remoting = new ModuleDependency(moduleLoader, REMOTING_LOGIN_MODULE, false, false, false, false);
remoting.addImportFilter(PathFilters.is(RemotingLoginModule.class.getName().replace(".", "/")), true);
moduleSpecification.addSystemDependency(remoting);
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JACC_API, false, false, true, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, AUTH_MESSAGE_API, false, false, true, false));
}
Aggregations