-
1. Re: Building and Packaging
payet.b Jan 13, 2006 11:42 AM (in response to matt.hibb)A solution might be to add your jar file directly into to your ear.
Then each module (EJB,WEB,...) using this library must have its classpath modified to reference this library. This can be done in the MANIFEST file of each module.
Example of configuration:
bertou$ jar xvf MyApp.ear
created: META-INF/
extracted: META-INF/MANIFEST.MF
extracted: META-INF/application.xml
created: lib/
extracted: lib/MyLib.jar
extracted: MyEJB.jar
bertou$ jar xvf lib/MyEJB.jar
created: META-INF/
extracted: META-INF/MANIFEST.MF
extracted: META-INF/ejb-jar.xml
extracted: META-INF/jboss.xml
created: mypkg/
extracted: mypkg/myhome.class
extracted: mypkg/mybean.class
extracted: mypkg/my.class
bertou$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.4.2_04-b04 (Sun Microsystems Inc.)
Class-Path: ./lib/MyLib.jar