How to exclude specific classes / packages from dependencies in JBoss EAP 6
Issue
- We are installing a war file. The war package needs to load a class from a jar in
WEB-INF/libinstead 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/implementationswhich is under thesun.jdkmodule by excluding it inWEB-INF/jboss-deployment-structure.xmland instead load this particular class from WAR providedWEB-INF/lib/xmlsec.jar. - Our web deployment
MyWeb.warhas 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.xmlinMyWeb.war, to exclude classcom.abc.util.UtilClassfrom another dependency deployment, but that doesn't work. - How do I setup class exclusion or module dependency for a sub-deployment within ear ?
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.0.x
- 6.1.x
- 6.2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
