another approach if you don't want to check in generated source code, is to treat the generated db sources as a separate module dependency: generate every time the schema changes, build a new jar artifact and then import into your projects as a dependency