hibernate4-maven-plugin

A Maven plugin create DDLs via the Hibernate schema generator.

hbm2ddl

Only DDL generation via JPA is currently supported.

<plugin>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>hibernate4-maven-plugin</artifactId>
  <version>0.2.0</version>
  <executions>
    <execution>
      <id>export</id>
      <goals>
        <goal>hbm2ddl</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <unitName>jpa-unitname</unitName>
  </configuration>
</plugin>

Naming Strategy

If you want to add a naming strategy, use the namingStrategy property like this:

<plugin>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>hibernate4-maven-plugin</artifactId>
  <version>0.2.0</version>
  <executions>
    <execution>
      <id>export</id>
      <goals>
        <goal>hbm2ddl</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <unitName>jpa-unitname</unitName>
    <namingStrategy>org.hibernate.cfg.ImprovedNamingStrategy</namingStrategy>
  </configuration>
</plugin>