Examples of UnitDescriptor


Examples of org.apache.torque.generator.configuration.UnitDescriptor

                 null,
                 new File("target/generateOmClassesFromJava/default"));
         projectPaths.setOutputDirectory(
                 Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generateOmClassesFromJava/modifiable"));
         UnitDescriptor unitDescriptor = new UnitDescriptor(
                 UnitDescriptor.Packaging.CLASSPATH,
                 projectPaths,
                 new DefaultTorqueGeneratorPaths());
         unitDescriptor.setOverrideOptions(
                 new MapOptionsConfiguration(overrideOptions));
         unitDescriptors.add(unitDescriptor);

         controller.run(unitDescriptors);
         assertTrue(
View Full Code Here

Examples of org.apache.torque.generator.configuration.UnitDescriptor

        SourceProvider sourceProvider
                = new FileSourceProvider(
                        null,
                        sourceFileset,
                        null);
        UnitDescriptor unitDescriptor = new UnitDescriptor(
                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);
View Full Code Here

Examples of org.apache.torque.generator.configuration.UnitDescriptor

        projectPaths.setConfigurationDir(
                new File("src/main/resources/org/apache/torque/templates/jdbc2schema"));
        projectPaths.setOutputDirectory(
                null,
                new File("target/generated-schema"));
        UnitDescriptor unitDescriptor = new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        controller.run(unitDescriptors);
View Full Code Here

Examples of org.apache.torque.generator.configuration.UnitDescriptor

    {
        File target = new File("target");
        FileUtils.deleteDirectory(target);
        Controller controller = new Controller();
        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                new Maven2DirectoryProjectPaths(
                        new File(".")),
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
View Full Code Here

Examples of org.apache.torque.generator.configuration.UnitDescriptor

        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
        CustomProjectPaths projectPaths = new CustomProjectPaths(
                new Maven2DirectoryProjectPaths(
                        new File("src/test/site/gettingStarted")));
        projectPaths.setOutputDirectory(null, targetDir);
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
        assertTrue(targetDir.exists());
View Full Code Here

Examples of org.apache.torque.generator.configuration.UnitDescriptor

        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
        CustomProjectPaths projectPaths = new CustomProjectPaths(
                new Maven2DirectoryProjectPaths(
                        new File("src/test/otherTemplateLanguages")));
        projectPaths.setOutputDirectory(null, TARGET_DIR);
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
        // TODO: check outcome against reference file
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.