How to export your database schema with Hibernate3 and Ant
There is a lot of old information floating around on the net. Currently the correct way to export your database schema with Hibernate3 and Ant is using Hibernate-Tools.
The according Ant-task is
org.hibernate.tool.ant.HibernateToolTask (documentation is here). It is contained in
The resulting section in
build.xml should look like this:
Unfortunately most of the documantation of Hibernate-Tools seems to imply that it is "just" an eclipse-plugin. The truth is, the ant-tasks are completely usable on their own.
org.hibernate.tool.hbm2ddl.SchemaExportTask seems to be depreciated. Even though it is still contained in
See also this page.