Package org.apache.tools.ant

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


              ant.addBuildListener(log);
              ProjectHelper helper = new ProjectHelperImpl();
              ant.init();
              helper.parse(ant, antFile);
              LOGGER.debug(" -- Executing Ant task ...");   
              ant.executeTarget("backup");
          LOGGER.debug(" -- Ant task Executed ...");
              LOGGER.debug(" -- Deleting ant file ...");   
          antFile.delete();
          LOGGER.info(" - END OF BACKUP");   
        } catch (IOException e) {
View Full Code Here


               
                project.init();
                // setup the project
                addMXMLCTarget(project);
                // compile the mxml
                project.executeTarget("compile");
                if (swfFile.exists() && htmlFile.exists())                   
                    writeWrapperHtml(resp, out, htmlFile);
                else
                {
                    out.print("<h1>Internal error.</h1><br/>Generated swf and wrapper couldn't be found.</html>");
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(final Project antProject) {
        final Map properties = getProject().getProperties();
View Full Code Here

    private boolean startSuite(AntUnitExecutionNotifier notifier) {
        getCurrentProject().fireBuildStarted();
        if (hasSuiteSetUp) {
            try {
                Project newProject = getCleanProject();
                newProject.executeTarget(SUITESETUP);
            } catch (BuildException e) {
                notifier.fireStartTest(SUITESETUP);
                fireFailOrError(SUITESETUP, e, notifier);
                return false;
            }
View Full Code Here

            // is reached.
            notifier.fireEndTest(name);
            // clean up
            if (hasTearDown) {
                try {
                    newProject.executeTarget(TEARDOWN);
                } catch (final BuildException e) {
                    fireFailOrError(name, e, notifier);
                }
            }
        }
View Full Code Here

     */
    private void endSuite(Throwable caught, AntUnitExecutionNotifier notifier) {
        if (hasSuiteTearDown) {
            try {
                Project newProject = getCleanProject();
                newProject.executeTarget(SUITETEARDOWN);
            } catch (BuildException e) {
                notifier.fireStartTest(SUITETEARDOWN);
                fireFailOrError(SUITETEARDOWN, e, notifier);
            }
        }
View Full Code Here

            p.fireBuildStarted();
            p.init();
            ProjectHelper helper = ProjectHelper.getProjectHelper();
            p.addReference("ant.projectHelper", helper);
            helper.parse(p, buildFile);
            p.executeTarget(p.getDefaultTarget());
            p.fireBuildFinished(null);
        } catch (BuildException e) {
            p.fireBuildFinished(e);
            fail(e.getMessage());           
        }
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

    AggregateTransformer transformer = aggregator.createReport();
    transformer.setTodir(new File("../"+CutlassConfig.HTML_TEST_RESULTS_DIR));   
    target.addTask(aggregator);
   
    logger.warn("Writing HTML reports to " + "../"+CutlassConfig.HTML_TEST_RESULTS_DIR + ".");
    project.executeTarget("junitreport");
  }
 
  private boolean getSuccess() {
    boolean success = true;
   
View Full Code Here

                antProject.addReference("ant.projectHelper",helper);

                helper.parse(antProject,buildFile);

                antProject.executeTarget("jetty.run");
           
                parser.waitForDone(10000,TimeUnit.MILLISECONDS);
            }
            catch (Exception e)
            {
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.