[keycloak-user] Unable to load Spring Framework Libraries in Wildfly accessible to deployed JAR

Dominik Guhr pinguwien at gmail.com
Thu Mar 1 07:27:12 EST 2018


Hi Sachy,

to load your module in wildfly (when the module lies in the wildfly 
modules-directory), add <scope>provided</scope> to your artifact.

Also, to access them with wildfly classloader, add the following to your 
build in pom.xml:

			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifestEntries>
						 
<Dependencies>org.keycloak.keycloak-services,org.keycloak.keycloak-server-spi-private,org.keycloak.keycloak-ldap-federation 
,org.keycloak.keycloak-kerberos-federation</Dependencies>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

where the Dependencies-value consists of a comma-separated list of the 
modules used in your SPI, in your case e.g. org.springframework.core or 
something.

Hope this helps!

Best regards,
Dominik

Am 01.03.18 um 13:18 schrieb Sachin Rastogi:
> Hi all,
> 
> I am writing a custom Keycloak User Storage SPI, which is JAR file. I would
> like to use Spring DI in the JAR. I have added Spring JARs as Modules in
> Keycloak's Wildfly server.
> 
> Also, not able to load Spring context as Keycloak User Storage SPI initiate
> from META-INF.services "org.keycloak.storage.UserStorageProviderFactory"
> and invokes UserStorageProviderFactory.init method.
> 
> It also doesn't read the properties file inside resources directory.
> 
> Please advise how can I make this work.
> 
> Regards,
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
> 


More information about the keycloak-user mailing list