Module exception in EAR in JBOSS 7.1.1

I am trying to exclude modules in JBOSS 7.1.1, and it seems that JBOSS is simply ignoring my jboss-deployment-structure.xml.

I put this in the META-INF of my EAR. Here is an example of my configuration 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> 
+6
source share
1 answer

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> 
+2
source

Source: https://habr.com/ru/post/945717/


All Articles