title: Generate DDL script at MAVEN build with Hibernate4 / JPA 2.1
body: <p>It seems like the <code>hibernate3-maven-plugin</code> used to generate DDL create/drop scripts is not compatible any more with <code>Hibernate 4.3</code> and newer versions (using <code>JPA 2.1</code>).</p>
  
  <p>I use this plugin configuration :</p>
  
  <pre><code>            &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate3-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generate-sql-schema&lt;/id&gt;
                          &lt;phase&gt;process-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;hbm2ddl&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;hibernatetool&gt;
                                  &lt;jpaconfiguration persistenceunit="${persistenceUnitName}" /&gt;
                                  &lt;hbm2ddl update="true" create="true" export="false"
                                      outputfilename="src/main/sql/schema.sql" format="true"
                                      console="true" /&gt;
                              &lt;/hibernatetool&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>But I get the following error :</p>
  
  <pre><code>[ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:3.0:hbm2ddl (generate-sql-schema) on project my-project: There was an error creating the AntRun task.
  An Ant BuildException has occured: java.lang.NoClassDefFoundError: org/hibernate/util/ReflectHelper: org.hibernate.util.ReflectHelper -&gt; [Help 1]
  </code></pre>
  
  <p>This class as migrated to a new package : <code>org.hibernate.internal.util.ReflectHelper</code></p>
  
  <p>However i found no clear way to keep generating DDL create scripts at MAVEN build.</p>
  
  <p>There is no <code>hibernate4-maven-plugin</code>, or any other official way to do it.</p>
  
  <p>So what ? Isn't it a main feature that should be supported ? How to do it ?</p>