## Generator Task

The generator task is defined as follows in the build file:

      <taskdef
        name="torque-generator"
        classpathref="ant-classpath"
        classname="org.apache.torque.ant.task.TorqueGeneratorTask"/>

The generator task has the following configuration parameters:

### Attributes

Packaging attributes: They define where the generation unit (also known as "templates") is located.

- packaging: The packaging type of the generation unit, either "directory" , "jar" or "classpath". Default is "directory".
- configDir: The configuration directory of the torque generator. Has no effect if packaging is "classpath".
- configPackage: The configuration package of the generation unit. Has only effect if packaging is "classpath". Hint: If you use the prefined Torque Templates the package is `org.apache.torque.templates.om`.
- jarFile: The filename of the jar file of the generation unit. Has only effect if packaging is "jar".
- overrideConfigDir: The config directory of the project overriding the defined generation unit. If set, the settings of this directory are used as child and the "normal" settings are used as parent. See the generator reference for details.
- projectRootDir: The root directory of the project. Has no effect if packaging is "classpath". Default is ".".

Source attributes: They define which sources are read.

- sourceDir: The directory where the source files reside.
- sourceIncludes: Include patterns for the source files. If set, the include and exclude patterns from the templates are overridden. If not set, then the include patterns from the templates are used. The patterns are case sensitive, wildcards are * and ?.
- sourceExcludes: Exclude patterns for the source files. If set, the include and exclude patterns from the templates are overridden. If not set, then the include patterns from the templates are used. The patterns are case sensitive, wildcards are * and ?.

Target attributes: They define where the target files are created.

- defaultOutputDir: The target directory for files which are generated each time anew. Default is "./generated-sources".
- outputDirMap: The mapping from outputDirKey to output directories. The outputDirKeys are defined in the templates you use. Default is modifiable -> "./src/main/generated-java"

Other attributes:

- loglevel: The Loglevel to use in the generation process. Must be one of trace, debug, info, warn or error. If not set, the log level defined in the generation unit is used.