Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the "Reverse Engineering" feature in Hibernate5?

I'm upgrading an old project from hibernate3 to hibernate5. The project has a dependency on hbm2java (the so-called reverse engineering tool). In the old project this was executed with mvn hibernate3:hbm2java.

Unfortunately, hbm2java is nowhere to be found in Hibernate5 - not in the code, not in the documentation.

What is the Hibernate5 equivalent of the old hbm2java? Or in case it's no longer supported, what's the closest alternative? I'm willing to get out of Hibernate entirely, if that's what it takes to get out of Hibernate 3.

like image 285
Alex R Avatar asked Jun 11 '17 04:06

Alex R


1 Answers

The latest version of the hibernate-maven-plugin is 4.3.1.

You would get out of hibernate 3 by using hibernate 4.3.1 naturally.

It looks like the hbm2java task exists in the sources of the latest hibernate release: https://github.com/hibernate/hibernate-tools/blob/master/main/src/java/org/hibernate/tool/ant/Hbm2JavaExporterTask.java. That is what your were looking for isn't it? So it should also be possible to build the hibernate5 github project in your local maven repo and then bind the dependencies in your projects pom.

At last add the appropriate task and goal in your execution section.

like image 198
Jan Avatar answered Nov 14 '22 08:11

Jan