I have a maven-built CDI-based Java SE app, which has a core module, and other modules.
Core has the persistence.xml
and some entities.
Modules hav
I have a similar problem and solved it with Hibernate's Integrator SPI:
@Override
public void integrate(Configuration configuration,
SessionFactoryImplementor sessionFactory,
SessionFactoryServiceRegistry serviceRegistry) {
configuration.addAnnotatedClass(MyEntity.class);
configuration.buildMappings();
}
The Integrator is provided as Java service.