For the past years I have been working with Java EE 6 and simpler application structures, where only one ejb and one war project were present.
Now we have a more complex project, where I need to have additional modules: - JPA package - client interfaces for an automated tester application
So I have started creating the following projects in eclipse:
Packing the project together, I am facing different problems:
I was trying to solve these problems. I have come up with solutions, but neither of them works. Ex 1.: I have simplified the packing to only the JPA + Client + EAR, but this also gives me the cycle detected error. When I turn the error off, I get the 2nd error.
Ex 2.: Tried to simplify build path dependencies, but no luck.
I have also been thinking of merging the EJB + JPA projects, maybe that will work.
But my question is: using Eclipse for development, what is the desired (project and dependency) structure for an EAR app containing client interfaces, ejbs, jpa entities and a standalone tester app using only the client interfaces?
Thanks for your help!
First of all, for your components you won't need an EAR file, a WAR file is sufficient for Java EE 6 applications (see Java EE 6 tutorial on that topic).
Second, my recommendation is not using the project layout created by the eclipse wizard, but use a maven-based archetype (e.g. Knappsack Archetypes), which will give you an easier and standardized layout.