KEYCLOAK-1304 WF9 server subsystem
- remove unnecessary dependencies
This commit is contained in:
parent
6d6e598ce5
commit
3df504b6b4
4 changed files with 0 additions and 118 deletions
|
@ -26,7 +26,6 @@
|
||||||
<module name="org.keycloak.keycloak-forms-common-themes" services="import"/>
|
<module name="org.keycloak.keycloak-forms-common-themes" services="import"/>
|
||||||
<module name="org.keycloak.keycloak-invalidation-cache-infinispan" services="import"/>
|
<module name="org.keycloak.keycloak-invalidation-cache-infinispan" services="import"/>
|
||||||
<module name="org.keycloak.keycloak-invalidation-cache-model" services="import"/>
|
<module name="org.keycloak.keycloak-invalidation-cache-model" services="import"/>
|
||||||
<module name="org.keycloak.keycloak-jboss-adapter-core" services="import"/>
|
|
||||||
<module name="org.keycloak.keycloak-js-adapter" services="import"/>
|
<module name="org.keycloak.keycloak-js-adapter" services="import"/>
|
||||||
<module name="org.keycloak.keycloak-kerberos-federation" services="import"/>
|
<module name="org.keycloak.keycloak-kerberos-federation" services="import"/>
|
||||||
<module name="org.keycloak.keycloak-ldap-federation" services="import"/>
|
<module name="org.keycloak.keycloak-ldap-federation" services="import"/>
|
||||||
|
@ -63,9 +62,6 @@
|
||||||
|
|
||||||
<!-- Exclude keycloak modules -->
|
<!-- Exclude keycloak modules -->
|
||||||
<module name="org.keycloak.keycloak-core" />
|
<module name="org.keycloak.keycloak-core" />
|
||||||
<module name="org.keycloak.keycloak-adapter-core" />
|
|
||||||
<module name="org.keycloak.keycloak-undertow-adapter" />
|
|
||||||
<module name="org.keycloak.keycloak-as7-adapter" />
|
|
||||||
</exclusions>
|
</exclusions>
|
||||||
<exclude-subsystems>
|
<exclude-subsystems>
|
||||||
<subsystem name="webservices"/>
|
<subsystem name="webservices"/>
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors
|
|
||||||
* as indicated by the @author tags. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
|
||||||
* the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations under
|
|
||||||
* the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.subsystem.server.extension;
|
|
||||||
|
|
||||||
import org.jboss.as.server.deployment.Attachments;
|
|
||||||
import org.jboss.as.server.deployment.DeploymentPhaseContext;
|
|
||||||
import org.jboss.as.server.deployment.DeploymentUnit;
|
|
||||||
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
|
|
||||||
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Stan Silvert ssilvert@redhat.com (C) 2013 Red Hat Inc.
|
|
||||||
*/
|
|
||||||
public abstract class KeycloakDependencyProcessor implements DeploymentUnitProcessor {
|
|
||||||
|
|
||||||
private static final ModuleIdentifier KEYCLOAK_JBOSS_CORE_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-jboss-adapter-core");
|
|
||||||
private static final ModuleIdentifier KEYCLOAK_CORE_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-adapter-core");
|
|
||||||
private static final ModuleIdentifier KEYCLOAK_CORE = ModuleIdentifier.create("org.keycloak.keycloak-core");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
|
|
||||||
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
|
|
||||||
|
|
||||||
// Next phase, need to detect if this is a Keycloak deployment. If not, don't add the modules.
|
|
||||||
|
|
||||||
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
|
|
||||||
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
|
|
||||||
addCommonModules(moduleSpecification, moduleLoader);
|
|
||||||
addPlatformSpecificModules(moduleSpecification, moduleLoader);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addCommonModules(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
|
|
||||||
// ModuleDependency(ModuleLoader moduleLoader, ModuleIdentifier identifier, boolean optional, boolean export, boolean importServices, boolean userSpecified)
|
|
||||||
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_JBOSS_CORE_ADAPTER, false, false, false, false));
|
|
||||||
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_CORE_ADAPTER, false, false, false, false));
|
|
||||||
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_CORE, false, false, false, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract protected void addPlatformSpecificModules(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void undeploy(DeploymentUnit du) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors
|
|
||||||
* as indicated by the @author tags. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
|
||||||
* the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations under
|
|
||||||
* the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.keycloak.subsystem.server.extension;
|
|
||||||
|
|
||||||
import org.jboss.as.server.deployment.module.ModuleDependency;
|
|
||||||
import org.jboss.as.server.deployment.module.ModuleSpecification;
|
|
||||||
import org.jboss.modules.ModuleIdentifier;
|
|
||||||
import org.jboss.modules.ModuleLoader;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add platform-specific modules for WildFly.
|
|
||||||
*
|
|
||||||
* @author Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc.
|
|
||||||
*/
|
|
||||||
public class KeycloakDependencyProcessorWildFly extends KeycloakDependencyProcessor {
|
|
||||||
|
|
||||||
private static final ModuleIdentifier KEYCLOAK_WILDFLY_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-wildfly-adapter");
|
|
||||||
private static final ModuleIdentifier KEYCLOAK_UNDERTOW_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-undertow-adapter");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void addPlatformSpecificModules(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
|
|
||||||
// ModuleDependency(ModuleLoader moduleLoader, ModuleIdentifier identifier, boolean optional, boolean export, boolean importServices, boolean userSpecified)
|
|
||||||
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_WILDFLY_ADAPTER, false, false, true, false));
|
|
||||||
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_UNDERTOW_ADAPTER, false, false, false, false));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -23,7 +23,6 @@ import org.jboss.as.server.DeploymentProcessorTarget;
|
||||||
import org.jboss.as.server.deployment.Phase;
|
import org.jboss.as.server.deployment.Phase;
|
||||||
import org.jboss.dmr.ModelNode;
|
import org.jboss.dmr.ModelNode;
|
||||||
|
|
||||||
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
|
|
||||||
import org.keycloak.subsystem.server.extension.authserver.KeycloakServerDeploymentProcessor;
|
import org.keycloak.subsystem.server.extension.authserver.KeycloakServerDeploymentProcessor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +39,6 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler {
|
||||||
context.addStep(new AbstractDeploymentChainStep() {
|
context.addStep(new AbstractDeploymentChainStep() {
|
||||||
@Override
|
@Override
|
||||||
protected void execute(DeploymentProcessorTarget processorTarget) {
|
protected void execute(DeploymentProcessorTarget processorTarget) {
|
||||||
processorTarget.addDeploymentProcessor(KeycloakExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, 0, chooseDependencyProcessor());
|
|
||||||
processorTarget.addDeploymentProcessor(KeycloakExtension.SUBSYSTEM_NAME,
|
processorTarget.addDeploymentProcessor(KeycloakExtension.SUBSYSTEM_NAME,
|
||||||
Phase.POST_MODULE, // PHASE
|
Phase.POST_MODULE, // PHASE
|
||||||
Phase.POST_MODULE_VALIDATOR_FACTORY - 1, // PRIORITY
|
Phase.POST_MODULE_VALIDATOR_FACTORY - 1, // PRIORITY
|
||||||
|
@ -48,8 +46,4 @@ class KeycloakSubsystemAdd extends AbstractBoottimeAddStepHandler {
|
||||||
}
|
}
|
||||||
}, OperationContext.Stage.RUNTIME);
|
}, OperationContext.Stage.RUNTIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DeploymentUnitProcessor chooseDependencyProcessor() {
|
|
||||||
return new KeycloakDependencyProcessorWildFly();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue