UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideSourceProvider(sourceProvider);
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// sql ddl templates
projectPaths
= new CustomProjectPaths(
new Maven2DirectoryProjectPaths(new File(".")));
projectPaths.setConfigurationDir(
new File("src/main/resources/org/apache/torque/templates/sql"));
projectPaths.setSourceDir(
new File(SCHEMA_DIR));
projectPaths.setOutputDirectory(
null,
new File("target/generated-sql"));
projectPaths.setOutputDirectory(
Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
new File("target/generated-sql-2"));
unitDescriptor = new UnitDescriptor(
UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// sql createdb templates
projectPaths
= new CustomProjectPaths(
new Maven2DirectoryProjectPaths(new File(".")));
projectPaths.setConfigurationDir(
new File("src/main/resources/org/apache/torque/templates/sql/createdb"));
projectPaths.setSourceDir(
new File(SCHEMA_DIR));
projectPaths.setOutputDirectory(
null,
new File("target/generated-sql"));
projectPaths.setOutputDirectory(
Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
new File("target/generated-sql-2"));
unitDescriptor = new UnitDescriptor(
UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// idbroker-init-sql templates
projectPaths
= new CustomProjectPaths(
new Maven2DirectoryProjectPaths(new File(".")));
projectPaths.setConfigurationDir(
new File("src/main/resources/org/apache/torque/templates/idtable"));
projectPaths.setSourceDir(
new File(SCHEMA_DIR));
projectPaths.setOutputDirectory(
null,
new File("target/generated-sql"));
projectPaths.setOutputDirectory(
Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
new File("target/generated-sql-2"));
unitDescriptor = new UnitDescriptor(
UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// html doc templates
projectPaths = new CustomProjectPaths(
new Maven2DirectoryProjectPaths(new File(".")));
projectPaths.setConfigurationDir(
new File("src/main/resources/org/apache/torque/templates/doc/html"));
projectPaths.setSourceDir(
new File(SCHEMA_DIR));
projectPaths.setOutputDirectory(
null,
new File("target/generated-docs"));
projectPaths.setOutputDirectory(
Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
new File("target/generated-docs-2"));
unitDescriptor = new UnitDescriptor(
UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// xdoc doc templates
projectPaths = new CustomProjectPaths(
new Maven2DirectoryProjectPaths(new File(".")));
projectPaths.setConfigurationDir(
new File("src/main/resources/org/apache/torque/templates/doc/xdoc"));
projectPaths.setSourceDir(
new File(SCHEMA_DIR));
projectPaths.setOutputDirectory(
null,
new File("target/generated-xdocs"));
projectPaths.setOutputDirectory(
Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
new File("target/generated-xdocs-2"));
unitDescriptor = new UnitDescriptor(
UnitDescriptor.Packaging.DIRECTORY,
projectPaths,
new DefaultTorqueGeneratorPaths());
unitDescriptor.setOverrideOptions(
new MapOptionsConfiguration(overrideOptions));
unitDescriptors.add(unitDescriptor);
// generate
controller.run(unitDescriptors);
}