An EAR file always includes submodules such as ejb-jar or military modules. You can exclude the default jboss module from these submodules in auxiliary deployment items.
For example, if your EAR has an ejb-jar module named ejbModule.jar, try running the following content in the 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>
source share