torque:datasql

Full name:

org.apache.torque:torque-maven-plugin:3.3.1-SNAPSHOT:datasql

Description:

Generates SQL for populating the database from data.xml files.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
dataDtd String - The data dtd file for the data xml file to process.
dataXmlFile String - The data Xml file to process.
schemaDir String - The path to the directory where the schema files are located in.
schemaIncludes String - The schema files which should be included in generation (in ant-style notation).
targetDatabase String - The database type (e.g. mysql, oracle, ...) for the generated persistence classes,

Optional Parameters

Name Type Since Description
outputDir String - The directory in which the sql will be generated.
reportFile String - The location where the sql file will be generated.
contextPropertiesPath String - The location where the context property file for velocity will be generated.
schemaExcludes String - The schema files which should be excluded in generation (in ant-style notation).
runOnlyOnSchemaChange boolean - Determines if this task should run only if the schema has changed.
sqlDbMap String - The path to the properties file containing the mapping sql file -> target database.
targetPackage String - The target package for the generated classes.
templatePath String - The base path where the templates are read from, if they are not read from the classpath.
useClasspath boolean - Whether the templates should be loaded from the classpath.
userContextProperties Map - A map where all user-defined context properties can be set. Overrides all other mojo configuration settings which are mapped to context properties.

Parameter Details

dataDtd:

The data dtd file for the data xml file to process.
  • Type: java.lang.String
  • Required: Yes

dataXmlFile:

The data Xml file to process.
  • Type: java.lang.String
  • Required: Yes

outputDir:

The directory in which the sql will be generated.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/generated-sql/torque

reportFile:

The location where the sql file will be generated.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.artifact.artifactId}-data.sql

contextPropertiesPath:

The location where the context property file for velocity will be generated.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/torque/context.datasql.properties

schemaExcludes:

The schema files which should be excluded in generation (in ant-style notation).
  • Type: java.lang.String
  • Required: No
  • Expression: id-table-schema.xml

runOnlyOnSchemaChange:

Determines if this task should run only if the schema has changed.
  • Type: boolean
  • Required: No
  • Expression: true

schemaDir:

The path to the directory where the schema files are located in.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${basedir}/src/main/torque/schema

schemaIncludes:

The schema files which should be included in generation (in ant-style notation).
  • Type: java.lang.String
  • Required: Yes
  • Expression: *schema.xml

sqlDbMap:

The path to the properties file containing the mapping sql file -> target database.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/torque/sqldbmap.properties

targetDatabase:

The database type (e.g. mysql, oracle, ...) for the generated persistence classes,
  • Type: java.lang.String
  • Required: Yes

targetPackage:

The target package for the generated classes.
  • Type: java.lang.String
  • Required: No
  • Expression: torque.generated

templatePath:

The base path where the templates are read from, if they are not read from the classpath.
  • Type: java.lang.String
  • Required: No
  • Expression: ${basedir}/src/main/torque/templates

useClasspath:

Whether the templates should be loaded from the classpath.
  • Type: boolean
  • Required: No
  • Expression: true

userContextProperties:

A map where all user-defined context properties can be set. Overrides all other mojo configuration settings which are mapped to context properties.
  • Type: java.util.Map
  • Required: No