Unable to run twilio

The Twilio dependency is not available (as far as Wildfly sees the world). However, there are multiple options to provide it to Wildfly.

  1. You could create a jboss module for the Twilio library and deploy it to the $KEYCLOAK_HOME/modules/base/… folder and reference it with a custom jboss-deployment-structure.xml file from your .jar. Then, you can configure the Twilio dependency as “provided” in your pom.xml like other libraries shipped with Wildfly. (Wildfly docs: http://docs.wildfly.org/)
  2. Another option would be to use the maven-shade plugin to repackage the Twilio library (including transitive dependencies) in your extension jar. (see GitHub - sangyoon-lee/keycloak-sms-authenticator (not updated for some time), but works for me after updating (GitHub - srose/keycloak-sms-authenticator))
  3. If all else fails, you could deploy your extension as a classic .ear archive with the libraries embedded.
3 Likes