I have 4 referenced libraries on my Java Build path for my Java Project in MyEclipse Blue 10.7. My understanding is that one of the points of using referenced libraries was so that they are not included in the final war file when it is built and deployed. However, in my case all of the jars in these 4 referenced libraries are indeed being included in the lib folder in my final war file when it is built and deployed.
Is my assumption about how referenced libraries work wrong, or is there a setting or something to keep referenced library jars from being included in the war file?
Thank you for your time!
Best How To :
I knew there had to be a setting in Eclipse to control exactly what was included in the lib folder and my colleague found this link that led to the answer; I'll post the details below for completeness. However, I should be clear that I'm using MyEclipse Blue 10.7...not just Eclipse. I'm going to edit my original post above stating such. I'm sure there is a similar setting in Eclipse somewhere however.
- Go to Window >> Preferences >> MyEclipse >> Java Enterprise Project >> Web Project
- Go to the Deployment Tab
- Under Library Deployment Policies make sure that "Jars from User Libraries" is unchecked
That's it. Since that setting was checked the jars from my libraries were always being included in my lib folder in my war; in my case that was not the desired behavior.
Thanks to @vanje for getting me thinking with the comment thread above as well.