jbosswildfly-11

Custom implicit module dependency in WildFly


There's the 3rd-party application bpm.ear that contains the ancient commons-net.jar in its /bpm.war/WEB-INF/lib/.

I need to globally override it with my own version of the jar without patching the files inside the deployment. That is, make this change survive undeployment of the app.

Formerly, when we were using JBoss 4x this was solved by setting the $CLASSPATH env. var before starting the server. Of course, this doesn't work in Wildfly 11.

I want to create a custom module inside ${JBOSS_HOME}/modules (already done) and to create a simple rule to implicitly add this module to all apps deployed on this server.


Solution

  • You can use https://wildscribe.github.io/WildFly/16.0/subsystem/ee/#attr-global-modules to define a list of modules that should be made available to all deployments.