How to exclude specific classes / packages from dependencies in JBoss EAP 7/6
Issue
- We are installing a war file. The war package needs to load a class from a jar in
WEB-INF/lib
instead of the one provided by the JBoss module. - For example, we would like to force JBoss to not load classes from
com/sun/org/apache/xml/internal/security/transforms/implementations
which is under thesun.jdk
module by excluding it inWEB-INF/jboss-deployment-structure.xml
and instead load this particular class from WAR providedWEB-INF/lib/xmlsec.jar
. - Our web deployment
MyWeb.war
has dependency on another deploymentAnotherDeployment.ear
(AnotherDeployment.jar
), how to declare dependency onAnotherDeployment.ear
(AnotherDeployment.jar
) , but exclude some classes / packages from it ? - I am trying to add
<exclude path="com/abc"/>
in myjboss-deployment-structure.xml
inMyWeb.war
, to exclude classcom.abc.util.UtilClass
from another dependency deployment, but that doesn't work. - How do I setup class exclusion or module dependency for a sub-deployment within ear ?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.