I want to divide my web application into some module jars(as my project is so large, and want to make deployment easier), each module jar contains the module spec entities. As in a WAR, i want these module jars use the root /WEB-INF/classes/persistence.xml, but after my tries, i am failed.
at first, the problem is that JPA does not load these entities in module jars(sitted in /WEB-INF/lib directory), one solution is to add all entity classes in the /WEB-INF/classes/persistence.xml by declaring "class" element. but i just want not to edit these fussy elements in deployment time, so this solution is not suit for me.
is there any solutions that i can just put a module jar into /WEB-INF/lib directory, and dont need to edit the root persistence.xml