I have an ear file with a structure like this that I'm trying to deploy in WildFly 17:
my-application-ear.ear
|-- my-ejb-jar-1.jar
|-- my-ejb-jar-2.jar
|-- lib/
|-- my-library-jar.jar
|-- ...
|-- META-INF
|-- MANIFEST.MF
|-- jboss-deployment-structure.xml
my-library-jar contains content under META-INF/services that the standard classloader doesn't load by default.
I'm trying to use the services attribute to allow the classloader access to the META-INF/services directory, but I can't find a way to specify the library jar as a module, or as a resource that includes META-INF/services.
Is there a way to do this? This is an example of [some of the many] things I've tried:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<dependencies>
<!-- snip! -->
...
<!-- These don't work - looking for a way to load lib jar files with services. -->
<module name="my-library-jar.jar" services="import" />
<module name="lib.my-library-jar.jar" services="import" />
<module name="lib/my-library-jar.jar" services="import" />
<module name="deployment.my-application-ear.ear.my-library-jar.jar" services="import" />
<module name="deployment.my-application-ear.ear.lib.my-library-jar.jar" services="import" />
<module name="deployment.my-application-ear.ear/my-library-jar.jar" services="import" />
<module name="deployment.my-application-ear.ear/lib/my-library-jar.jar" services="import" />
<module name="deployment.my-application-ear.ear.parent.my-library-jar.jar" services="import" />
</dependencies>
</deployment>
</jboss-deployment-structure>
If possible I would prefer to use the deployment descriptor, rather than modify the manifest file's Dependencies attribute.
This application is quite large and worked well in JBoss 5.1, but its structure is proving hard to describe to the new classloader.