* @throws DeploymentUnitProcessingException
*
*/
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();
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JAVAEE_API_ID, false, false, true, false));
// TODO: Post 7.0, we have to rethink this whole hibernate dependencies that we add to user deployments
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, HIBERNATE_VALIDATOR_ID, false, false, true, false));
//add jboss-invocation classes needed by the proxies
ModuleDependency invocation = new ModuleDependency(moduleLoader, JBOSS_INVOCATION_ID, false, false, false, false);
invocation.addImportFilter(PathFilters.is("org.jboss.invocation.proxy.classloading"), true);
moduleSpecification.addSystemDependency(invocation);
ModuleDependency ee = new ModuleDependency(moduleLoader, JBOSS_AS_EE, false, false, false, false);
ee.addImportFilter(PathFilters.is("org.jboss.as.ee.component.serialization"), true);
moduleSpecification.addSystemDependency(ee);
}