Package org.apache.tools.ant

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


                    dupFile = new File(dup);
                    contextFile = context.getBuildFile();
                }

                if (context.isIgnoringProjectTag() && !dupFile.equals(contextFile)) {
                    project.log("Duplicated project name in import. Project "
                                + context.getCurrentProjectName() + " defined first in " + dup
                                + " and again in " + contextFile, Project.MSG_WARN);
                }
            }
            if (nameAttributeSet) {
View Full Code Here


            }
            Hashtable<String, Target> projectTargets = project.getTargets();
            boolean   usedTarget = false;
            // If the name has not already been defined define it
            if (projectTargets.containsKey(name)) {
                project.log("Already defined in main or a previous import, ignore " + name,
                            Project.MSG_VERBOSE);
            } else {
                target.setName(name);
                context.getCurrentTargets().put(name, target);
                project.addOrReplaceTarget(name, target);
View Full Code Here

            String dup = project.getProperty(antFileProp);
            if (dup != null && nameAttributeSet) {
                File dupFile = new File(dup);
                if (context.isIgnoringProjectTag()
                    && !dupFile.equals(context.getBuildFile())) {
                    project.log("Duplicated project name in import. Project "
                        + context.getCurrentProjectName() + " defined first in "
                        + dup + " and again in " + context.getBuildFile(),
                        Project.MSG_WARN);
                }
            }
View Full Code Here

            if (currentTargets.containsKey(name)) {
                // Alter the name.
                if (context.getCurrentProjectName() != null) {
                    String newName = context.getCurrentProjectName()
                        + "." + name;
                    project.log("Already defined in main or a previous import, "
                        + "define " + name + " as " + newName,
                                Project.MSG_VERBOSE);
                    name = newName;
                } else {
                    project.log("Already defined in main or a previous import, "
View Full Code Here

                    project.log("Already defined in main or a previous import, "
                        + "define " + name + " as " + newName,
                                Project.MSG_VERBOSE);
                    name = newName;
                } else {
                    project.log("Already defined in main or a previous import, "
                        + "ignore " + name, Project.MSG_VERBOSE);
                    name = null;
                }
            }
View Full Code Here

       
        File executable = new File(currDir, "foo" + fileExt);
        MockControl ctrl = MockClassControl.createControl(Project.class);
        ctrl.setDefaultMatcher(MockControl.ALWAYS_MATCHER);
        Project project = (Project)ctrl.getMock();
        project.log((Task)null, null, 0);
        int logCalls = 5;
        if (onWindows) {
            if (!expectSuccess) {
                logCalls = 25;
            } else if (".com".equals(fileExt)) {
View Full Code Here

        task.setFile("foo");

        project.getBaseDir();
        File baseDir = new File(".");
        ctrl.setReturnValue(baseDir);
        project.log(task,
                    "Importing file foo from " + baseDir.getAbsolutePath(),
                    Project.MSG_VERBOSE);

        ctrl.replay();
        task.setProject(project);
View Full Code Here

        dsCtrl.setReturnValue(new File("."), 2);

        MockControl prCtrl = MockClassControl.createControl(Project.class);
        prCtrl.setDefaultMatcher(MockClassControl.ALWAYS_MATCHER);
        Project project = (Project)prCtrl.getMock();
        project.log((Task)null, null, 0);
        prCtrl.setVoidCallable(4);
//        MockControl f1Ctrl = MockClassControl.createControl(File.class);
//        File file1 = (File)f1Ctrl.getMock();
//        file1.getAbsolutePath();
//        f1Ctrl.setReturnValue("foo.xml");
View Full Code Here

                    dupFile = new File(dup);
                    contextFile = context.getBuildFile();
                }

                if (context.isIgnoringProjectTag() && !dupFile.equals(contextFile)) {
                    project.log("Duplicated project name in import. Project "
                            + context.getCurrentProjectName() + " defined first in " + dup
                            + " and again in " + contextFile, Project.MSG_WARN);
                }
            }
            if (nameAttributeSet) {
View Full Code Here

            }
            Hashtable projectTargets = project.getTargets();
            boolean   usedTarget = false;
            // If the name has not already been defined define it
            if (projectTargets.containsKey(name)) {
                project.log("Already defined in main or a previous import, ignore " + name,
                        Project.MSG_VERBOSE);
            } else {
                target.setName(name);
                context.getCurrentTargets().put(name, target);
                project.addOrReplaceTarget(name, target);
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.