- This topic has 6 replies, 5 voices, and was last updated 19 years, 10 months ago by
Scott Anderson.
-
AuthorPosts
-
jayrobertsoMemberWeblogic will look for dependent jar’s in an EAR file in the subdirectory APP-INF/lib.
Currently, exported and dependent jars are placed in the root directory of the EAR directory (where Weblogic won’t find them).
Is there a way to get this to work?
Riyad KallaMemberI am researching this…
support-michaelKeymasterME honors the J2EE deployment spec and conventions. So does WLS 7+ and it will pick up jars packaged anywhere in the EAR. The requirement is that modules must reference these jars using the Manifest Class-path mechanism.
Personally, I like the WLS EAR APP-INF convensions similar to the WAR structure. But unfortunately that is not the standard. Following is a link to the EAR Project Quickstart that has some information on deployment.
jdemmonMemberIf MyEclipse is insistent upon only supporting the J2EE spec, and if one desires to have MyEclipse build and deploy an EAR, then it seems extremely odd that MyEclipse does not support the automated updating of the class-path in the MANIFEST.MF files.
MyEclipse seems to be thorough in providing automated support for build, depolying, and keeping the EAR in sync to dependent modules and libs.
Except for the last step, which is keeping the MANIFEST.MF files in sync.
Is there a purpose for forcing the developer to always be manually editing these files? Is there some aspect to project structure and/or deployment that makes automatic management of manifest files undesirable?
Another question is why is it hard coded that “optional jars/classes” must be deployed at the EAR root? Why is there no option to specify a user defined location?
Scott AndersonParticipantIf MyEclipse is insistent upon only supporting the J2EE spec, and if one desires to have MyEclipse build and deploy an EAR, then it seems extremely odd that MyEclipse does not support the automated updating of the class-path in the MANIFEST.MF files.
…
Is there a purpose for forcing the developer to always be manually editing these files?That would be odd, if we didn’t support manifest updates, but we do. Please see the EAR Project Quickstart link here:
http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/earprojects/index.html
Once you select the link, scroll down to just below ‘Figure 30’ and you’ll see how to generate the manifest classpath entries automatically for the proejcts deployed in your EAR.Another question is why is it hard coded that “optional jars/classes” must be deployed at the EAR root? Why is there no option to specify a user defined location?
Actually the can be anywhere in the EAR and they’ll be deployed when the EAR is. However, when we package and move dependent java projects into the EAR, right now there isn’t a way to specify an arbitrary path where they’ll be located. This is an open enhancement request, along with some other flexible project issues, that we’ll address in an upcoming release. In the meantime, you can get what you want by either placing the jars in your EAR project into APP-INF/lib, and let WebLogic take care of the classpath, or use our automatic packaging and manifest update capabilities to do the same thing in a more standard way. Either will work fine. If you want to go with APP-INF/lib and the libraries change or are built from other projects, you can simply use “Export as Jar” for the projects and target the export location into APP-INF/lib of your EAR. If you do that, you can even save the .jardesc so you can just rerun it to repackage your project and place it in APP-INF/lib whenever you want.
jdemmonMemberScott,
Thanks for the speedy response!
I stand corrected on the manifest management issue. It’s all working for me as you described.
jd
Scott AndersonParticipantThat’s great! It is rather hard to find. 🙂
-
AuthorPosts