How to exclude specific classes / packages from dependencies in JBoss EAP 6

Solution Unverified - Updated -

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 the sun.jdk module by excluding it in WEB-INF/jboss-deployment-structure.xml and instead load this particular class from WAR provided WEB-INF/lib/xmlsec.jar.
  • Our web deployment MyWeb.war has dependency on another deployment AnotherDeployment.ear(AnotherDeployment.jar), how to declare dependency on AnotherDeployment.ear(AnotherDeployment.jar) , but exclude some classes / packages from it ?
  • I am trying to add <exclude path="com/abc"/> in my jboss-deployment-structure.xml in MyWeb.war, to exclude class com.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

  • 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.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.