title: Generate an SQL DB creation script with Hibernate 4
body: <p>We are currently using Hibernate 3 and we use Hibernate Tools to generate SQL scripts for the DB schema.</p>
  
  <p>We use the following Ant task</p>
  
  <pre><code>&lt;hibernatetool destdir="${target}"&gt;
      &lt;jpaconfiguration persistenceunit="@{persistenceUnit}" propertyfile="@{propertyfile}"/&gt;
      &lt;classpath refid="@{classpathid}"/&gt;
      &lt;!-- the file name is relative to $destdir --&gt;
      &lt;hbm2ddl outputfilename="@{output}" format="true" export="false" drop="false"/&gt;
  &lt;/hibernatetool&gt;
  </code></pre>
  
  <p>We would like to switch to Hibernate 4: how can we achieve something similar without Hibernate tools?</p>