I have created two separate projects in Eclipse.
The first project is JPA and the second JSF.
The problem I’m facing is how to access JPA’s DAO classes from JSF Bean while still keeping these projects separate.
I was reading about using Ant but I could not find an example that reflects my problem.
I’m using JPA EclipseLink 2.1 with GlassFish Server 3.1 and JSF 2.0
Thanks a lot
Rightclick the JSF project, go to Deployment Assembly property and add the JPA project in there. This way it transparently ends up as JAR in
/WEB-INF/libof the built WAR.Note that you should not fiddle with the Build Path property as others may suggest. This way it won’t end up as JAR in the
/WEB-INF/libof the built WAR at all. It would make the JPA project a compile time dependency only.