Examples of executeTarget()


Examples of org.apache.tools.ant.Project.executeTarget()

            if (target == null) {
                target = project.getDefaultTarget();
            }

            project.executeTarget(target);
        } catch (BuildException e) {
            error = e;
            throw new ExecutionException(e);
        } finally {
            project.fireBuildFinished(error);
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

        try {
            project.setCoreLoader(getClass().getClassLoader());
            project.init();
            new ProjectHelper2().parse(project, build_file);
            project.executeTarget(project.getDefaultTarget());
        } catch (BuildException e) {
            throw new RuntimeException("Cannot run ANT on script [" + build_file_str + "]. Cause: " + e, e);
        }
    }
}
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

                project.addTaskDefinition(taskDef.getKey().toString(),
                    Class.forName(taskDef.getValue().toString(), true, classLoader));
            }

            new ProjectHelper2().parse(project, buildFile);
            project.executeTarget(project.getDefaultTarget());

        } catch (Exception e) {
            throw new RuntimeException("Cannot run ANT on script [" + buildFile + "]. Cause: " + e, e);
        } finally {
            if (logFileOutput != null) {
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

                project.addTaskDefinition(taskDef.getKey().toString(), Class.forName(taskDef.getValue().toString(),
                    true, classLoader));
            }

            new ProjectHelper2().parse(project, buildFile);
            project.executeTarget((target == null) ? project.getDefaultTarget() : target);
        } catch (Exception e) {
            throw new RuntimeException("Cannot run ANT on script [" + buildFile + "]. Cause: " + e, e);
        } finally {
            if (logFileOutput != null) {
                logFileOutput.close();
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

                project.addTaskDefinition(taskDef.getKey().toString(), Class.forName(taskDef.getValue().toString(),
                    true, classLoader));
            }

            new ProjectHelper2().parse(project, buildFile);
            project.executeTarget(project.getDefaultTarget());
        } catch (Exception e) {
            throw new RuntimeException("Cannot run Ant on script [" + buildFile + "] - cause: " + e, e);
        } finally {
            if (logFileOutput != null) {
                logFileOutput.close();
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

                    upgrader.setConnection(connection);
                    break;
                }
            }

            project.executeTarget(project.getDefaultTarget());
        } catch (BuildException e) {
            throw new RuntimeException("Cannot run ANT on script [" + upgradeFile + "]. Cause: " + e, e);
        } finally {
            upgradeFile.delete();
        }
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

        ProjectHelper helper = new ProjectHelperImpl();
        File buildPath = new File(baseDir, "build.xml");               
        helper.parse(antProject, buildPath);
                               
        try {
            antProject.executeTarget(platform);           
        } catch(Exception e) {
            if(antProject.getProperty("redirector.err") != null) {
                logger.error("packager-externals-tools-error", antProject.getProperty("redirector.err"));                                   
            }
            throw new BuildException(e.getMessage());
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

        //output the classes into the output dir as well
        javaCompiler.setDestdir(outputLocationFile);
        javaCompiler.setVerbose(true);
        try {
            codeGenProject.executeTarget(COMPILE_TARGET_NAME);
        } catch (BuildException e) {
            fail();
        }

    }
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

            PrintStream err = System.err;
            System.setOut(new PrintStream(new DemuxOutputStream(p, false)));
            System.setErr(new PrintStream(new DemuxOutputStream(p, true)));

            try {
                p.executeTarget("testDemux");
            } finally {
                System.setOut(out);
                System.setErr(err);
            }
        }
View Full Code Here

Examples of org.apache.tools.ant.Project.executeTarget()

    @Before
    public void setUp() {
        buildRule.configureProject("src/etc/testcases/taskdefs/optional/net/ftp.xml");
        Project project = buildRule.getProject();
        project.executeTarget("setup");
        tmpDir = project.getProperty("tmp.dir");
        ftp = new FTPClient();
        ftpFileSep = project.getProperty("ftp.filesep");
        myFTPTask.setSeparator(ftpFileSep);
        myFTPTask.setProject(project);
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.