Package org.apache.torque.generator.control

Examples of org.apache.torque.generator.control.Controller.run()


        }
        unitDescriptors.add(unitDescriptor);
        try
        {
            log("Generation started", Project.MSG_DEBUG);
            controller.run(unitDescriptors);
            log("Generation successful", Project.MSG_INFO);
        }
        catch (Exception e)
        {
            log("Error during generation", e, Project.MSG_ERR);
View Full Code Here


        }
        unitDescriptors.add(unitDescriptor);
        try
        {
            getLog().debug("Generation started");
            controller.run(unitDescriptors);
            getLog().info("Generation successful");
        }
        catch (Exception e)
        {
            getLog().error(e);
View Full Code Here

        projectPaths.setOutputDirectory(null, targetDir);
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
        assertTrue(targetDir.exists());
        File generatedJavaFile = new File(
                targetDir,
                "org/apache/torque/generator/example/gettingstarted/PropertyKeys.java");
        assertTrue(generatedJavaFile.exists());
View Full Code Here

                UnitDescriptor.Packaging.JAR,
                new Maven2JarProjectPaths(
                        new File("target/test/propertyToJavaJar"),
                        "propertyToJava.jar"),
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
        assertTrue(target.exists());
    }
}
View Full Code Here

        projectPaths.setOutputDirectory(null, targetDir);
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);

        assertTrue(targetDir.exists());
        File targetFile = new File(targetDir, "output.txt");
        assertTrue(targetFile.exists());
View Full Code Here

        projectPaths.setOutputDirectory(null, targetDir);
        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                projectPaths,
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);

        assertTrue(targetDir.exists());
        File targetFile = new File(targetDir, "output_for_source1.xml");
        assertTrue(targetFile.exists());
        File expectedFile = new File(TEST_RESOURCES_ROOT, "expected1.xml");
View Full Code Here

                 new DefaultTorqueGeneratorPaths());
         unitDescriptor.setOverrideOptions(
                 new MapOptionsConfiguration(overrideOptions));
         unitDescriptors.add(unitDescriptor);

         controller.run(unitDescriptors);
         assertTrue(
                 new File("target/generateOmClassesFromJava/default/org/apache/torque/templates/test/BaseAPeer.java")
                     .exists());
         assertTrue(
                 new File("target/generateOmClassesFromJava/modifiable/org/apache/torque/templates/test/APeer.java")
View Full Code Here

        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        // generate
        controller.run(unitDescriptors);
    }
}
View Full Code Here

                new DefaultTorqueGeneratorPaths());
        unitDescriptor.setOverrideOptions(
                new MapOptionsConfiguration(overrideOptions));
        unitDescriptors.add(unitDescriptor);

        controller.run(unitDescriptors);

        File generatedFile = new File("target/generated-schema/schema.xml");
        assertTrue(generatedFile.exists());
        String result = FileUtils.readFileToString(generatedFile);
        File referenceFile = new File(
View Full Code Here

        unitDescriptors.add(new UnitDescriptor(
                UnitDescriptor.Packaging.DIRECTORY,
                new Maven2DirectoryProjectPaths(
                        new File(".")),
                new DefaultTorqueGeneratorPaths()));
        controller.run(unitDescriptors);
    }
}
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.