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>
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With