I was trying below scenario:
1. Create EAR Project
2. Have one Web Project and one EJB project
3. Add Struts capability to the Web Project –> this would copy Struts and its dependent libraries to WEB-INF/lib folder
4. Add Hibernate capability to the EJB Project
5. add/write your class files to the respective projects
6. Now try deploying EAR project to any J2EE server (I used WL 10), you would notice that the resultant EAR file does not have hibernate libraries. though web project is fine because it already has required jar files copied.
7. I looked at the .classpath file under EJB project and noticed that there is some reference of HIBERNATE constant defined in MyEclipse, which is making IDE to compile EJB code but not deploying it when EAR is being deployed.
8. I also tried to do EXPORT to EAR but same issue no Hibernate files.
9. Now if I have go and manually add those jar files then where do I get list of jar files that is defined in HIBNERATE constant. On top do I really have to the manual copy of the jar file.
I think something is missing in the whole process. As I did not mentioned about having a user defined common Java Project as part of EAR deployment because there is already a question pending.
Thanks
Girish