-
2. Re: Where to package 3rd party libraries in an application?
dprakash Sep 27, 2012 5:11 AM (in response to nurfisya)Hoping that you want to deploy ear in AS, all the common third party libraries will be placed in lib folder at the root and the Class path entries should be added in MANIFEST.MF. If a library is specific only to the web deployment in an ear, then it can be placed under WEB-INF/lib of the war file and add the dependency in MANIFEST of the war file.
If only war file needs to be deployed, then the later statement above will hold good.
You may also use Dependecy: org.apache.log4j [Jboss module] in root MANIFEST file and skip adding log4j.jar in your app lib.
Hope this helps.
-
3. Re: Where to package 3rd party libraries in an application?
sfcoy Sep 27, 2012 5:21 AM (in response to dprakash)Classpath entries in MANIFEST.MF are redundant for jars placed in the EAR/lib directory. Classes in jars in this directory are automatically made available to all modules (WARs, EJBs, etc) in the EAR. This is the raison d'etre for it's existence in the first place.
-
4. Re: Where to package 3rd party libraries in an application?
dprakash Sep 27, 2012 5:33 AM (in response to sfcoy)Does it hold good for war deployment as well?
-
5. Re: Where to package 3rd party libraries in an application?
nickarls Sep 27, 2012 5:50 AM (in response to dprakash)Classes in jars in WEB-INB/lib should be available in the whole war
-
6. Re: Where to package 3rd party libraries in an application?
dprakash Sep 27, 2012 5:54 AM (in response to nickarls)Don't they require the entries in the MANIFEST file of war?
-
7. Re: Where to package 3rd party libraries in an application?
jaikiran Sep 27, 2012 5:56 AM (in response to dprakash)Y D Prakash wrote:
Don't they require the entries in the MANIFEST file of war?
No they don't. All jars within the .war/lib are made available in the classpath of that .war deployment. That's required by spec.
-
8. Re: Where to package 3rd party libraries in an application?
dprakash Sep 27, 2012 5:58 AM (in response to jaikiran)Sounds good...Thanks all.
-
9. Re: Where to package 3rd party libraries in an application?
nurfisya Sep 27, 2012 8:42 PM (in response to dprakash)i put all the libraries in ear/lib and it works fine for me. Thanks a lot