title: Generate DDL for JPA 2.0 with EclipseLink
body: <p>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.</p>
  
  <p>Now, how do I generate the schema DDL for the database ?</p>
  
  <p>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 <a href="http://jandrewthompson.blogspot.com/2009/10/how-to-generate-ddl-scripts-from.html" rel="noreferrer">this guy did for Hibernate</a>, I want for EclipseLink.</p>
  
  <p>I'd also settle for an Ant task or some plugin for Maven.</p>
  
  <p>Also, I chose to name my file <em>jpa.xml</em> instead of <em>persistence.xml</em>; bonus points if your solution accounts for this as well. Otherwise, I'll just rename my file persistence.xml.</p>