I am not sure which version of jboss you are using. Currently, we use JBoss-3.2.3 and we have a similar case where there are jar files in our ear file and the way we configure it is as follows:
- Create a application.xml file containing the following:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> <application> <display-name>My Struts Example</display-name> <module> <java>first.jar</java> <!-- Assuming that first.jar is *directly* under the ear --> </module> <module> <java>second.jar</java> </module> </application>
- Place this application.xml file in the META-INF directory of yourApp.ear
This works for us without any issues. See if this approach suits you.
I'm using 4.0.4, sorry. Our EAR works fine with 3.2.x versions (specifically, 3<=x<=7 have been tested). I tried adding the directives to application.xml as you suggested. It does cause the jars to be listed as deployable, but I still get the problem with JBoss looking for them in the deploy directory first. This isn't really a problem - it's the warning exceptions that are thrown that bother me. Turns out these are just Chicken Little exceptions. When I bothered to look, I discovered that the application was, and had been, running.
Thanks for the help.