[jboss-user] [Beginners Corner] - Re: Where do external jar files go in the ear?
weston.price@jboss.com
do-not-reply at jboss.com
Wed Apr 18 08:06:43 EDT 2007
anonymous wrote :
| AFAIK there is no automatic inclusion of jar files in an EAR. You can define them in application.web:
| Code:
|
|
| myjar.jar
|
|
|
| And you place it in the root dir. of the EAR.
|
|
Not a good idea. The element is to be used for J2EE application clients and should not be used as a method for deploying third party/utility jars.
The correct way to do this is to define a Classpath entry in the MANIFEST.MF file of each J2EE module (ie EJB jar file/WAR file).
Example MANIFEST.MF
|
| Class-Path: jar1.jar jar2.jar
|
|
Note the path itself is relative to the root of the archive. So, for instance assuming you had an EAR structure such as
| EAR
| -->lib
| jar1.jar
| jar2.jar
|
|
Your MANIFEST.MF should look as follows:
|
| Class-Path: lib/jar1.jar lib/jar2.jar
|
|
Again, an entry like the one above should be placed in the MANIFEST.MF file of *each* J2EE module deployed inside your EAR file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038334#4038334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038334
More information about the jboss-user
mailing list