Generate DDL for JPA 2.0 with EclipseLink
I've created my model classes with JPA 2.0 annotations. At runtime, I will use EclipseLink 2.2.0, but I've been careful to use only pure JPA annotations in my model classes. Now, how do I generate the schema DDL for the database ? I want to use the EclipseLink API to generate the DDL from the classes, but not at runtime. Instead, I want a Java class to run on the command line and which outputs the DDL. What this guy did for Hibernate , I want for EclipseLink. I'd also settle for an Ant task or some plugin for Maven. Also, I chose to name my file jpa.xml instead of persistence.xml ; bonus