Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Last active December 19, 2015 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwelch2344/5995614 to your computer and use it in GitHub Desktop.
Save dwelch2344/5995614 to your computer and use it in GitHub Desktop.
An example of how to have Maven and Hibernate 4 generate your DDL for you... See http://mydevnotes.nicus.it/2013/03/generate-ddl-with-maven-jpa-hibernate-4.html
# stashed in src/main/resources
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy
hibernate.connection.charSet=UTF-8
hibernate.export.schema.delimiter=;
<build>
<plugins>
<plugin>
<groupId>de.juplo</groupId>
<artifactId>hibernate4-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<goals>
<goal>export</goal>
</goals>
</execution>
</executions>
<configuration>
<hibernateProperties>${project.build.directory}/classes/hibernate.hbm2ddl.properties</hibernateProperties>
<target>SCRIPT</target>
</configuration>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment