title: Packaging keycloak extension providers as EAR
body: <p>I'm in a project that willing to extends keycloak functionalities with new ones. We use SPI in order to do this, and we have more than one jar file for hot deploying into Wildfly's keycloak server.
  We have major issues with dependency between jars. We need to package all functionalities as EAR but I don't find the right configuration to do this. My example was a post-<a href="https://stackoverflow.com/questions/58203788/keycloak-custom-spi-does-not-appear-in-list?newreg=dbe30b0fc90a4b7dbd1b8e50b263bab3">Keycloak - Custom SPI does not appear in list</a> that explains how to packaging jar into EAR in order to deploy on Jboss, and is not clear where should we put the jar dependencies.</p>
  
  <p><strong>Details about mavem project's structure:</strong></p>
  
  <pre><code>KeycloakProject (packaging pom)
  |
  + - keycloak-entities-providers (packaging pom)
  | |
  | +- keycloak-first-entity-provider (packaging jar)
  | |          |
  | |          +- META-INF
  | |             |
  | |             +- services
  | |                |
  | |                +- org.keycloak.authentication.AuthenticatorFactory
  | |                +- org.keycloak.connections.jpa.entityprovider.JpaEntityProviderFactory
  | |                |  ...
  | |                +- jboss-deployment-structure.xml
  | +- keycloak-second-entity-provider (packagind jar)
  |            |
  |            +- META-INF
  |               |
  |               +- services
  |               |  |
  |               |  +- org.keycloak.services.resource.RealmResourceProviderFactory
  |               |   ...
  |               +- jboss-deployment-structure.xml
  +- keycloak-identity-providers (packaging pom)
    |
    +- keycloak-first-identity-provider (packaging jar)
    |          |
    |          +- META-INF
    |             |
    |             +- services
    |                |
    |                +- org.keycloak.authentication.AuthenticatorFactory
    |                +- org.keycloak.connections.jpa.entityprovider.JpaEntityProviderFactory
    |                |  ...
    |                +- jboss-deployment-structure.xml
    +- keycloak-second-identity-provider (packagind jar)
               |
               +- META-INF
                  |
                  +- services
                  |  |
                  |  +- org.keycloak.services.resource.RealmResourceProviderFactory
                  |   ...
                  +- jboss-deployment-structure.xml
  </code></pre>
  
  <p>I need to know if there is a single jboss-deployment-structure.xml on EAR package, and in this case what must contain. Every jar file has its own dependencies and there is a need to depend on one of another (like keycloak-second-entity-provider depends on the keycloak-first-entity-provider).</p>
  
  <p>Thank you !</p>