Multiple jars, single persistence unit solution?
Some people, including me, have been struggling with merging entities from different modules (jars) into a single persistence unit (especially with JavaSE , for instance here JPA 2.0: Adding entity classes to PersistenceUnit *from different jar* automatically ). Based on the answers there is no easy direct way to do that. One of solutions is to list all classes from all jars in single persistence unit file, but that's not really elegant. I might have accidentally found another way. Generally all my entity classes are mapped using annotations . As for the solution: persistence.xml can include