I have maven project and I want to generate DDL from existing entities.
How can I do that?
Is there any maven plugin that I can generate the DDL?
I
openjpa-maven-plugin plugin provides a goal sql
. Using this goal, it is possible to create the DDL from existing entities.
org.apache.openjpa
openjpa-maven-plugin
2.2.0
**/entity/ *.class
true
com.ibm.db2.jcc.DB2Driver
true
${basedir}/src/main/resources/META-INF/persistence.xml
${skip.jpa}
${basedir}/src/main/resources/database.sql
org.apache.openjpa
openjpa
2.1.1
org.slf4j
slf4j-api
1.6.6
org.slf4j
slf4j-simple
1.6.6
org.apache.openjpa
openjpa-maven-plugin
sql
generate-resources
sql