Package org.apache.tools.ant

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


        }
       
        // Execute task
        Message.verbose("performing packager resolver build in " + this.dir);
        try {
            project.executeTarget("build");
            this.built = true;
        } catch (BuildException e) {
            e.printStackTrace(System.out);
            Message.verbose("packager resolver build failed: " + e);
            throw e;
View Full Code Here

            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

                target = theProject.getDefaultTarget();
            }
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("executing target "+target+" with log priority level "+myPriorityLevel);
            }
            theProject.executeTarget(target);
            theProject.fireBuildFinished(mySAXException);
        } catch (Exception e) {
            getLogger().error(e.getMessage(), e);
            while (!myStack.isEmpty()) {
                String tag = (String) myStack.pop();
View Full Code Here

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

        }
       
        // Execute task
        Message.verbose("performing packager resolver build in " + this.dir);
        try {
            project.executeTarget("build");
            this.built = true;
        } catch (BuildException e) {
            e.printStackTrace(System.out);
            Message.verbose("packager resolver build failed: " + e);
            throw e;
View Full Code Here

        //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

            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

        }
        AbstractCloverMojo.registerCloverAntTasks(antProject, getLog());
        ProjectHelper.configureProject(antProject, reportDescriptor);
        antProject.setBaseDir(project.getBasedir());
        String target = isHistoricalDirectoryValid(output) && (historyOut != null) ? "historical" : "current";
        antProject.executeTarget(target);
    }

    private void addMavenProperties(Project antProject) {
        final Map properties = getProject().getProperties();
View Full Code Here

    final Project project = new Project();
    System.out.println("task: " + task);
    try {
      project.init();
      ProjectHelper.getProjectHelper().parse(project, new File(file));
      project.executeTarget(task);
    } catch (final Exception e) {
      return e.getMessage();
    }
    return "OK";
  }
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.