and adding envers into org.hibernate module, means there will no org.hibernate.envers
module, and a (jpa) app's classloader can access org.hibernate module, right? so it
can access envers class too.
Wrong, just adding envers to org.hibernate (either via a module
dependency or the jar directly) doesn't result in envers being exported
from the org.hibernate module. There is an option to do that, if so
desired (via the export="true"). The better option is knowing whether
or not it is needed and dynamically injecting envers only if it is.
From what you previously said, I think the dependencies are:
- Application classes may reference the envers annotation.
- Application classes may reference Hibernate classes.
- Hibernate core may reference envers.
- Hibernate envers may reference Hibernate core.
Sound right so far?