Devskiller / jpa2ddl

JPA Schema Generator Plugin
Apache License 2.0
110 stars 33 forks source link

Maven multi-module project with Hibernate classes in multiple modules #52

Open rpsandiford opened 2 years ago

rpsandiford commented 2 years ago

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.