Introduction
The Torque Maven plugin provides the Maven 2/3 integration of the Torque generator.
The only goal this plugin offers currently is the "generate" goal, which starts the Torque generator. A basic configuration for using pre-defined templates would be
<plugin> <groupId>org.apache.torque</groupId> <artifactId>torque-maven-plugin</artifactId> <version>4.0</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> <configuration> <packaging>classpath</packaging> <configPackage>${templates-config-package}</configPackage> <sourceDir>${source-dir}</sourceDir> ... </configuration> </execution> </executions> <dependencies> <dependency> <groupId>${templates-group-id}</groupId> <artifactId>${templates-artifact-id}</artifactId> <version>${templates-version}</version> </dependency> </dependencies> </plugin>
See the documentation of the template package to get the values for ${templates-config-package}, ${templates-group-id}, ${templates-artifact-id} and ${templates-version}. Set ${source-dir} to the directory where the source files for the generation are located.
See the generate goal documentation for the available configuration parameters.