jpa2ddl icon indicating copy to clipboard operation
jpa2ddl copied to clipboard

Maven multi-module project with Hibernate classes in multiple modules

Open rpsandiford opened this issue 3 years ago • 0 comments

HI, I have a multi-module project, several of the modules have Hibernate annotated classes.

How can I configure jpa2ddl to be in the final module, and be aware of the classes from the preceeding modules?

Looking at the method: FileResolver listClassNamesInPackate(String pagkageName) - it replaces all the '.' package name delimiters with the File separator character, so will only look for files in the current module's target folder - i.e. I don't see a way to specify a way for it to find packages in the other modules.

When I try to place jpa2ddl in each of the individual modules, the first module being built works - but the second one fails because it references Hibernate annotated classes defined in the first module.

Each subsequent module has a maven dependency on the previous modules.

Thanks!

Bob.

rpsandiford avatar May 09 '22 15:05 rpsandiford