6 Replies Latest reply: Jul 3, 2012 8:39 AM by Benjamin Seyinbour RSS

How to exlude classes from WAR with jboss-deployment-structure.xml?

Marc-Steffen Kaesz Newbie

Hey guys,


I read everything about Modules and the jboss-deployment-structure.xml, but one thing I can't get to work is the following:


I have one War. This war includes several Jars in WEB-INF/lib. How can I exclude some classes which are in one of this Jars?


I tried e.g. this:





                    <exclude path="/**"/>

                    <exclude path="javax/mail"/>

                    <exclude path="javax/mail/"/>

                    <exclude path="javax/mail/**"/>

                    <exclude path="javax/mail/*"/>

                    <exclude path="javax/mail/?"/>

                    <exclude path="/javax/mail"/>

                    <exclude path="/javax/mail/"/>

                    <exclude path="/javax/mail/**"/>

                    <exclude path="/javax/mail/*"/>

                    <exclude path="/javax/mail/?"/>

                    <exclude path="javax.mail"/>







I tried several other ways, too, but nothing helped. If I delete the classes from the jar than the errors disappear but that's not a solution.


Any ideas?


Thanks a lot?