-
1. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
ebross Jul 3, 2012 4:29 AM (in response to mkaesz)Hi Marc,
The doc say that you can exclude dependencies -- dependencies are modules i.e., java packages, e.g.,
<exclusions>
<module name="path.to.the.class.to.exlude" />
</exclusions>
Possible solution is to move the class you want to exclude to a separate package and then exclude that package in your jboss-deployment-structure.xml.
-
2. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
mkaesz Jul 3, 2012 6:39 AM (in response to ebross)I tried that as well, but it did not work. At the moment I excluded the jar from the war and created my own module and imported only the classes I needed, but that seems to be ignored as well.
Any ides?
-
3. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
ebross Jul 3, 2012 6:54 AM (in response to mkaesz)Hi Marc,
Where is your jboss-deployment-structure.xml placed? It should be in META-INF (or WEB-INF for web deployments).
-
4. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
mkaesz Jul 3, 2012 7:31 AM (in response to ebross)Hi!
It is placed in WEB-INF. It's only a war. If I make some typos the parser finds them. So the file is at the right place.
Another example: I tried to add the javax.management classes the following way.
<
jboss-deployment-structure
xmlns
=
"urn:jboss:deployment-structure:1.1"
>
<
deployment
>
<
dependencies
>
<
system
export
=
"true"
>
<
paths
>
<
path
name
=
"javax/management"
/>
</
paths
>
</
system
>
</
dependencies
>
</
deployment
>
</
jboss-deployment-structure
>
They are ignored as well. I do always get a LinkageError and Caused By is a ClassNotFoundException. In my case javax.management.remote.JMXConnectionProvider is not found.
Thanks.
Marc
-
5. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
mkaesz Jul 3, 2012 7:51 AM (in response to mkaesz)ok, I figured out that the javax.management classes should be loaded by the javax.api module which is loaded by the javaee module. I haven't touched any of those modules, so I don't understand why they aren't available in my app. Any ideas?
-
6. Re: How to exlude classes from WAR with jboss-deployment-structure.xml?
ebross Jul 3, 2012 8:39 AM (in response to mkaesz)What version of JBoss and "jboss-deployment-structure.xsd" are you using?
Mind you, you could just add it to the JBoss ...modules/sun/jdk/main/module.xml:
<module xmlns="urn:jboss:module:1.1" name="sun.jdk">
<resources>
<resource-root path="service-loader-resources"/>
</resources>
<dependencies>
<system export="true">
<paths>
<
path
name
=
"javax/management"
/>
...