diff --git a/elytron/src/main/java/org/wildfly/extension/elytron/DependencyProcessor.java b/elytron/src/main/java/org/wildfly/extension/elytron/DependencyProcessor.java index 028cf5975b5..d3c9b9e8522 100644 --- a/elytron/src/main/java/org/wildfly/extension/elytron/DependencyProcessor.java +++ b/elytron/src/main/java/org/wildfly/extension/elytron/DependencyProcessor.java @@ -12,7 +12,6 @@ import org.jboss.as.server.deployment.module.ModuleDependency; import org.jboss.as.server.deployment.module.ModuleSpecification; import org.jboss.modules.Module; -import org.jboss.modules.ModuleIdentifier; import org.jboss.modules.ModuleLoader; /** @@ -22,7 +21,7 @@ */ class DependencyProcessor implements DeploymentUnitProcessor { - private final ModuleIdentifier elytronIdentifier = ModuleIdentifier.create("org.wildfly.security.elytron"); + private final String elytronModuleName = "org.wildfly.security.elytron"; @Override public void deploy(DeploymentPhaseContext context) throws DeploymentUnitProcessingException { @@ -30,7 +29,7 @@ public void deploy(DeploymentPhaseContext context) throws DeploymentUnitProcessi final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); - moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, elytronIdentifier, false, false, true, false)); + moduleSpecification.addSystemDependency(ModuleDependency.Builder.of(moduleLoader, elytronModuleName).setImportServices(true).build()); } } diff --git a/elytron/src/main/java/org/wildfly/extension/elytron/EESecurityDependencyProcessor.java b/elytron/src/main/java/org/wildfly/extension/elytron/EESecurityDependencyProcessor.java index 6784d2906ef..7140d28d1ee 100644 --- a/elytron/src/main/java/org/wildfly/extension/elytron/EESecurityDependencyProcessor.java +++ b/elytron/src/main/java/org/wildfly/extension/elytron/EESecurityDependencyProcessor.java @@ -31,8 +31,8 @@ public void deploy(DeploymentPhaseContext phaseContext) { final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); - moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JACC_API, false, false, true, false)); - moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, AUTH_MESSAGE_API, false, false, true, false)); + moduleSpecification.addSystemDependency(ModuleDependency.Builder.of(moduleLoader, JACC_API).setImportServices(true).build()); + moduleSpecification.addSystemDependency(ModuleDependency.Builder.of(moduleLoader, AUTH_MESSAGE_API).setImportServices(true).build()); } }