ObjectDB ObjectDB

Maven and multiple JARs


Perhaps beyond ObjectDB forum, but might be of interest to other ObjectDB users

In a multi-module maven web app project, with various modules dedicated to entity sets, using <jar-file> can be tricky, as the persistence.xml in the dependee modules can't know what jar files will become available "later" in downstream modules.


- Standalone core : CoreEnt, CoreEJB, CoreWeb (want be able to run too).

- Dependent more specific project: SpecEnt, SpecEJB, SpecWeb (downstream).

Just having 2 different persistence.xml (one for CoreEnt and one for SpecEnt) in the final build does not work (they clash giving deployment errors).

Clumsy workaround is to not have 2 persistence.xml, only the "downstream" one in SpecWeb, which may know which <jar-file> to include.

Am also looking into advanced maven usage suggestions (so can still have my executable CoreWeb cake and eat it):





To post on this website please sign in.