Package org.apache.tools.ant

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


                    }
                } else if (key.equals("id")) {
                    if (value != null) {
                        // What's the difference between id and name ?
                        if (!context.isIgnoringProjectTag()) {
                            project.addReference(value, project);
                        }
                    }
                } else if (key.equals("basedir")) {
                    if (!context.isIgnoringProjectTag()) {
                        baseDir = value;
View Full Code Here


        if (taskClasspath==null || taskClasspath.size()==0) {
            throw new BuildException("no classpath given");
        }
        Project project = getProject();
        AntClassLoader loader = new AntClassLoader(makeRoot(),true);
        project.addReference(name,loader);
    }
   
    private RootLoader makeRoot() {
        String[] list = taskClasspath.list();
        LoaderConfiguration lc = new LoaderConfiguration();
View Full Code Here

                    if (value != null) {
                        context.setCurrentProjectName(value);
                        nameAttributeSet = true;
                        if (!context.isIgnoringProjectTag()) {
                            project.setName(value);
                            project.addReference(value, project);
                        }
                    }
                } else if (key.equals("id")) {
                    if (value != null) {
                        // What's the difference between id and name ?
View Full Code Here

                    }
                } else if (key.equals("id")) {
                    if (value != null) {
                        // What's the difference between id and name ?
                        if (!context.isIgnoringProjectTag()) {
                            project.addReference(value, project);
                        }
                    }
                } else if (key.equals("basedir")) {
                    if (!context.isIgnoringProjectTag()) {
                        baseDir = value;
View Full Code Here

        synchronized (project) {
            scriptRepository =
                (Map) project.getReference(MagicNames.SCRIPT_REPOSITORY);
            if (scriptRepository == null) {
                scriptRepository = new HashMap();
                project.addReference(MagicNames.SCRIPT_REPOSITORY,
                    scriptRepository);
            }
        }

        name = ProjectHelper.genComponentName(getURI(), name);
View Full Code Here

        p.addBuildListener(consoleLogger);
        try {
            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);
View Full Code Here

        synchronized (p) {
            scriptRepository =
                (Map) p.getReference(MagicNames.SCRIPT_REPOSITORY);
            if (scriptRepository == null) {
                scriptRepository = new HashMap();
                p.addReference(MagicNames.SCRIPT_REPOSITORY,
                    scriptRepository);
            }
        }

        name = ProjectHelper.genComponentName(getURI(), name);
View Full Code Here

        project.setBaseDir(mavenProject.getBasedir());
        project.setProperty("jruby.home", jrubyHome().getAbsolutePath());
        project.addBuildListener(new LogAdapter());

        Path jrubyClasspath = new Path(project);
        project.addReference("jruby.classpath", jrubyClasspath);

        try {
            append(jrubyClasspath, testClasspathElements);
            append(jrubyClasspath, compileClasspathElements);
            append(jrubyClasspath, pluginArtifacts);
View Full Code Here

    @SuppressWarnings("unchecked")
    protected static Project createAntProject() {
        final Project project = new Project();

        final ProjectHelper helper = ProjectHelper.getProjectHelper();
        project.addReference(ProjectHelper.PROJECTHELPER_REFERENCE, helper);
        helper.getImportStack().addElement("AntBuilder"); // import checks that stack is not empty

        addGrailsConsoleBuildListener(project);

        project.init();
View Full Code Here

                antProject.fireBuildStarted();
                antProject.init();

                ProjectHelper helper = ProjectHelper.getProjectHelper();

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

                helper.parse(antProject,buildFile);

                antProject.executeTarget("jetty.run");
           
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.