19 Mart 2008 Çarşamba

Schema Export with Ant

After some difficulties I have run schema export with ant. We use a separate propeties file with the same content as the jdbc.properties file that is used in connecting applications to the DB, in order to run the schema export task. Actually schemaexport also have "properties" attribute but it throws an exception like this.

[schemaexport] java.lang.UnsupportedOperationException: The user must supply a JDBC connection
[schemaexport] at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:30)
[schemaexport] at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:28)

hibernate.cfg.xml





build.xml





You can download here working copy of our sample project.