Package org.apache.tools.ant.helper

Examples of org.apache.tools.ant.helper.AntXMLContext


            }
        }
    }

    private BundleTask findBundleTask(BundleAntProject project) {
        AntXMLContext antParsingContext = (AntXMLContext) project.getReference("ant.parsing.context");
        Vector targets = antParsingContext.getTargets();
        for (Object targetObj : targets) {
            Target target = (Target) targetObj;
            Task[] tasks = target.getTasks();
            for (Task task : tasks) {
                if ("rhq:bundle".equals(task.getTaskName())) {
View Full Code Here


        ProjectHelper2 projectHelper = new ProjectHelper2();
        try {
            // Use the 3-param version of parse(), rather than the 2-param version, or ProjectHelper.configureProject(),
            // to avoid actually executing the implicit target (which would cause the rhq:bundle task to be executed).
            AntXMLContext context = (AntXMLContext) project.getReference(REFID_CONTEXT);
            projectHelper.parse(project, buildFile, new ProjectHelper2.RootHandler(context,
                new ProjectHelper2.MainHandler()));
        } catch (BuildException e) {
            throw new InvalidBuildFileException("Failed to parse bundle Ant build file.", e);
        }
View Full Code Here

        project.setCoreLoader(classLoader);
        project.init();
        project.setBaseDir(buildFile.getParentFile());

        AntXMLContext context = new AntXMLContext(project);
        context.setCurrentTargets(new HashMap());

        project.addReference(REFID_CONTEXT, context);
        project.addReference(ProjectHelper2.REFID_TARGETS, context.getTargets());
        return project;
    }
View Full Code Here

        }
        return taskDefProps;
    }

    private void validateAndPreprocess(BundleAntProject project) throws InvalidBuildFileException {
        AntXMLContext antParsingContext = (AntXMLContext) project.getReference("ant.parsing.context");
        Vector targets = antParsingContext.getTargets();
        int bundleTaskCount = 0;
        Task unconfiguredBundleTask = null;
        for (Object targetObj : targets) {
            Target target = (Target) targetObj;
            Task[] tasks = target.getTasks();
View Full Code Here

         * if set using -inputhandler switch.
         */
        //this.project.setInputHandler(new DefaultInputHandler());

        collectorTarget = owningTarget;
        antXmlContext = new AntXMLContext(project);
        collectorTarget.setProject(project);
        antXmlContext.setCurrentTarget(collectorTarget);
        antXmlContext.setLocator(new AntBuilderLocator());
        antXmlContext.setCurrentTargets(new HashMap());

View Full Code Here

        this.project = project;

        this.project.setInputHandler(new DefaultInputHandler());

        collectorTarget = owningTarget;
        antXmlContext = new AntXMLContext(project);
        collectorTarget.setProject(project);
        antXmlContext.setCurrentTarget(collectorTarget);
        antXmlContext.setLocator(new AntBuilderLocator());
        antXmlContext.setCurrentTargets(new HashMap());
       
View Full Code Here

         * if set using -inputhandler switch.
         */
        //this.project.setInputHandler(new DefaultInputHandler());

        collectorTarget = owningTarget;
        antXmlContext = new AntXMLContext(project);
        collectorTarget.setProject(project);
        antXmlContext.setCurrentTarget(collectorTarget);
        antXmlContext.setLocator(new AntBuilderLocator());
        antXmlContext.setCurrentTargets(new HashMap<String, Target>());

View Full Code Here

         * if set using -inputhandler switch.
         */
        //this.project.setInputHandler(new DefaultInputHandler());

        collectorTarget = owningTarget;
        antXmlContext = new AntXMLContext(project);
        collectorTarget.setProject(project);
        antXmlContext.setCurrentTarget(collectorTarget);
        antXmlContext.setLocator(new AntBuilderLocator());
        antXmlContext.setCurrentTargets(new HashMap());

View Full Code Here

TOP

Related Classes of org.apache.tools.ant.helper.AntXMLContext

Copyright © 2018 www.massapicom. 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.