I try to generate database schema according to:
https://stackoverflow.com/a/17844417/9608756
but eclipse doesn't recognize class EnversSchemaGenerator
. There is no automatic import for this class and can't see it in my jars.
This is script:
Configuration config = new Configuration();
config.setProperty("hibernate.dialect","org.hibernate.dialect.H2Dialect");
config.addAnnotatedClass(MyClass.class);
SchemaExport export = new EnversSchemaGenerator(config).export(); // ERROR!
This is pom.xml:
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.3.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.4.3.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-envers -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>5.4.3.Final</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>