hibernate4:export
Full name:
de.juplo:hibernate4-maven-plugin:1.1.1:export
Description:
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope: runtime.
- The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase: process-classes.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
delimiter | String | 1.0 | Delimiter in output-file. Default value is: ;. User property is: hibernate.export.schema.delimiter. |
driverClassName | String | 1.0 | SQL-Driver name. User property is: hibernate.connection.driver_class. |
envers | boolean | 1.0.3 | Generate envers schema for auditing tables. Default value is: true. User property is: hibernate.export.envers. |
force | boolean | 1.0 | Force execution
Force execution, even if no modified or newly added annotated classes where found and the dialect was not changed. skip takes precedence over force. Default value is: false. User property is: hibernate.export.force. |
format | boolean | 1.0 | Format output-file. Default value is: true. User property is: hibernate.export.schema.format. |
hibernateConfig | String | 1.1.0 | Path to Hibernate configuration file (.cfg.xml). Settings in this
file will overwrite settings in the properties file. If this
parameter is not set the plugin will try to load the configuration
from a file hibernate.cfg.xml on the classpath. The
test-classpath takes precedence. |
hibernateDialect | String | 1.0 | Hibernate dialect. User property is: hibernate.dialect. |
hibernateMapping | String | 1.0.2 | List of Hibernate-Mapping-Files (XML). Multiple files can be
separated with white-spaces and/or commas. User property is: hibernate.mapping. |
hibernateNamingStrategy | String | 1.0.2 | Hibernate Naming Strategy User property is: hibernate.ejb.naming_strategy. |
hibernateProperties | String | 1.0 | Path to Hibernate properties file. If this parameter is not set the
plugin will try to load the configuration from a file
hibernate.properties on the classpath. The
test-classpath takes precedence. |
outputDirectory | String | 1.0 | Classes-Directory to scan.
This parameter defaults to the maven build-output-directory for classes. Additionally, all dependencies are scanned for annotated classes. User property is: project.build.outputDirectory. |
outputFile | String | 1.0 | Output file. Default value is: ${project.build.directory}/schema.sql. User property is: hibernate.export.schema.filename. |
password | String | 1.0 | Database password User property is: hibernate.connection.password. |
persistenceUnit | String | 1.1.0 | Name of the persistence-unit. If there is only one persistence-unit
available, that unit will be used automatically. Settings in this
file will overwrite settings in the properties or the configuration
file. |
scanDependencies | String | 1.0.3 | Dependency-Scopes, that should be scanned for annotated classes.
By default, only dependencies in the scope compile are scanned for annotated classes. Multiple scopes can be seperated by white space or commas. If you do not want any dependencies to be scanned for annotated classes, set this parameter to none. The plugin does not scan for annotated classes in transitive dependencies. If some of your annotated classes are hidden in a transitive dependency, you can simply add that dependency explicitly. Default value is: compile. User property is: hibernate.export.scan_dependencies. |
scanTestClasses | boolean | 1.0.1 | Whether to scan test-classes too, or not.
If this parameter is set to true the test-classes of the artifact will be scanned for hibernate-annotated classes additionally. Default value is: false. User property is: hibernate.export.scan_testclasses. |
skip | boolean | 1.0 | Skip execution
If set to true, the execution is skipped. A skipped execution is signaled via the maven-property ${hibernate.export.skipped}. The execution is skipped automatically, if no modified or newly added annotated classes are found and the dialect was not changed. Default value is: ${maven.test.skip}. User property is: hibernate.skip. |
target | String | 1.0 | Target of execution:
Default value is: EXPORT. User property is: hibernate.export.target. |
testOutputDirectory | String | 1.0.2 | Test-Classes-Directory to scan.
This parameter defaults to the maven build-output-directory for test-classes. This parameter is only used, when scanTestClasses is set to true! User property is: project.build.testOutputDirectory. |
type | String | 1.0 | Type of execution.
Default value is: BOTH. User property is: hibernate.export.type. |
url | String | 1.0 | Database URL. User property is: hibernate.connection.url. |
username | String | 1.0 | Database username User property is: hibernate.connection.username. |
Parameter Details
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.export.schema.delimiter
- Default: ;
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.connection.driver_class
- Type: boolean
- Since: 1.0.3
- Required: No
- User Property: hibernate.export.envers
- Default: true
Force execution, even if no modified or newly added annotated classes where found and the dialect was not changed.
skip takes precedence over force.
- Type: boolean
- Since: 1.0
- Required: No
- User Property: hibernate.export.force
- Default: false
- Type: boolean
- Since: 1.0
- Required: No
- User Property: hibernate.export.schema.format
- Default: true
- Type: java.lang.String
- Since: 1.1.0
- Required: No
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.dialect
- Type: java.lang.String
- Since: 1.0.2
- Required: No
- User Property: hibernate.mapping
- Type: java.lang.String
- Since: 1.0.2
- Required: No
- User Property: hibernate.ejb.naming_strategy
- Type: java.lang.String
- Since: 1.0
- Required: No
This parameter defaults to the maven build-output-directory for classes. Additionally, all dependencies are scanned for annotated classes.
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: project.build.outputDirectory
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.export.schema.filename
- Default: ${project.build.directory}/schema.sql
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.connection.password
- Type: java.lang.String
- Since: 1.1.0
- Required: No
By default, only dependencies in the scope compile are scanned for annotated classes. Multiple scopes can be seperated by white space or commas.
If you do not want any dependencies to be scanned for annotated classes, set this parameter to none.
The plugin does not scan for annotated classes in transitive dependencies. If some of your annotated classes are hidden in a transitive dependency, you can simply add that dependency explicitly.
- Type: java.lang.String
- Since: 1.0.3
- Required: No
- User Property: hibernate.export.scan_dependencies
- Default: compile
If this parameter is set to true the test-classes of the artifact will be scanned for hibernate-annotated classes additionally.
- Type: boolean
- Since: 1.0.1
- Required: No
- User Property: hibernate.export.scan_testclasses
- Default: false
skip:
If set to true, the execution is skipped.
A skipped execution is signaled via the maven-property ${hibernate.export.skipped}.
The execution is skipped automatically, if no modified or newly added annotated classes are found and the dialect was not changed.
- Type: boolean
- Since: 1.0
- Required: No
- User Property: hibernate.skip
- Default: ${maven.test.skip}
- NONE only export schema to SQL-script (forces execution, signals skip)
- EXPORT create database (DEFAULT!). forces execution, signals skip)
- SCRIPT export schema to SQL-script and print it to STDOUT
- BOTH
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.export.target
- Default: EXPORT
This parameter defaults to the maven build-output-directory for test-classes.
This parameter is only used, when scanTestClasses is set to true!
- Type: java.lang.String
- Since: 1.0.2
- Required: No
- User Property: project.build.testOutputDirectory
type:
- NONE do nothing - just validate the configuration
- CREATE create database-schema
- DROP drop database-schema
- BOTH (DEFAULT!)
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.export.type
- Default: BOTH
url:
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.connection.url
- Type: java.lang.String
- Since: 1.0
- Required: No
- User Property: hibernate.connection.username