"I have an EJB I wrote in JDev which requires about a dozen supporting JAR files. The EAR file, of course contains the JAR file that contains the EJB artifacts. I'd prefer the jars to be outside of the EJB JAR but within the EAR because I intend to add other EJBs to this EAR which will also use these jars."
One way to achieve this is
Let us say you have 2 Projects
Project A (contains ejbs - one ejb.jar) --Has a EJB Deployment profile --Modify the settings to make sure that it doesn't package helper classes or additional jar files
Project B -- Has an EAR deployment profile -- Has a simple archive deployment profile
Edit the libraries in Project B (project settings) to add all the JAR file you want to add. Edit the simple archive deployment profile (under dependency analyzer) and select the jar file
Edit the EAR deployment profile settings to include the EJB deployment from Project A and Simple archive file from Project B.
Before creating the EAR file, edit the EJB deployment profile in Project A to add a mainfest file so that the EJB can look at the jar files which are at the EAR level.
Now create the EAR file.
6:05:52 PM
|