[keycloak-dev] Deploying provider with dependencies
bburke at redhat.com
Thu Jan 19 09:56:56 EST 2017
I'm pretty sure you can just remove the application.xml too. Then the
ear will be recursed. I tried this out when I first wrote the deployer.
On 1/18/17 4:20 PM, Dmitry Telegin wrote:
> I've finally solved this. There are two moments to pay attention to:
> - maven-ear-plugin by default generates almost empty application.xml.
> In order for subdeployment to be recognized, it must be mentioned in
> application.xml as a module. Both <ejb> and <java> worked for me;
> - in JBoss/WildFly, only top-level jboss-deployment-structure.xml files
> are recognized. Thus, this file should be moved from a JAR to an EAR
> and tweaked accordingly. This is discussed in detail here:
> Again, it would be nice to have a complete working example to
> demonstrate this approach. I think I could (one day) update my
> BeerCloak example to cover this new deployment technique.
> В Wed, 18/01/2017 в 23:10 +0300, Dmitry Telegin пишет:
>> I've tried to package my provider JAR into an EAR, but that didn't
>> The layout is the following:
>> +- foo-provider-0.1-SNAPSHOT.jar
>> +- META-INF
>> +- application.xml
>> When I put the JAR into the deployments subdir, it is deployed
>> successfully, initialization code is called etc. But when I drop the
>> EAR in the same subdir, there is only a successful deployment
>> The provider doesn't get initialized; seems like deployer doesn't
>> recurse into EAR contents. Tried to place the JAR into the "lib"
>> inside EAR, this didn't work either. The EAR is generated by maven-
>> plugin with the standard settings.
>> Am I missing something? Sorry for bugging you, but unfortunately
>> is not much said in the docs about deploying providers from inside
>> EARs. A working example would be helpful as well.
>> В Wed, 18/01/2017 в 12:34 +0100, Stian Thorgersen пишет:
>>> You have two options deploy as a module which requires adding
>>> for all dependencies or using the new deploy as a JEE archive
>>> approach, which also supports hot deployment. Check out the server
>>> developer guide for more details.
>>> On 18 January 2017 at 11:54, Dmitry Telegin <mitya at cargosoft.ru>
>>>> It's easy to imagine a provider that would integrate a third
>>>> library which, together with transitive dependencies, might
>>>> dozens of JARs. A real-world example: OpenID 2.0 login protocol
>>>> implementation using openid4java, which in its turn pulls in
>>>> another 10
>>>> What are the deployment options for configurations like that? Is
>>>> really necessary to install each and every dependency as a
>>>> module? This could become a PITA if there are a lot of deps.
>>>> be a single, self-sufficient artifact just to be put into
>>>> subdir? If yes, what type of artifact it should be (EAR maybe)?
>>>> keycloak-dev mailing list
>>>> keycloak-dev at lists.jboss.org
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
More information about the keycloak-dev