ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@locus.apache.org>
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional NetRexxC.java RenameExtensions.java
Date Thu, 06 Jul 2000 16:48:29 GMT
conor       00/07/06 09:48:28

  Modified:    src/main/org/apache/tools/ant BuildEvent.java Project.java
                        ProjectHelper.java Target.java Task.java
                        TaskAdapter.java
               src/main/org/apache/tools/ant/taskdefs Ant.java
                        Available.java Chmod.java Copydir.java Delete.java
                        Deltree.java Exec.java Expand.java FixCRLF.java
                        GUnzip.java GZip.java Get.java Java.java Javac.java
                        JavacOutputStream.java Javadoc.java
                        JikesOutputParser.java KeySubst.java
                        MatchingTask.java Mkdir.java Property.java
                        Replace.java Rmic.java Tar.java
                        TaskOutputStream.java Taskdef.java Touch.java
                        Untar.java XSLTProcess.java Zip.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        NetRexxC.java RenameExtensions.java
  Log:
  Move to task level logging
  
  This patch removes the concept of currentTarget and currentTask from the
  BuildEvents code. To facilitate this I have moved logging to the task
  level which now passes a task pointer to the project's log method.
  
  Task level logging may also allow for more fine grained control of logging
  in the future.
  
  I have left the Project's log methods public to allow people's custom
  tasks to continue to work. In the future these can become private.
  
  Revision  Changes    Path
  1.2       +39 -26    jakarta-ant/src/main/org/apache/tools/ant/BuildEvent.java
  
  Index: BuildEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/BuildEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BuildEvent.java	2000/06/24 10:55:38	1.1
  +++ BuildEvent.java	2000/07/06 16:48:07	1.2
  @@ -61,29 +61,52 @@
       private Target target;
       private Task task;
       private String message;
  -    private int priority;
  +    private int priority = Project.MSG_VERBOSE;
       private Throwable exception;
   
  +    
       /**
  -     *  Constructs a new build event. Fields that are not relevant
  -     *  can be set to null, except for the project field which is
  -     *  required.
  -     */
  -    public BuildEvent(
  -        Project project,
  -        Target target,
  -        Task task,
  -        String message,
  -        int priority,
  -        Throwable exception) {
  -
  -        super(getSource(project, target, task));
  -
  +     * Construct a BuildEvent for a project level event
  +     *
  +     * @param project the project that emitted the event.
  +     */
  +    public BuildEvent(Project project) {
  +        super(project);
           this.project = project;
  +        this.target = null;
  +        this.task = null;
  +    }
  +    
  +    /**
  +     * Construct a BuildEvent for a target level event
  +     *
  +     * @param target the target that emitted the event.
  +     */
  +    public BuildEvent(Target target) {
  +        super(target);
  +        this.project = target.getProject();
           this.target = target;
  +        this.task = null;
  +    }
  +    
  +    /**
  +     * Construct a BuildEvent for a task level event
  +     *
  +     * @param task the task that emitted the event.
  +     */
  +    public BuildEvent(Task task) {
  +        super(task);
  +        this.project = task.getProject();
  +        this.target = task.getTarget();
           this.task = task;
  +    }
  +
  +    public void setMessage(String message, int priority) {
           this.message = message;
           this.priority = priority;
  +    }
  +    
  +    public void setException(Throwable exception) {
           this.exception = exception;
       }
   
  @@ -98,6 +121,7 @@
        *  Returns the target that fired this event.
        */
       public Target getTarget() {
  +        
           return target;
       }
   
  @@ -138,16 +162,5 @@
        */
       public Throwable getException() {
           return exception;
  -    }
  -
  -    /**
  -     *  Returns the object that fired this event.
  -     */
  -    private static Object getSource(Project project, Target target, Task task) {
  -        if (task != null) return task;
  -        if (target != null) return target;
  -        if (project != null) return project;
  -
  -        throw new IllegalArgumentException("Project field cannot be null");
       }
   }
  
  
  
  1.26      +34 -32    jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Project.java	2000/07/05 10:02:46	1.25
  +++ Project.java	2000/07/06 16:48:07	1.26
  @@ -104,8 +104,6 @@
       private File baseDir;
   
       private Vector listeners = new Vector();
  -    protected Target currentTarget = null;
  -    protected Task currentTask = null;
   
       public Project() {
       }
  @@ -170,13 +168,17 @@
       }
   
       public void log(String msg, int msgLevel) {
  -        fireMessageLogged(msg, msgLevel);
  +        fireMessageLogged(this, msg, msgLevel);
       }
   
  -    public void log(String msg, String tag, int msgLevel) {
  -        fireMessageLogged(msg, msgLevel);
  +    public void log(Task task, String msg, int msgLevel) {
  +        fireMessageLogged(task, msg, msgLevel);
       }
   
  +    public void log(Target target, String msg, int msgLevel) {
  +        fireMessageLogged(target, msg, msgLevel);
  +    }
  +
       public void setProperty(String name, String value) {
           // command line properties take precedence
           if (null != userProperties.get(name))
  @@ -708,20 +710,15 @@
       public void runTarget(Target target)
           throws BuildException {
   
  -        currentTarget = target;
  -
           try {
  -            fireTargetStarted();
  -            currentTarget.execute();
  -            fireTargetFinished(null);
  +            fireTargetStarted(target);
  +            target.execute();
  +            fireTargetFinished(target, null);
           }
           catch(RuntimeException exc) {
  -            fireTargetFinished(exc);
  +            fireTargetFinished(target, exc);
               throw exc;
           }
  -        finally {
  -            currentTarget = null;
  -        }
       }
   
       /**
  @@ -849,7 +846,7 @@
       }
   
       protected void fireBuildStarted() {
  -        BuildEvent event = createBuildEvent();
  +        BuildEvent event = new BuildEvent(this);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.buildStarted(event);
  @@ -857,62 +854,67 @@
       }
   
       protected void fireBuildFinished(Throwable exception) {
  -        BuildEvent event = createBuildEvent(exception);
  +        BuildEvent event = new BuildEvent(this);
  +        event.setException(exception);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.buildFinished(event);
           }
       }
   
  -    protected void fireTargetStarted() {
  -        BuildEvent event = createBuildEvent();
  +    protected void fireTargetStarted(Target target) {
  +        BuildEvent event = new BuildEvent(target);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.targetStarted(event);
           }
       }
   
  -    protected void fireTargetFinished(Throwable exception) {
  -        BuildEvent event = createBuildEvent(exception);
  +    protected void fireTargetFinished(Target target, Throwable exception) {
  +        BuildEvent event = new BuildEvent(target);
  +        event.setException(exception);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.targetFinished(event);
           }
       }
   
  -    protected void fireTaskStarted() {
  -        BuildEvent event = createBuildEvent();
  +    protected void fireTaskStarted(Task task) {
  +        BuildEvent event = new BuildEvent(task);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.taskStarted(event);
           }
       }
   
  -    protected void fireTaskFinished(Throwable exception) {
  -        BuildEvent event = createBuildEvent(exception);
  +    protected void fireTaskFinished(Task task, Throwable exception) {
  +        BuildEvent event = new BuildEvent(task);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.taskFinished(event);
           }
       }
   
  -    protected void fireMessageLogged(String message, int priority) {
  -        BuildEvent event = createBuildEvent(message, priority);
  +    private void fireMessageLoggedEvent(BuildEvent event, String message, int priority) {
  +        event.setMessage(message, priority);
           for (int i = 0; i < listeners.size(); i++) {
               BuildListener listener = (BuildListener) listeners.elementAt(i);
               listener.messageLogged(event);
           }
       }
   
  -    public BuildEvent createBuildEvent() {
  -        return new BuildEvent(this, currentTarget, currentTask, null, MSG_VERBOSE, null);
  +    protected void fireMessageLogged(Project project, String message, int priority) {
  +        BuildEvent event = new BuildEvent(project);
  +        fireMessageLoggedEvent(event, message, priority);
       }
   
  -    public BuildEvent createBuildEvent(String msg, int priority) {
  -        return new BuildEvent(this, currentTarget, currentTask, msg, priority, null);
  +    protected void fireMessageLogged(Target target, String message, int priority) {
  +        BuildEvent event = new BuildEvent(target);
  +        fireMessageLoggedEvent(event, message, priority);
       }
   
  -    public BuildEvent createBuildEvent(Throwable exception) {
  -        return new BuildEvent(this, currentTarget, currentTask, null, MSG_VERBOSE, exception);
  +    protected void fireMessageLogged(Task task, String message, int priority) {
  +        BuildEvent event = new BuildEvent(task);
  +        fireMessageLoggedEvent(event, message, priority);
       }
   }
  
  
  
  1.16      +0 -2      jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ProjectHelper.java	2000/07/04 18:18:02	1.15
  +++ ProjectHelper.java	2000/07/06 16:48:09	1.16
  @@ -327,11 +327,9 @@
   
           public void init(String tag, AttributeList attrs) throws SAXParseException {
               task = project.createTask(tag);
  -            project.currentTask = task;
               configure(task, attrs);
               task.setLocation(new Location(buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber()));
               task.init();
  -            project.currentTask = null;
   
               // Top level tasks don't have associated targets
               if (target != null) {
  
  
  
  1.7       +4 -8      jakarta-ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Target.java	2000/07/05 17:45:55	1.6
  +++ Target.java	2000/07/06 16:48:09	1.7
  @@ -123,24 +123,20 @@
                   Task task = (Task) enum.nextElement();
   
                   try {
  -                    project.currentTask = task;
  -                    project.fireTaskStarted();
  +                    project.fireTaskStarted(task);
                  	    task.execute();
  -                    project.fireTaskFinished(null);
  +                    project.fireTaskFinished(task, null);
   		}
                   catch(RuntimeException exc) {
                       if (exc instanceof BuildException) {
                           ((BuildException)exc).setLocation(task.getLocation());
                       }
  -                    project.fireTaskFinished(exc);
  +                    project.fireTaskFinished(task, exc);
                       throw exc;
                   }
  -                finally {
  -                    project.currentTask = null;
  -                }
               }
           } else {
  -            project.log("Skipped because property '" + this.condition + "' not set.", this.name, Project.MSG_VERBOSE);
  +            project.log(this, "Skipped because property '" + this.condition + "' not set.", Project.MSG_VERBOSE);
           }
       }
   }
  
  
  
  1.8       +38 -0     jakarta-ant/src/main/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Task.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Task.java	2000/06/29 13:35:26	1.7
  +++ Task.java	2000/07/06 16:48:09	1.8
  @@ -78,6 +78,15 @@
       }
   
       /**
  +     * Get the Project to which this task belongs
  +     *
  +     * @param the task's project.
  +     */
  +    public Project getProject() {
  +        return project;
  +    }
  +    
  +    /**
        * Sets the target object of this task.
        *
        * @param target Target in whose scope this task belongs.
  @@ -85,6 +94,35 @@
       public void setTarget(Target target) {
           this.target = target;
       }
  +
  +    /**
  +     * Get the Target to which this task belongs
  +     *
  +     * @param the task's target.
  +     */
  +    public Target getTarget() {
  +        return target;
  +    }
  +    
  +    /**
  +     * Log a message with the default (INFO) priority.
  +     *
  +     * @param the message to be logged.
  +     */
  +    public void log(String msg) {
  +        log(msg, Project.MSG_INFO);
  +    }
  +
  +    /**
  +     * Log a mesage with the give priority.
  +     *
  +     * @param the message to be logged.
  +     * @param msgLevel the message priority at which this message is to be logged.
  +     */
  +    public void log(String msg, int msgLevel) {
  +        project.log(this, msg, msgLevel);
  +    }
  +
   
       /** Sets a description of the current action. It will be usefull in commenting
        *  what we are doing.
  
  
  
  1.3       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java
  
  Index: TaskAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TaskAdapter.java	2000/01/31 14:09:14	1.2
  +++ TaskAdapter.java	2000/07/06 16:48:10	1.3
  @@ -76,13 +76,13 @@
   	    Class c=proxy.getClass();
   	    executeM=c.getMethod( "execute", new Class[0] );
   	    if( executeM == null ) {
  -		project.log("No execute in " + proxy.getClass(), "TaskAdapter", project.MSG_ERR);
  +		log("No execute in " + proxy.getClass(), Project.MSG_ERR);
   		throw new BuildException("No execute in " + proxy.getClass());
   	    }
   	    executeM.invoke(proxy, null);
   	    return; 
   	} catch( Exception ex ) {
  -	    project.log("Error in " + proxy.getClass(), "TaskAdapter", project.MSG_ERR);
  +	    log("Error in " + proxy.getClass(), Project.MSG_ERR);
   	    throw new BuildException( ex );
   	}
   
  
  
  
  1.8       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Ant.java	2000/06/24 10:55:45	1.7
  +++ Ant.java	2000/07/06 16:48:13	1.8
  @@ -100,7 +100,7 @@
                   p1.addBuildListener(new DefaultLogger(out, Project.MSG_INFO));
               }
               catch( IOException ex ) {
  -                project.log( "Ant: Can't set output to " + output );
  +                log( "Ant: Can't set output to " + output );
               }
           }
   
  
  
  
  1.6       +5 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Available.java	2000/06/14 01:40:21	1.5
  +++ Available.java	2000/07/06 16:48:13	1.6
  @@ -76,9 +76,9 @@
       }
   
       public void setClass(String classname) {
  -        project.log("The class attribute is deprecated. " +
  -                    "Please use the classname attribute.",
  -                    Project.MSG_WARN);
  +        log("The class attribute is deprecated. " +
  +            "Please use the classname attribute.",
  +            Project.MSG_WARN);
           this.classname = classname;
       }
   
  @@ -107,7 +107,7 @@
               File f = new File(file);
               return f.exists();
           } catch (Exception e) {
  -            project.log(e.toString(), "available", Project.MSG_VERBOSE);
  +            log(e.toString(), Project.MSG_VERBOSE);
               return false;
           }
       }
  @@ -121,7 +121,7 @@
               Class.forName(classname);
               return true;
           } catch (Throwable t) {
  -            project.log(t.toString(), "available", Project.MSG_VERBOSE);
  +            log(t.toString(), Project.MSG_VERBOSE);
               return false;
           }
       }
  
  
  
  1.4       +5 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  
  Index: Chmod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Chmod.java	2000/07/04 09:30:21	1.3
  +++ Chmod.java	2000/07/06 16:48:13	1.4
  @@ -81,9 +81,9 @@
       }
   
       public void setSrc(String src) {
  -        project.log("The src attribute is deprecated. " +
  -                    "Please use the file attribute.",
  -                    Project.MSG_WARN);
  +        log("The src attribute is deprecated. " +
  +            "Please use the file attribute.",
  +            Project.MSG_WARN);
           setFile(src);
       }
   
  @@ -100,7 +100,7 @@
                   if (srcFile != null && srcDir == null) {
                       chmod(srcFile.toString());
                   } else if(srcFile == null && srcDir == null) {
  -                    project.log("The attribute 'file' or 'dir' needs to be set.", Project.MSG_WARN);
  +                    log("The attribute 'file' or 'dir' needs to be set.", Project.MSG_WARN);
                       throw new BuildException("Required attribute not set in Chmod", location);
                   } else if(srcFile == null && srcDir != null) {
             
  @@ -114,7 +114,7 @@
               }
           } catch (IOException ioe) {
               // ignore, but warn
  -            project.log("Error in Chmod " + ioe.toString() , Project.MSG_WARN);
  +            log("Error in Chmod " + ioe.toString() , Project.MSG_WARN);
           }
       }
   
  
  
  
  1.10      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java
  
  Index: Copydir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Copydir.java	2000/07/05 10:03:01	1.9
  +++ Copydir.java	2000/07/06 16:48:13	1.10
  @@ -105,8 +105,8 @@
           String[] files = ds.getIncludedFiles();
           scanDir(srcDir, destDir, files);
           if (filecopyList.size() > 0) {
  -            project.log("Copying " + filecopyList.size() + " files to "
  -                        + destDir.getAbsolutePath());
  +            log("Copying " + filecopyList.size() + " files to "
  +                + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
               while (enum.hasMoreElements()) {
                   String fromFile = (String) enum.nextElement();
  
  
  
  1.6       +112 -114  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Delete.java	2000/06/30 13:55:32	1.5
  +++ Delete.java	2000/07/06 16:48:14	1.6
  @@ -1,37 +1,37 @@
   /*
    * The Apache Software License, Version 1.1
  - *
  + * 
    * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
  - *
  + * 
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
  - *
  + * 
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  - *
  + * notice, this list of conditions and the following disclaimer.
  + * 
    * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  + * notice, this list of conditions and the following disclaimer in
  + * the documentation and/or other materials provided with the
  + * distribution.
  + * 
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  - *       "This product includes software developed by the
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  - *
  + * any, must include the following acknowlegement:
  + * "This product includes software developed by the
  + * Apache Software Foundation (http://www.apache.org/)."
  + * Alternately, this acknowlegement may appear in the software itself,
  + * if and wherever such third-party acknowlegements normally appear.
  + * 
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  - *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written
  - *    permission, please contact apache@apache.org.
  - *
  + * Foundation" must not be used to endorse or promote products derived
  + * from this software without prior written permission. For written
  + * permission, please contact apache@apache.org.
  + * 
    * 5. Products derived from this software may not be called "Apache"
  - *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  - *
  + * nor may "Apache" appear in their names without prior written
  + * permission of the Apache Group.
  + * 
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  @@ -45,7 +45,7 @@
    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    * ====================================================================
  - *
  + * 
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation.  For more
    * information on the Apache Software Foundation, please see
  @@ -54,105 +54,103 @@
   package org.apache.tools.ant.taskdefs;
   
   import org.apache.tools.ant.*;
  -
   import java.io.*;
   
   /**
    * Deletes a single file or a set of files defined by a pattern.
  - *
  + * 
    * @author stefano@apache.org
    * @author Tom Dimock <a href="mailto:tad1@cornell.edu">tad1@cornell.edu</a>
    */
   public class Delete extends MatchingTask {
  +    private File delDir = null;
  +    private int verbosity = Project.MSG_VERBOSE;
  +    private File f = null;
  +
  +    /**
  +     * Set the name of a single file to be removed.
  +     * 
  +     * @param file the file to be deleted
  +     */
  +    public void setFile(String file) {
  +        f = project.resolveFile(file);
  +    } 
  +
  +    /**
  +     * Set the directory from which files are to be deleted
  +     * 
  +     * @param dir the directory path.
  +     */
  +    public void setDir(String dir) {
  +        delDir = project.resolveFile(dir);
  +    } 
  +
  +    /**
  +     * Used to force listing of all names of deleted files.
  +     * 
  +     * @param verbose "true" or "on"
  +     */
  +    public void setVerbose(String verbose) {
  +        if ("true".equalsIgnoreCase(verbose.trim()) || "on".equalsIgnoreCase(verbose.trim())) {
  +            this.verbosity = Project.MSG_INFO;
  +        } else {
  +            this.verbosity = Project.MSG_VERBOSE;
  +        } 
  +    } 
  +
  +    /**
  +     * Make it so.  Delete the file(s).
  +     * 
  +     * @throws BuildException
  +     */
  +    public void execute() throws BuildException {
  +        if (f == null && delDir == null) {
  +            throw new BuildException("<file> or <dir> attribute must be set!");
  +        } 
  +
  +        // old <delete> functionality must still work
  +        if (f != null) {
  +            if (f.exists()) {
  +                if (f.isDirectory()) {
  +                    log("Directory: " + f.getAbsolutePath() + " cannot be removed with delete.  Use Deltree instead.");
  +                } else {
  +                    log("Deleting: " + f.getAbsolutePath());
  +
  +                    if (!f.delete()) {
  +                        throw new BuildException("Unable to delete file " + f.getAbsolutePath());
  +                    } 
  +                } 
  +            } 
  +        } 
  +
  +        // now we'll do the fancy pattern-driven deletes
  +        if (delDir == null) {
  +            return;
  +        } 
  +
  +        if (!delDir.exists()) {
  +            throw new BuildException("dir does not exist!");
  +        } 
  +
  +        DirectoryScanner ds = super.getDirectoryScanner(delDir);
  +        String[] files = ds.getIncludedFiles();
  +
  +        if (files.length > 0) {
  +            log("Deleting " + files.length + " files from " + delDir.getAbsolutePath());
  +
  +            for (int i = 0; i < files.length; i++) {
  +                File f = new File(delDir, files[i]);
  +
  +                if (f.exists()) {
  +                    log("Deleting: " + f.getAbsolutePath(), verbosity);
  +
  +                    if (!f.delete()) {
  +                        throw new BuildException("Unable to delete " + f.getAbsolutePath());
  +                    } 
  +                } 
  +            } 
  +        } 
  +    } 
   
  -  private File delDir = null;
  -  private int verbosity = project.MSG_VERBOSE;
  -  private File f = null;
  -
  -  /**
  -   * Set the name of a single file to be removed.
  -   *
  -   * @param file the file to be deleted
  -   */
  -  public void setFile(String file) {
  -    f = project.resolveFile(file);
  -  }
  -
  -  /**
  -   * Set the directory from which files are to be deleted
  -   *
  -   * @param dir the directory path.
  -   */
  -  public void setDir(String dir) {
  -    delDir = project.resolveFile(dir);
  -  }
  -
  -  /**
  -   * Used to force listing of all names of deleted files.
  -   *
  -   * @param verbose "true" or "on"
  -   */
  -  public void setVerbose(String verbose) {
  -
  -    if ("true".equalsIgnoreCase(verbose.trim()) || "on".equalsIgnoreCase(verbose.trim())) {
  -      this.verbosity = project.MSG_INFO;
  -    }
  -    else {
  -      this.verbosity = project.MSG_VERBOSE;
  -    }
  -  }
  -
  -  /**
  -   * Make it so.  Delete the file(s).
  -   *
  -   * @throws BuildException
  -   */
  -  public void execute() throws BuildException {
  -
  -    if (f == null && delDir == null) {
  -      throw new BuildException("<file> or <dir> attribute must be set!");
  -    }
  -
  -    // old <delete> functionality must still work
  -    if (f != null) {
  -      if (f.exists()) {
  -        if (f.isDirectory()) {
  -          project
  -            .log("Directory: " + f.getAbsolutePath()
  -                 + " cannot be removed with delete.  Use Deltree instead.");
  -        }
  -        else {
  -          project.log("Deleting: " + f.getAbsolutePath());
  -          if (!f.delete()) {
  -	      throw new BuildException("Unable to delete file " + f.getAbsolutePath());
  -          }
  -        }
  -      }
  -    }
  -
  -    // now we'll do the fancy pattern-driven deletes
  -    if (delDir == null) {
  -      return;
  -    }
  -    if (!delDir.exists()) {
  -      throw new BuildException("dir does not exist!");
  -    }
  -    DirectoryScanner ds    = super.getDirectoryScanner(delDir);
  -    String[]         files = ds.getIncludedFiles();
  -
  -    if (files.length > 0) {
  -      project.log("Deleting " + files.length + " files from " + delDir.getAbsolutePath());
  -      for (int i = 0; i < files.length; i++) {
  -        File f = new File(delDir, files[i]);
  -
  -        if (f.exists()) {
  -          project.log("Deleting: " + f.getAbsolutePath(), verbosity);
  -          if (!f.delete()) {
  -	      throw new BuildException("Unable to delete " + f.getAbsolutePath());
  -          }
  -        }
  -      }
  -    }
  -  }
   }
   
  
  
  
  1.5       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java
  
  Index: Deltree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Deltree.java	2000/06/30 13:55:32	1.4
  +++ Deltree.java	2000/07/06 16:48:14	1.5
  @@ -72,7 +72,7 @@
       }
       
       public void execute() throws BuildException {
  -	project.log("Deleting: " + dir.getAbsolutePath());
  +	log("Deleting: " + dir.getAbsolutePath());
   
   	if (dir.exists()) {
   	    if (!dir.isDirectory()) {
  
  
  
  1.13      +6 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java
  
  Index: Exec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Exec.java	2000/07/05 19:38:31	1.12
  +++ Exec.java	2000/07/06 16:48:14	1.13
  @@ -83,10 +83,10 @@
   
           // test if os match
           String myos = System.getProperty("os.name");
  -        project.log("Myos = " + myos, Project.MSG_VERBOSE);
  +        log("Myos = " + myos, Project.MSG_VERBOSE);
           if ((os != null) && (os.indexOf(myos) < 0)){
               // this command will be executed only on the specified OS
  -            project.log("Not found in " + os, Project.MSG_VERBOSE);
  +            log("Not found in " + os, Project.MSG_VERBOSE);
               return 0;
           }
   
  @@ -106,14 +106,14 @@
   
           try {
               // show the command
  -            project.log(command, "exec", Project.MSG_VERBOSE);
  +            log(command, Project.MSG_VERBOSE);
   
               // exec command on system runtime
               Process proc = Runtime.getRuntime().exec(command);
   
               if( out!=null )  {
                   fos=new PrintWriter( new FileWriter( out ) );
  -                project.log("Output redirected to " + out, Project.MSG_VERBOSE);
  +                log("Output redirected to " + out, Project.MSG_VERBOSE);
               }
   
               // copy input and error to the output stream
  @@ -138,7 +138,7 @@
               // check its exit value
               err = proc.exitValue();
               if (err != 0) {
  -                project.log("Result: " + err, "exec", Project.MSG_ERR);
  +                log("Result: " + err, Project.MSG_ERR);
               }
           } catch (IOException ioe) {
               throw new BuildException("Error exec: " + command, ioe, location);
  @@ -165,7 +165,7 @@
   
       protected void outputLog(String line, int messageLevel) {
           if (fos == null) {
  -            project.log(line, messageLevel); 
  +            log(line, messageLevel); 
           } else {
               fos.println(line);
           }
  
  
  
  1.5       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java
  
  Index: Expand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Expand.java	2000/06/29 13:35:31	1.4
  +++ Expand.java	2000/07/06 16:48:14	1.5
  @@ -81,7 +81,7 @@
   	    File srcF=project.resolveFile(source);
   	    File dir=project.resolveFile(dest);
   	    
  -	    project.log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
  +	    log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
   	    // code from WarExpand
   	    ZipInputStream zis = new ZipInputStream(new FileInputStream(srcF));
   	    ZipEntry ze = null;
  @@ -89,7 +89,7 @@
   	    while ((ze = zis.getNextEntry()) != null) {
   		try {
   		    File f = new File(dir, project.translatePath(ze.getName()));
  -		    project.log("expand-file " + ze.getName() , "expand", Project.MSG_VERBOSE );
  +		    log("expand-file " + ze.getName() , Project.MSG_VERBOSE );
   		    // create intermediary directories - sometimes zip don't add them
   		    File dirF=new File(f.getParent());
   		    dirF.mkdirs();
  @@ -118,7 +118,7 @@
   		    System.out.println("FileNotFoundException: " +  ze.getName()  );
   		}
   	    }
  -	    project.log("</log:expand>", Project.MSG_VERBOSE );
  +	    log("</log:expand>", Project.MSG_VERBOSE );
   	} catch (IOException ioe) {
   	    ioe.printStackTrace();
   	}
  
  
  
  1.6       +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  
  Index: FixCRLF.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FixCRLF.java	2000/02/27 01:47:46	1.5
  +++ FixCRLF.java	2000/07/06 16:48:14	1.6
  @@ -223,11 +223,11 @@
           }
   
           // log options used
  -        project.log("options:" +
  +        log("options:" +
               " cr=" + (addcr==-1 ? "add" : addcr==0 ? "asis" : "remove") +
               " tab=" + (addtab==-1 ? "add" : addtab==0 ? "asis" : "remove") +
               " eof=" + (ctrlz==-1 ? "add" : ctrlz==0 ? "asis" : "remove"),
  -            "fixcrlf", project.MSG_VERBOSE);
  +            Project.MSG_VERBOSE);
   
           DirectoryScanner ds = super.getDirectoryScanner(srcDir);
           String[] files = ds.getIncludedFiles();
  @@ -262,9 +262,9 @@
               boolean eof = ((count>0) && (indata[count-1] == 0x1A));
   
               // log stats (before fixes)
  -            project.log(srcFile + ": size=" + count + " cr=" + cr +
  +            log(srcFile + ": size=" + count + " cr=" + cr +
                           " lf=" + lf + " tab=" + tab + " eof=" + eof,
  -                        "fixcrlf", project.MSG_VERBOSE);
  +                        Project.MSG_VERBOSE);
   
               // determine the output buffer size (slightly pessimisticly)
               int outsize = count;
  
  
  
  1.2       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
  
  Index: GUnzip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GUnzip.java	2000/05/24 14:35:22	1.1
  +++ GUnzip.java	2000/07/06 16:48:15	1.2
  @@ -109,7 +109,7 @@
           }
   
           if (source.lastModified() > dest.lastModified()) {
  -            project.log("Expanding "+ source.getAbsolutePath() + " to "
  +            log("Expanding "+ source.getAbsolutePath() + " to "
                           + dest.getAbsolutePath());
   
               try {
  
  
  
  1.3       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GZip.java
  
  Index: GZip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GZip.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GZip.java	2000/02/09 20:51:47	1.2
  +++ GZip.java	2000/07/06 16:48:15	1.3
  @@ -81,13 +81,13 @@
       }
   
       public void execute() throws BuildException {
  -        project.log("Building gzip: " + zipFile.getAbsolutePath());
  +        log("Building gzip: " + zipFile.getAbsolutePath());
       
           try {
               GZIPOutputStream zOut = new GZIPOutputStream(new FileOutputStream(zipFile));
           
               if (source.isDirectory()) {
  -                project.log ("Cannot Gzip a directory!");
  +                log ("Cannot Gzip a directory!");
               } else {
                   zipFile(source, zOut);
               }
  
  
  
  1.4       +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java
  
  Index: Get.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Get.java	2000/02/24 00:57:43	1.3
  +++ Get.java	2000/07/06 16:48:15	1.4
  @@ -82,7 +82,7 @@
                   throw new BuildException(e.toString());
               }
   
  -	    project.log("Getting: " + source);
  +	    log("Getting: " + source);
   
   	    File destF=new File(dest);
   	    FileOutputStream fos = new FileOutputStream(destF);
  @@ -93,11 +93,11 @@
   		    is = url.openStream();
   		    break;
   		} catch( IOException ex ) {
  -		    project.log( "Error opening connection " + ex );
  +		    log( "Error opening connection " + ex );
   		}
   	    }
   	    if( is==null ) {
  -		project.log( "Can't get " + source + " to " + dest);
  +		log( "Can't get " + source + " to " + dest);
   		if( ignoreErrors != null ) return;
   		throw new BuildException( "Can't get " + source + " to " + dest);
   	    }
  @@ -113,7 +113,7 @@
   	    fos.close();
   	    is.close();
   	} catch (IOException ioe) {
  -	    project.log("Error getting " + source + " to " + dest );
  +	    log("Error getting " + source + " to " + dest );
   	    if( ignoreErrors != null ) return;
   	    throw new BuildException(ioe.toString());
   	}
  
  
  
  1.8       +9 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java
  
  Index: Java.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Java.java	2000/07/05 15:24:28	1.7
  +++ Java.java	2000/07/06 16:48:15	1.8
  @@ -86,7 +86,7 @@
        * a separate VM (fork = "yes").
        */
       public int executeJava() throws BuildException {
  -        project.log("Calling " + classname, "java", project.MSG_VERBOSE);
  +        log("Calling " + classname, Project.MSG_VERBOSE);
   
           if (classname == null) {
               throw new BuildException("Classname must not be null.");
  @@ -113,8 +113,11 @@
               return run(b.toString());
           } else {
               Vector argList = tokenize(args);
  -            if (jvmargs != null) project.log("JVM args and classpath ignored when same JVM is used.", "java", project.MSG_VERBOSE);
  -            project.log("Java args: " + argList.toString(), "java", project.MSG_VERBOSE);
  +            if (jvmargs != null) {
  +                log("JVM args and classpath ignored when same JVM is used.", Project.MSG_VERBOSE);
  +            }
  +        
  +            log("Java args: " + argList.toString(), Project.MSG_VERBOSE);
               run(classname, argList);
               return 0;
           }
  @@ -131,9 +134,9 @@
        * Set the source file (deprecated).
        */
       public void setClass(String s) {
  -        project.log("The class attribute is deprecated. " +
  -                    "Please use the classname attribute.",
  -                    Project.MSG_WARN);
  +        log("The class attribute is deprecated. " +
  +            "Please use the classname attribute.",
  +            Project.MSG_WARN);
           this.classname = s;
       }
   
  
  
  
  1.18      +25 -25    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Javac.java	2000/07/06 12:30:50	1.17
  +++ Javac.java	2000/07/06 16:48:15	1.18
  @@ -284,8 +284,8 @@
           }
   
           if (compileList.size() > 0) {
  -            project.log("Compiling " + compileList.size() +
  -                        " source files to " + destDir);
  +            log("Compiling " + compileList.size() + 
  +                " source files to " + destDir);
   
               if (compiler.equalsIgnoreCase("classic")) {
                   doClassicCompile();
  @@ -302,12 +302,12 @@
           // copy the support files
   
           if (filecopyList.size() > 0) {
  -            project.log("The implicit copying of support files by javac has been deprecated. " +
  -                        "Use the copydir task to copy support files explicitly.",
  -                        Project.MSG_WARN);
  +            log("The implicit copying of support files by javac has been deprecated. " +
  +                "Use the copydir task to copy support files explicitly.",
  +                Project.MSG_WARN);
   
  -            project.log("Copying " + filecopyList.size() +
  -                        " support files to " + destDir.getAbsolutePath());
  +            log("Copying " + filecopyList.size() +
  +                " support files to " + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
               while (enum.hasMoreElements()) {
                   String fromFile = (String) enum.nextElement();
  @@ -348,8 +348,8 @@
                                             files[i].indexOf(".java")) + ".class");
   
                   if (srcFile.lastModified() > now) {
  -                    project.log("Warning: file modified in the future: " +
  -                        files[i], project.MSG_WARN);
  +                    log("Warning: file modified in the future: " +
  +                        files[i], Project.MSG_WARN);
                   }
   
                   if (srcFile.lastModified() > classFile.lastModified()) {
  @@ -435,8 +435,8 @@
                  target.append(File.pathSeparator);
                  target.append(f.getAbsolutePath());
              } else {
  -               project.log("Dropping from classpath: "+
  -                   f.getAbsolutePath(),project.MSG_VERBOSE);
  +               log("Dropping from classpath: "+
  +                   f.getAbsolutePath(), Project.MSG_VERBOSE);
              }
          }
   
  @@ -467,7 +467,7 @@
        */
   
       private void doClassicCompile() throws BuildException {
  -        project.log("Using classic compiler", project.MSG_VERBOSE);
  +        log("Using classic compiler", Project.MSG_VERBOSE);
           String classpath = getCompileClasspath(false);
           Vector argList = new Vector();
   
  @@ -505,8 +505,8 @@
               argList.addElement(extdirs);
           }
   
  -        project.log("Compilation args: " + argList.toString(),
  -                    project.MSG_VERBOSE);
  +        log("Compilation args: " + argList.toString(),
  +            Project.MSG_VERBOSE);
   
           String[] args = new String[argList.size() + compileList.size()];
           int counter = 0;
  @@ -529,14 +529,14 @@
               counter++;
           }
   
  -        project.log(niceSourceList.toString(), project.MSG_VERBOSE);
  +        log(niceSourceList.toString(), Project.MSG_VERBOSE);
   
           // XXX
           // provide the compiler a different message sink - namely our own
   
           ByteArrayOutputStream out = new ByteArrayOutputStream();
           sun.tools.javac.Main compiler =
  -                new sun.tools.javac.Main(new TaskOutputStream(project, Project.MSG_WARN), "javac");
  +                new sun.tools.javac.Main(new TaskOutputStream(this, Project.MSG_WARN), "javac");
   
           if (!compiler.compile(args)) {
               throw new BuildException("Compile failed");
  @@ -548,7 +548,7 @@
        */
   
       private void doModernCompile() throws BuildException {
  -        project.log("Using modern compiler", project.MSG_VERBOSE);
  +        log("Using modern compiler", Project.MSG_VERBOSE);
           String classpath = getCompileClasspath(false);
           Vector argList = new Vector();
   
  @@ -580,8 +580,8 @@
               argList.addElement(extdirs);
           }
   
  -        project.log("Compilation args: " + argList.toString(),
  -                    project.MSG_VERBOSE);
  +        log("Compilation args: " + argList.toString(),
  +            Project.MSG_VERBOSE);
   
           String[] args = new String[argList.size() + compileList.size()];
           int counter = 0;
  @@ -604,7 +604,7 @@
               counter++;
           }
   
  -        project.log(niceSourceList.toString(), project.MSG_VERBOSE);
  +        log(niceSourceList.toString(), Project.MSG_VERBOSE);
   
           // This won't build under JDK1.2.2 because the new compiler
           // doesn't exist there.
  @@ -643,7 +643,7 @@
        */
   
       private void doJikesCompile() throws BuildException {
  -        project.log("Using jikes compiler",project.MSG_VERBOSE);
  +        log("Using jikes compiler", Project.MSG_VERBOSE);
   
           StringBuffer classpath = new StringBuffer();
           classpath.append(getCompileClasspath(true));
  @@ -721,8 +721,8 @@
          if (!warnings)
              argList.addElement("-nowarn");
   
  -        project.log("Compilation args: " + argList.toString(),
  -                    project.MSG_VERBOSE);
  +        log("Compilation args: " + argList.toString(),
  +            Project.MSG_VERBOSE);
   
           String[] args = new String[argList.size() + compileList.size()];
           int counter = 0;
  @@ -745,12 +745,12 @@
               counter++;
           }
   
  -        project.log(niceSourceList.toString(), project.MSG_VERBOSE);
  +        log(niceSourceList.toString(), Project.MSG_VERBOSE);
   
           // XXX
           // provide the compiler a different message sink - namely our own
   
  -        JikesOutputParser jop = new JikesOutputParser(project,emacsMode);
  +        JikesOutputParser jop = new JikesOutputParser(this, emacsMode);
   
           Jikes compiler = new Jikes(jop,"jikes");
           compiler.compile(args);
  
  
  
  1.2       +6 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java
  
  Index: JavacOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavacOutputStream.java	2000/01/13 10:41:41	1.1
  +++ JavacOutputStream.java	2000/07/06 16:48:16	1.2
  @@ -60,7 +60,7 @@
   
   /**
    * Serves as an output stream to Javac. This let's us print messages
  - * out to the project and detect whether or not Javac had an error
  + * out to the log and detect whether or not Javac had an error
    * while compiling.
    *
    * @author James Duncan Davidson (duncan@x180.com)
  @@ -68,17 +68,17 @@
   
   class JavacOutputStream extends OutputStream {
   
  -    private Project project;
  +    private Task task;
       private StringBuffer line;
       private boolean errorFlag = false;
   
       /**
  -     * Constructs a new JavacOutputStream with the given project
  +     * Constructs a new JavacOutputStream with the given task
        * as the output source for messages.
        */
       
  -    JavacOutputStream(Project project) {
  -        this.project = project;
  +    JavacOutputStream(Task task) {
  +        this.task = task;
           line = new StringBuffer();
       }
   
  @@ -109,7 +109,7 @@
           if (s.indexOf("error") > -1) {
               errorFlag = true;
           }
  -        project.log(s);
  +        task.log(s);
           line = new StringBuffer();
       }
   
  
  
  
  1.13      +14 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Javadoc.java	2000/07/05 19:38:31	1.12
  +++ Javadoc.java	2000/07/06 16:48:16	1.13
  @@ -329,7 +329,7 @@
   
           boolean javadoc1 = (Project.getJavaVersion() == Project.JAVA_1_1);
   
  -        project.log("Generating Javadoc", project.MSG_INFO);
  +        log("Generating Javadoc", Project.MSG_INFO);
   
           Vector argList = new Vector();
   
  @@ -577,9 +577,9 @@
            if (packageList != null) {
               argList.addElement("@" + packageList);
           }
  -        project.log("Javadoc args: " + argList.toString(), "javadoc", project.MSG_VERBOSE);
  +        log("Javadoc args: " + argList.toString(), Project.MSG_VERBOSE);
   
  -        project.log("Javadoc execution", project.MSG_INFO);
  +        log("Javadoc execution", Project.MSG_INFO);
   
           StringBuffer b = new StringBuffer();
           b.append("javadoc ");
  @@ -606,9 +606,9 @@
        * patterns.
        */
       private void evaluatePackages(String sourcePath, Vector packages, Vector argList) {
  -        project.log("Parsing source files for packages", project.MSG_INFO);
  -        project.log("Source path = " + sourcePath, project.MSG_VERBOSE);
  -        project.log("Packages = " + packages, project.MSG_VERBOSE);
  +        log("Parsing source files for packages", Project.MSG_INFO);
  +        log("Source path = " + sourcePath, Project.MSG_VERBOSE);
  +        log("Packages = " + packages, Project.MSG_VERBOSE);
   
           Vector addedPackages = new Vector();
           PathTokenizer tokenizer = new PathTokenizer(sourcePath);
  @@ -687,7 +687,7 @@
                   }
               }
               if (count > 0) {
  -                project.log("found " + count + " source files in " + path, "javadoc", project.MSG_VERBOSE);
  +                log("found " + count + " source files in " + path, Project.MSG_VERBOSE);
               }
           } else {
               throw new BuildException("Error occurred during " + path + " evaluation.");
  @@ -708,7 +708,7 @@
               while (true) {
                   line = reader.readLine();
                   if (line == null) {
  -                    project.log("Could not evaluate package for " + file, "javadoc", project.MSG_WARN);
  +                    log("Could not evaluate package for " + file, Project.MSG_WARN);
                       return null;
                   }
                   if (line.trim().startsWith("package ")) {
  @@ -718,11 +718,11 @@
               }
               reader.close();
           } catch (Exception e) {
  -            project.log("Exception " + e + " parsing " + file, "javadoc", project.MSG_WARN);
  +            log("Exception " + e + " parsing " + file, Project.MSG_WARN);
               return null;
           }
   
  -        project.log(file + " --> " + name, "javadoc", project.MSG_VERBOSE);
  +        log(file + " --> " + name, Project.MSG_VERBOSE);
   
           return name;
       }
  @@ -736,15 +736,15 @@
       protected void outputLog(String line, int messageLevel) {
           if (messageLevel==project.MSG_INFO && line.startsWith("Generating ")) {
               if (queuedLine != null) {
  -                super.outputLog(queuedLine, project.MSG_VERBOSE);
  +                super.outputLog(queuedLine, Project.MSG_VERBOSE);
               }
               queuedLine = line;
           } else {
               if (queuedLine != null) {
                   if (line.startsWith("Building "))
  -                    super.outputLog(queuedLine, project.MSG_VERBOSE);
  +                    super.outputLog(queuedLine, Project.MSG_VERBOSE);
                   else
  -                    super.outputLog(queuedLine, project.MSG_INFO);
  +                    super.outputLog(queuedLine, Project.MSG_INFO);
                   queuedLine = null;
               }
               super.outputLog(line, messageLevel);
  @@ -753,7 +753,7 @@
   
       protected void logFlush() {
           if (queuedLine != null) {
  -            super.outputLog(queuedLine, project.MSG_VERBOSE);
  +            super.outputLog(queuedLine, Project.MSG_VERBOSE);
               queuedLine = null;
           }
           super.logFlush();
  
  
  
  1.2       +6 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JikesOutputParser.java
  
  Index: JikesOutputParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JikesOutputParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JikesOutputParser.java	2000/01/13 10:41:41	1.1
  +++ JikesOutputParser.java	2000/07/06 16:48:17	1.2
  @@ -14,7 +14,7 @@
    * @author skanthak@muehlheim.de
    */
   public class JikesOutputParser {
  -    protected Project project;
  +    protected Task task;
       protected boolean errorFlag = false; // no errors so far
       protected int errors,warnings;
       protected boolean error = false;
  @@ -22,11 +22,11 @@
       
       /**
        * Construct a new Parser object
  -     * @param project - project in whichs context we are called
  +     * @param task - task in whichs context we are called
        */
  -    protected JikesOutputParser(Project project, boolean emacsMode) {
  +    protected JikesOutputParser(Task task, boolean emacsMode) {
   	super();
  -	this.project = project;
  +	this.task = task;
           this.emacsMode = emacsMode;
       }
   
  @@ -88,9 +88,9 @@
   
       private void log(String line) {
          if (!emacsMode) {
  -           project.log("", (error ? Project.MSG_ERR : Project.MSG_WARN));
  +           task.log("", (error ? Project.MSG_ERR : Project.MSG_WARN));
          }
  -       project.log(line, (error ? Project.MSG_ERR : Project.MSG_WARN));
  +       task.log(line, (error ? Project.MSG_ERR : Project.MSG_WARN));
       }
   
       /**
  
  
  
  1.3       +5 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/KeySubst.java
  
  Index: KeySubst.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/KeySubst.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- KeySubst.java	2000/02/13 18:20:00	1.2
  +++ KeySubst.java	2000/07/06 16:48:17	1.3
  @@ -76,10 +76,10 @@
           Do the execution.
       */
       public void execute() throws BuildException {
  -        project.log("!! KeySubst is deprecated. Use Filter + CopyDir instead. !!");
  -        project.log("Performing Substitions");
  +        log("!! KeySubst is deprecated. Use Filter + CopyDir instead. !!");
  +        log("Performing Substitions");
           if ( source == null || dest == null ) {
  -            project.log("Source and destinations must not be null");
  +            log("Source and destinations must not be null");
               return;            
           }
           BufferedReader br = null;
  @@ -152,8 +152,8 @@
                   
                   String name = itok.nextToken();
                   String value = itok.nextToken();
  -//                project.log ( "Name: " + name );
  -//                project.log ( "Value: " + value );
  +//                log ( "Name: " + name );
  +//                log ( "Value: " + value );
                   replacements.put ( name, value );
               }
           }
  
  
  
  1.7       +12 -12    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
  
  Index: MatchingTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MatchingTask.java	2000/06/26 12:46:55	1.6
  +++ MatchingTask.java	2000/07/06 16:48:18	1.7
  @@ -137,9 +137,9 @@
        * @param itemString the string containing the files to include.
        */
       public void setItems(String itemString) {
  -        project.log("The items attribute is deprecated. " +
  -                    "Please use the includes attribute.",
  -                    Project.MSG_WARN);
  +        log("The items attribute is deprecated. " +
  +            "Please use the includes attribute.",
  +            Project.MSG_WARN);
           if (itemString == null || itemString.equals("*") 
   				               || itemString.equals(".")) {
               createInclude().setName("**");
  @@ -173,9 +173,9 @@
        * @param ignoreString the string containing the files to ignore.
        */
       public void setIgnore(String ignoreString) {
  -        project.log("The ignore attribute is deprecated." + 
  -                    "Please use the excludes attribute.",
  -                    Project.MSG_WARN);
  +        log("The ignore attribute is deprecated." + 
  +            "Please use the excludes attribute.",
  +            Project.MSG_WARN);
           if (ignoreString != null && ignoreString.length() > 0) {
               Vector tmpExcludes = new Vector();
               StringTokenizer tok = new StringTokenizer(ignoreString, ", ", false);
  @@ -266,8 +266,8 @@
                   line = patternReader.readLine();
               }
           } catch(IOException ioe)  {
  -            project.log("An error occured while reading from pattern file: " 
  -                        + patternfile, Project.MSG_ERR); 
  +            log("An error occured while reading from pattern file: " 
  +                + patternfile, Project.MSG_ERR); 
           }
       }
   
  @@ -281,8 +281,8 @@
            if (includesfile != null && includesfile.length() > 0) {
                File incl = project.resolveFile(includesfile);
                if (!incl.exists()) {
  -                 project.log("Includesfile "+includesfile+" not found.", 
  -                             Project.MSG_ERR); 
  +                 log("Includesfile "+includesfile+" not found.", 
  +                     Project.MSG_ERR); 
                } else {
                    readPatterns(incl, includeList);
                }
  @@ -299,8 +299,8 @@
            if (excludesfile != null && excludesfile.length() > 0) {
                File excl = project.resolveFile(excludesfile);
                if (!excl.exists()) {
  -                 project.log("Excludesfile "+excludesfile+" not found.", 
  -                             Project.MSG_ERR); 
  +                 log("Excludesfile "+excludesfile+" not found.", 
  +                     Project.MSG_ERR); 
                } else {
                    readPatterns(excl, excludeList);
                }
  
  
  
  1.2       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Mkdir.java
  
  Index: Mkdir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Mkdir.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Mkdir.java	2000/01/13 10:41:41	1.1
  +++ Mkdir.java	2000/07/06 16:48:18	1.2
  @@ -77,7 +77,7 @@
   		    "succesful for an unknown reason";
   		throw new BuildException(msg);
   	    }
  -	    project.log("Created dir: " + dir.getAbsolutePath());
  +	    log("Created dir: " + dir.getAbsolutePath());
   	}
       }
   
  
  
  
  1.7       +10 -10    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Property.java	2000/06/24 15:17:00	1.6
  +++ Property.java	2000/07/06 16:48:18	1.7
  @@ -105,15 +105,15 @@
                       if (project.getUserProperty(name) == null) {
   		        project.setUserProperty(name, value);
                       } else {
  -                        project.log("Override ignored for " + name, 
  -                                    project.MSG_VERBOSE);
  +                        log("Override ignored for " + name, 
  +                            Project.MSG_VERBOSE);
                       }
   		else
                       if (project.getProperty(name) == null) {
   		        project.setProperty(name, value);
                       } else {
  -                        project.log("Override ignored for " + name, 
  -                                    project.MSG_VERBOSE);
  +                        log("Override ignored for " + name, 
  +                            Project.MSG_VERBOSE);
                       }
               }
   
  @@ -128,7 +128,7 @@
   
       private void loadFile (String name) {
           Properties props = new Properties();
  -        project.log("Loading " + name, project.MSG_VERBOSE);
  +        log("Loading " + name, Project.MSG_VERBOSE);
           try {
               if (new File(name).exists()) {
                   props.load(new FileInputStream(name));
  @@ -141,7 +141,7 @@
   
       private void loadResource( String name ) {
           Properties props = new Properties();
  -        project.log("Resource Loading " + name, project.MSG_VERBOSE);
  +        log("Resource Loading " + name, Project.MSG_VERBOSE);
           try {
               InputStream is = this.getClass().getResourceAsStream(name);
               if (is != null) {
  @@ -163,15 +163,15 @@
                   if (project.getUserProperty(name) == null) {
   		    project.setUserProperty(name, v);
                   } else {
  -                    project.log("Override ignored for " + name, 
  -                                project.MSG_VERBOSE);
  +                    log("Override ignored for " + name, 
  +                        Project.MSG_VERBOSE);
                   }
               else
                   if (project.getProperty(name) == null) {
   		    project.setProperty(name, v);
                   } else {
  -                    project.log("Override ignored for " + name, 
  -                                project.MSG_VERBOSE);
  +                    log("Override ignored for " + name, 
  +                        Project.MSG_VERBOSE);
                   }
           }
       }
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Replace.java
  
  Index: Replace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Replace.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Replace.java	2000/06/25 11:45:19	1.2
  +++ Replace.java	2000/07/06 16:48:18	1.3
  @@ -85,7 +85,7 @@
               throw new BuildException("Either the file or the dir attribute must be specified");
           }
           
  -        project.log("Replacing " + token + " --> " + value);
  +        log("Replacing " + token + " --> " + value);
   
           if (src != null) {
               processFile(src);
  
  
  
  1.7       +14 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  
  Index: Rmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Rmic.java	2000/07/04 08:52:10	1.6
  +++ Rmic.java	2000/07/06 16:48:18	1.7
  @@ -98,9 +98,9 @@
       }
   
       public void setClass(String classname) {
  -        project.log("The class attribute is deprecated. " +
  -                    "Please use the classname attribute.",
  -                    Project.MSG_WARN);
  +        log("The class attribute is deprecated. " +
  +            "Please use the classname attribute.",
  +            Project.MSG_WARN);
           this.classname = classname;
       }
   
  @@ -146,7 +146,7 @@
           }
   
           if (verify) {
  -            project.log("Verify has been turned on.", Project.MSG_INFO);
  +            log("Verify has been turned on.", Project.MSG_INFO);
           }
           File sourceBaseFile = null;
           if (null != sourceBase) {
  @@ -193,8 +193,8 @@
               }
           } else {
               if (compileList.size() > 0) {
  -                project.log("RMI Compiling " + compileList.size() +
  -                            " classes to " + baseDir, Project.MSG_INFO);
  +                log("RMI Compiling " + compileList.size() +
  +                    " classes to " + baseDir, Project.MSG_INFO);
   
                   for (int j = 0; j < compileList.size(); j++) {
                       args[i++] = (String) compileList.elementAt(j);
  @@ -272,16 +272,16 @@
                                   shouldAdd = false;
                               }
                           } catch (ClassNotFoundException e) {
  -                            project.log("Unable to verify class " + classname + 
  +                            log("Unable to verify class " + classname + 
                                       ". It could not be found.", Project.MSG_WARN);
                           } catch (NoClassDefFoundError e) {
  -                            project.log("Unable to verify class " + classname + 
  +                            log("Unable to verify class " + classname + 
                                           ". It is not defined.", Project.MSG_WARN);
                           }
                       }
                       if (shouldAdd) {
  -                        project.log("Adding: " + classname + " to compile list",
  -                                    Project.MSG_VERBOSE);
  +                        log("Adding: " + classname + " to compile list",
  +                            Project.MSG_VERBOSE);
                           compileList.addElement(classname);
                       }
                   }
  @@ -329,8 +329,8 @@
                   classFile.getAbsolutePath().indexOf(".class")) + "_Skel.class");
           if (classFile.exists()) {
               if (classFile.lastModified() > now) {
  -                project.log("Warning: file modified in the future: " +
  -                            classFile, Project.MSG_WARN);
  +                log("Warning: file modified in the future: " +
  +                    classFile, Project.MSG_WARN);
               }
   
               if (classFile.lastModified() > stubFile.lastModified()) {
  @@ -399,8 +399,8 @@
                  target.append(File.pathSeparator);
                  target.append(f.getAbsolutePath());
              } else {
  -               project.log("Dropping from classpath: "+
  -                           f.getAbsolutePath(), Project.MSG_VERBOSE);
  +               log("Dropping from classpath: "+
  +                   f.getAbsolutePath(), Project.MSG_VERBOSE);
              }
          }
   
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
  
  Index: Tar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Tar.java	2000/06/17 12:57:48	1.2
  +++ Tar.java	2000/07/06 16:48:19	1.3
  @@ -84,7 +84,7 @@
       }
   
       public void execute() throws BuildException {
  -        project.log("Building tar: "+ tarFile.getAbsolutePath());
  +        log("Building tar: "+ tarFile.getAbsolutePath());
   
           if (baseDir == null) {
               throw new BuildException("basedir attribute must be set!");
  
  
  
  1.2       +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/TaskOutputStream.java
  
  Index: TaskOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/TaskOutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TaskOutputStream.java	2000/07/04 18:18:10	1.1
  +++ TaskOutputStream.java	2000/07/06 16:48:19	1.2
  @@ -71,7 +71,7 @@
   
   public class TaskOutputStream extends OutputStream {
   
  -    private Project project;
  +    private Task task;
       private StringBuffer line;
       private int msgOutputLevel;
   
  @@ -80,8 +80,8 @@
        * as the output source for messages.
        */
   
  -    TaskOutputStream(Project project, int msgOutputLevel) {
  -        this.project = project;
  +    TaskOutputStream(Task task, int msgOutputLevel) {
  +        this.task = task;
           this.msgOutputLevel = msgOutputLevel;
   
           line = new StringBuffer();
  @@ -111,7 +111,7 @@
   
       private void processLine() {
           String s = line.toString();
  -        project.log(s, msgOutputLevel);
  +        task.log(s, msgOutputLevel);
           line = new StringBuffer();
       }
   }
  
  
  
  1.6       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java
  
  Index: Taskdef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Taskdef.java	2000/06/18 12:24:47	1.5
  +++ Taskdef.java	2000/07/06 16:48:19	1.6
  @@ -95,9 +95,9 @@
       }
   
       public void setClass(String v) {
  -        project.log("The class attribute is deprecated. " +
  -                    "Please use the classname attribute.",
  -                    Project.MSG_WARN);
  +        log("The class attribute is deprecated. " +
  +            "Please use the classname attribute.",
  +            Project.MSG_WARN);
           value = v;
       }
   
  
  
  
  1.3       +8 -9      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Touch.java	2000/06/29 10:45:24	1.2
  +++ Touch.java	2000/07/06 16:48:19	1.3
  @@ -112,9 +112,9 @@
        */
       public void execute() throws BuildException {
           if (file.exists() && project.getJavaVersion() == Project.JAVA_1_1) {
  -            project.log("Cannot change the modification time of "
  -                        + file + " in JDK 1.1",
  -                        Project.MSG_WARN);
  +            log("Cannot change the modification time of "
  +                + file + " in JDK 1.1",
  +                Project.MSG_WARN);
               return;
           }
           
  @@ -130,9 +130,8 @@
           }
   
           if (millis >= 0 && project.getJavaVersion() == Project.JAVA_1_1) {
  -            project.log(file + 
  -                        " will be created but its modification time cannot be set in JDK 1.1",
  -                        Project.MSG_WARN);
  +            log(file + " will be created but its modification time cannot be set in JDK 1.1",
  +                Project.MSG_WARN);
           }
   
           touch();
  @@ -143,7 +142,7 @@
        */
       void touch() throws BuildException {
           if (!file.exists()) {
  -            project.log("Creating "+file, Project.MSG_INFO);
  +            log("Creating "+file, Project.MSG_INFO);
               try {
                   FileOutputStream fos = new FileOutputStream(file);
                   fos.write(new byte[0]);
  @@ -181,8 +180,8 @@
           }
   
           try {
  -            project.log("Setting modification time for "+file, 
  -                        Project.MSG_VERBOSE);
  +            log("Setting modification time for "+file, 
  +                Project.MSG_VERBOSE);
   
               setLastModified.invoke(file, times);
           } catch (InvocationTargetException ite) {
  
  
  
  1.5       +4 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Untar.java
  
  Index: Untar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Untar.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Untar.java	2000/06/29 13:35:33	1.4
  +++ Untar.java	2000/07/06 16:48:19	1.5
  @@ -94,7 +94,7 @@
               }
               File dir=project.resolveFile(dest);
   
  -            project.log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
  +            log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
               // code from WarExpand
               TarInputStream tis = new TarInputStream(new FileInputStream(srcF));
               TarEntry te = null;
  @@ -102,8 +102,7 @@
               while ((te = tis.getNextEntry()) != null) {
                   try {
                       File f = new File(dir, project.translatePath(te.getName()));
  -                    project.log("expand-file " + te.getName() , "untar", 
  -                                Project.MSG_VERBOSE );
  +                    log("expand-file " + te.getName(), Project.MSG_VERBOSE );
                       // create intermediary directories - sometimes tar don't add them
                       File dirF=new File(f.getParent());
                       dirF.mkdirs();
  @@ -129,8 +128,8 @@
                       }
   
                   } catch(FileNotFoundException ex) {
  -                    project.log("FileNotFoundException: " + te.getName(),
  -                                Project.MSG_WARN);
  +                    log("FileNotFoundException: " + te.getName(),
  +                        Project.MSG_WARN);
                   }
               }
           } catch (IOException ioe) {
  
  
  
  1.5       +7 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  
  Index: XSLTProcess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XSLTProcess.java	2000/06/30 15:12:51	1.4
  +++ XSLTProcess.java	2000/07/06 16:48:19	1.5
  @@ -83,7 +83,7 @@
    *
    * @author <a href="mailto:kvisco@exoffice.com">Keith Visco</a>
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version $Revision: 1.4 $ $Date: 2000/06/30 15:12:51 $
  + * @version $Revision: 1.5 $ $Date: 2000/07/06 16:48:19 $
    */
   public class XSLTProcess extends MatchingTask {
   
  @@ -120,7 +120,7 @@
   	    throw new BuildException(msg);
   	}
   	scanner = getDirectoryScanner(baseDir);
  -	project.log("Transforming into "+destDir,project.MSG_INFO);
  +	log("Transforming into "+destDir, Project.MSG_INFO);
   
           // if processor wasn't specified, default it to xslp or xalan,
           // depending on which is in the classpath
  @@ -136,17 +136,17 @@
              }
           }
   
  -	project.log("Using "+liaison.getClass().toString(),project.MSG_VERBOSE);
  +	log("Using "+liaison.getClass().toString(), Project.MSG_VERBOSE);
   
   	try {
   	    // Create a new XSL processor with the specified stylesheet
   	    if (xslFile != null) {
                   String file = new File(baseDir,xslFile.toString()).toString();
  -		project.log("Loading stylesheet " + file, project.MSG_INFO);
  +		log("Loading stylesheet " + file, Project.MSG_INFO);
                   liaison.setStylesheet( file );
   	    }
   	} catch (Exception ex) {
  -	    project.log("Failed to read stylesheet " + xslFile,project.MSG_INFO);
  +	    log("Failed to read stylesheet " + xslFile, Project.MSG_INFO);
               throw new BuildException(ex);
   	}
   
  @@ -296,7 +296,7 @@
   	    outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt);
   	    if (inFile.lastModified() > outFile.lastModified()) {
   		//-- command line status
  -		project.log("Processing " + xmlFile + " to " + outFile,project.MSG_VERBOSE);
  +		log("Processing " + xmlFile + " to " + outFile, Project.MSG_VERBOSE);
   
   		liaison.transform(inFile.toString(), outFile.toString());
   	    }
  @@ -304,7 +304,7 @@
           catch (Exception ex) {
   	    // If failed to process document, must delete target document,
   	    // or it will not attempt to process it the second time
  -	    project.log("Failed to process " + inFile,project.MSG_INFO);
  +	    log("Failed to process " + inFile, Project.MSG_INFO);
   	    outFile.delete();
               throw new BuildException(ex);
           }
  
  
  
  1.8       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Zip.java	2000/06/27 11:12:12	1.7
  +++ Zip.java	2000/07/06 16:48:19	1.8
  @@ -120,7 +120,7 @@
                   upToDate = false;
           if (upToDate) return;
   
  -        project.log("Building "+ archiveType +": "+ zipFile.getAbsolutePath());
  +        log("Building "+ archiveType +": "+ zipFile.getAbsolutePath());
   
           try {
               ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(zipFile));
  
  
  
  1.4       +10 -10    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
  
  Index: NetRexxC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NetRexxC.java	2000/06/24 12:57:24	1.3
  +++ NetRexxC.java	2000/07/06 16:48:26	1.4
  @@ -442,7 +442,7 @@
   
           // compile the source files
           if (compileList.size() > 0) {
  -            project.log("Compiling " + compileList.size() + " source files to " + destDir);
  +            log("Compiling " + compileList.size() + " source files to " + destDir);
               doNetRexxCompile();
           }
       }
  @@ -479,7 +479,7 @@
        */
       private void copyFilesToDestination() {
           if (filecopyList.size() > 0) {
  -            project.log("Copying " + filecopyList.size() + " files to " + destDir.getAbsolutePath());
  +            log("Copying " + filecopyList.size() + " files to " + destDir.getAbsolutePath());
               Enumeration enum = filecopyList.keys();
               while (enum.hasMoreElements()) {
                   String fromFile = (String)enum.nextElement();
  @@ -499,7 +499,7 @@
        * Peforms a copmile using the NetRexx 1.1.x compiler
        */
       private void doNetRexxCompile() throws BuildException {
  -        project.log("Using NetRexx compiler", project.MSG_VERBOSE);
  +        log("Using NetRexx compiler", Project.MSG_VERBOSE);
           String classpath = getCompileClasspath();
           StringBuffer compileOptions = new StringBuffer();
           StringBuffer fileList = new StringBuffer();
  @@ -529,7 +529,7 @@
               compileOptions.append(compileOptionsArray[i]);
               compileOptions.append(" ");
           }
  -        project.log(compileOptions.toString(), project.MSG_VERBOSE);
  +        log(compileOptions.toString(), Project.MSG_VERBOSE);
   
           String eol = System.getProperty("line.separator");
           StringBuffer niceSourceList = new StringBuffer("Files to be compiled:" + eol);
  @@ -540,7 +540,7 @@
               niceSourceList.append(eol);
           }
   
  -        project.log(niceSourceList.toString(), project.MSG_VERBOSE);
  +        log(niceSourceList.toString(), Project.MSG_VERBOSE);
   
           // need to set java.class.path property and restore it later
           // since the NetRexx compiler has no option for the classpath
  @@ -554,15 +554,15 @@
                  new Rexx(compileArgs), new PrintWriter(out));
   
               if (rc > 1) { // 1 is warnings from real NetRexxC
  -                project.log(out.toString(), Project.MSG_ERR);
  +                log(out.toString(), Project.MSG_ERR);
                   String msg = "Compile failed, messages should have been provided.";
                   throw new BuildException(msg);
               }
               else if (rc == 1) {
  -                project.log(out.toString(), Project.MSG_WARN);
  +                log(out.toString(), Project.MSG_WARN);
               }
               else {
  -                project.log(out.toString(), Project.MSG_INFO);
  +                log(out.toString(), Project.MSG_INFO);
               }        
           } finally {
               // need to reset java.class.path property
  @@ -648,8 +648,8 @@
                   target.append(File.pathSeparator);
                   target.append(f.getAbsolutePath());
               } else {
  -                project.log("Dropping from classpath: "+
  -                f.getAbsolutePath(),project.MSG_VERBOSE);
  +                log("Dropping from classpath: "+
  +                f.getAbsolutePath(), Project.MSG_VERBOSE);
               }
           }
   
  
  
  
  1.4       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java
  
  Index: RenameExtensions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RenameExtensions.java	2000/06/29 15:32:43	1.3
  +++ RenameExtensions.java	2000/07/06 16:48:27	1.4
  @@ -151,10 +151,10 @@
                   if (replace || !destFile.exists()) {
                       list.put(srcFile, destFile);
                   } else {
  -                    project.log("Rejecting file: '" + srcFile + "' for rename as replace is false and file exists", Project.MSG_VERBOSE);
  +                    log("Rejecting file: '" + srcFile + "' for rename as replace is false and file exists", Project.MSG_VERBOSE);
                   }
               } else {
  -                project.log("File '"+ filename + "' doesn't match fromExtension: '" + fromExtension + "'", Project.MSG_VERBOSE);
  +                log("File '"+ filename + "' doesn't match fromExtension: '" + fromExtension + "'", Project.MSG_VERBOSE);
               }
           }
           return list;
  
  
  

Mime
View raw message