Module provider loader
This commit is contained in:
parent
42eed8145c
commit
1f5fedb0b0
7 changed files with 26 additions and 2 deletions
6
dependencies/server-all/pom.xml
vendored
6
dependencies/server-all/pom.xml
vendored
|
@ -217,6 +217,12 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-wildfly-extensions</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -66,6 +66,10 @@
|
|||
<maven-resource group="org.keycloak" artifact="keycloak-services"/>
|
||||
</module-def>
|
||||
|
||||
<module-def name="org.keycloak.keycloak-wildfly-extensions">
|
||||
<maven-resource group="org.keycloak" artifact="keycloak-wildfly-extensions"/>
|
||||
</module-def>
|
||||
|
||||
<module-def name="com.google.zxing.core">
|
||||
<maven-resource group="com.google.zxing" artifact="core"/>
|
||||
</module-def>
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<module name="org.keycloak.keycloak-model-sessions-mem" services="import"/>
|
||||
<module name="org.keycloak.keycloak-model-sessions-mongo" services="import"/>
|
||||
<module name="org.keycloak.keycloak-picketlink-api" services="import"/>
|
||||
<module name="org.keycloak.keycloak-wildfly-extensions" services="import"/>
|
||||
|
||||
<module name="org.keycloak.keycloak-picketlink-ldap" services="import"/>
|
||||
<module name="org.keycloak.keycloak-saml-protocol" services="import"/>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<module xmlns="urn:jboss:module:1.1" name="org.keycloak.keycloak-wildfly-extensions">
|
||||
<resources>
|
||||
<!-- Insert resources here -->
|
||||
</resources>
|
||||
<dependencies>
|
||||
<module name="org.keycloak.keycloak-core"/>
|
||||
<module name="org.keycloak.keycloak-model-api"/>
|
||||
<module name="org.keycloak.keycloak-services"/>
|
||||
<module name="org.jboss.modules"/>
|
||||
</dependencies>
|
||||
</module>
|
|
@ -23,6 +23,7 @@
|
|||
<module>jetty</module>
|
||||
<module>undertow</module>
|
||||
<module>wildfly-adapter</module>
|
||||
<module>wildfly-extensions</module>
|
||||
<module>keycloak-subsystem</module>
|
||||
<module>keycloak-as7-subsystem</module>
|
||||
<module>js</module>
|
||||
|
|
|
@ -21,7 +21,6 @@ public class ModuleProviderLoaderFactory implements ProviderLoaderFactory {
|
|||
@Override
|
||||
public ProviderLoader create(ClassLoader baseClassLoader, String resource) {
|
||||
try {
|
||||
System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx");
|
||||
Module module = Module.getContextModuleLoader().loadModule(ModuleIdentifier.fromString(resource));
|
||||
ModuleClassLoader classLoader = module.getClassLoader();
|
||||
return new DefaultProviderLoader(classLoader);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ProviderManager {
|
|||
|
||||
public ProviderManager(ClassLoader baseClassLoader, String... resources) {
|
||||
List<ProviderLoaderFactory> factories = new LinkedList<ProviderLoaderFactory>();
|
||||
for (ProviderLoaderFactory f : ServiceLoader.load(ProviderLoaderFactory.class)) {
|
||||
for (ProviderLoaderFactory f : ServiceLoader.load(ProviderLoaderFactory.class, getClass().getClassLoader())) {
|
||||
factories.add(f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue