Posts Tagged ‘tables’

Generating sql database schema with maven2 for hibernate3

July 31st, 2008 3 comments

I’m using maven with hibernate3 plugin to generate the sql code for my database schema/tables. I do so with the following configuration.
Also make sure you declare your driver in the plugin dependencies to be sure the driver can be loaded in the plugin. Otherwise you might get some JDBC exceptions.

Command line example:
mvn clean compile hibernate3:hbm2ddl
				Hibernate 3 Plugin, used for schema creation
				Usage example: mvn clean compile hibernate3:hbm2ddl
						<!-- Create Drop Statements -->					
						<!-- Enable Annotations -->
						<!-- Define Database Properties to Use -->
						<!-- Pretty Format SQL Code -->
						<!-- Create tables automatically? -->
						<!-- Output filename -->