9

I am trying to exclude the modules in JBOSS 7.1.1 and it seems like JBOSS just ignores my jboss-deployment-structure.xml.

I have placed this in the META-INF of my EAR. Here's an example of my config file:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
   <deployment>
        <exclusions>
              <module name="java.xml.bind.api" /> <!- still see it there -->
              <module name="somerandomname" /> <!- does not even complain when this doesn't exist -->
          </exclusions>
   </deployment>
</jboss-deployment-structure>
try-catch-finally
  • 7,436
  • 6
  • 46
  • 67
Aaron Tan
  • 103
  • 1
  • 4

1 Answers1

3

EAR file always includes sub-modules like ejb-jar or war modules. You can exclude a default jboss module from these sub-modules in sub-deployment elements.
For example if your EAR has an ejb-jar module named ejbModule.jar, Try following content in jboss-deployment-structure.xml file to exclude java.xml.bind.api from it:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
    <exclusions>
        <module name="java.xml.bind.api" slot="main"/>
    </exclusions>
</deployment>
<sub-deployment name="ejbModule.jar">
    <exclusions>
        <module name="java.xml.bind.api"/>
    </exclusions>
</sub-deployment>
</jboss-deployment-structure>
hyda
  • 550
  • 1
  • 6
  • 15