hibernate4-ddl:gen-ddl
Full name:
de.jpdigital:hibernate4-ddl-maven-plugin:1.0.0-SNAPSHOT:gen-ddl
Description:
Goal which creates DDL SQL files for the JPA entities in the
project (using the Hibernate 4 SchemaExport class}.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope: compile+runtime.
- The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase: process-classes.
Required Parameters
Name |
Type |
Since |
Description |
dialects |
String[] |
- |
Database dialects for which create scripts shall be generated. For
available dialects refer to the documentation the
Dialect enumeration.
|
outputDirectory |
File |
- |
Location of the output file. Default value is: ${project.build.directory}/generated-resources/sql/ddl/auto. User property is: outputDir. |
packages |
String[] |
- |
Packages containing the entity files for which the SQL DDL scripts
shall be generated.
|
Optional Parameters
Name |
Type |
Since |
Description |
createDropStatments |
boolean |
- |
Set this to true to include drop statements into the
generated DDL file.
|
persistenceXml |
File |
- |
The persistence.xml file to use to read properties
etc. Default value is
src/main/resources/META-INF/persistence.xml. If the
file is not present it is ignored. If the file is present all
properties set using a <property> element are
set on the Hibernate configuration. Default value is: ${basedir}/src/main/resources/META-INF/persistence.xml.
|
useEnvers |
boolean |
- |
Set this to true if you use the Envers feature of
Hibernate. When set to true the
SchemaExport implementation for Envers is used. This
is necessary to create the additional tables required by Envers.
Default value is false.
|
Parameter Details
createDropStatments:
Set this to true to include drop statements into the
generated DDL file.
- Type: boolean
- Required: No
dialects:
Database dialects for which create scripts shall be generated. For
available dialects refer to the documentation the
Dialect enumeration.
- Type: java.lang.String[]
- Required: Yes
outputDirectory:
Location of the output file.
- Type: java.io.File
- Required: Yes
- User Property: outputDir
- Default: ${project.build.directory}/generated-resources/sql/ddl/auto
packages:
Packages containing the entity files for which the SQL DDL scripts
shall be generated.
- Type: java.lang.String[]
- Required: Yes
persistenceXml:
The persistence.xml file to use to read properties
etc. Default value is
src/main/resources/META-INF/persistence.xml. If the
file is not present it is ignored. If the file is present all
properties set using a <property> element are
set on the Hibernate configuration.
- Type: java.io.File
- Required: No
- Default: ${basedir}/src/main/resources/META-INF/persistence.xml
useEnvers:
Set this to true if you use the Envers feature of
Hibernate. When set to true the
SchemaExport implementation for Envers is used. This
is necessary to create the additional tables required by Envers.
Default value is false.
- Type: boolean
- Required: No