[keycloak-user] Launch Keycloak SPI as module with external dependencies
Dmitry Telegin
dt at acutus.pro
Fri Jul 6 05:32:39 EDT 2018
Hi,
Basically, you've got two options here:
1) deploy all your dependencies as JBoss/Wildfly modules, e.g. using
jboss-cli.sh. This is the example of adding PostgreSQL JDBC driver:
module add --name=org.postgresql --resources=/path/to/postgresql-
42.1.1.jar --dependencies=javax.api,javax.transaction.api
You will need to substitute name, path to JAR and dependencies for each
module you'll be deploying.
2) deploy your provider as an EAR with dependencies inside. See BeerClo
ak to find out how to do it. beercloak-core is an (almost) dummy
dependency for the demo purposes; beercloak-module is the provider
proper; beercloak-ear is the EAR packaging project. You will have to
edit src/main/application/META-INF/jboss-deployment-structure.xml
inside your EAR project to reflect your actual dependencies and
module/package names.
Feel free to ask any questions regarding BeerCloak.
Cheers,
Dmitry Telegin
CTO, Acutus s.r.o.
Keycloak Consulting and Training
Pod lipami street 339/52, 130 00 Prague 3, Czech Republic
+42 (022) 888-30-71
E-mail: info at acutus.pro
On Fri, 2018-07-06 at 10:30 +0200, Lamine Léo Keita wrote:
> Hi,
>
> I've build an authentication SPI which I deploy with a jar file with
> no
> problem by copying it to $KEYCLOAK_HOME/providers/ directory.
>
> I needed external dependencies so I made some change to my
> application and
> external dependencies are not found ...
>
> The documentation does not really explain this case.
>
> Can someone help me on how to build a jar with all external
> dependencies to
> deploy it plz?
>
> I tried to use jar-with-dependencies plugin but this does not work
> too...
> Because my below file is not included in the jar...
>
> services > org.keycloak.authentication.AuthenticatorFactory
>
> Here is the plugin references :
> <plugin>
>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> </configuration>
> <executions>
> <execution>
> <id>make-assembly</id>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
>
> BR,
> Lamine
> _______________________________________________
> 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