ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types DataType.java
Date Sat, 25 Nov 2000 02:38:56 GMT
donaldp     00/11/24 18:38:54

  Modified:    src/main/org/apache/tools/ant BuildEvent.java
                        BuildException.java DefaultLogger.java
                        DesirableFilter.java FileScanner.java Location.java
                        Project.java Target.java Task.java TaskAdapter.java
               src/main/org/apache/tools/ant/taskdefs Ant.java Execute.java
                        ExecuteWatchdog.java Expand.java Filter.java
                        GZip.java Jar.java Javadoc.java
                        JikesOutputParser.java MatchingTask.java Mkdir.java
                        SQLExec.java Tar.java Taskdef.java Untar.java
                        War.java XSLTProcess.java Zip.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        NetRexxC.java Script.java
               src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        CSharp.java Ilasm.java NetCommand.java
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        GenericDeploymentTool.java
                        InnerClassFilenameFilter.java
               src/main/org/apache/tools/ant/taskdefs/optional/ide
                        VAJExport.java VAJImport.java VAJLoadProjects.java
                        VAJUtil.java VAJWorkspaceScanner.java
               src/main/org/apache/tools/ant/taskdefs/optional/jlink
                        ClassNameReader.java JlinkTask.java jlink.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
               src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
               src/main/org/apache/tools/ant/taskdefs/optional/vss
                        MSVSS.java
               src/main/org/apache/tools/ant/types DataType.java
  Log:
  Used some elisp magic to remove those tabs and replace with spaces.
  
  Revision  Changes    Path
  1.4       +1 -3      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BuildEvent.java	2000/07/10 11:21:39	1.3
  +++ BuildEvent.java	2000/11/25 02:38:33	1.4
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant;
   
   import java.util.EventObject;
  @@ -64,7 +63,6 @@
       private int priority = Project.MSG_VERBOSE;
       private Throwable exception;
   
  -    
       /**
        * Construct a BuildEvent for a project level event
        *
  @@ -163,4 +161,4 @@
       public Throwable getException() {
           return exception;
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.8       +10 -19    jakarta-ant/src/main/org/apache/tools/ant/BuildException.java
  
  Index: BuildException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/BuildException.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BuildException.java	2000/07/24 13:23:25	1.7
  +++ BuildException.java	2000/11/25 02:38:34	1.8
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant;
   
   /**
  @@ -59,7 +58,6 @@
    *
    * @author James Duncan Davidson
    */
  -
   public class BuildException extends RuntimeException {
   
       /** Exception that might have caused this one. */
  @@ -71,18 +69,16 @@
       /**
        * Constructs a build exception with no descriptive information.
        */
  -
       public BuildException() {
  -	super();
  +        super();
       }
   
       /**
        * Constructs an exception with the given descriptive message.
        * @param msg Description of or information about the exception.
        */
  -
       public BuildException(String msg) {
  -	super(msg);
  +        super(msg);
       }
   
       /**
  @@ -91,10 +87,9 @@
        * @param msg Description of or information about the exception.
        * @param cause Throwable that might have cause this one.
        */
  -
       public BuildException(String msg, Throwable cause) {
  -	super(msg);
  -	this.cause = cause;
  +        super(msg);
  +        this.cause = cause;
       }
   
       /**
  @@ -104,20 +99,18 @@
        * @param cause Exception that might have cause this one.
        * @param location Location in the project file where the error occured.
        */
  -
       public BuildException(String msg, Throwable cause, Location location) {
           this(msg, cause);
  -	this.location = location;
  +        this.location = location;
       }
   
       /**
        * Constructs an exception with the given exception as a root cause.
        * @param cause Exception that might have caused this one.
        */
  -
       public BuildException(Throwable cause) {
  -	super(cause.toString());
  -	this.cause = cause;
  +        super(cause.toString());
  +        this.cause = cause;
       }
   
       /**
  @@ -126,10 +119,9 @@
        * @param msg Description of or information about the exception.
        * @param location Location in the project file where the error occured.
        */
  -
       public BuildException(String msg, Location location) {
  -	super(msg);
  -	this.location = location;
  +        super(msg);
  +        this.location = location;
       }
   
       /**
  @@ -138,10 +130,9 @@
        * @param cause Exception that might have cause this one.
        * @param location Location in the project file where the error occured.
        */
  -
       public BuildException(Throwable cause, Location location) {
           this(cause);
  -	this.location = location;
  +        this.location = location;
       }
   
       /**
  
  
  
  1.10      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java
  
  Index: DefaultLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DefaultLogger.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultLogger.java	2000/09/21 07:42:47	1.9
  +++ DefaultLogger.java	2000/11/25 02:38:34	1.10
  @@ -68,7 +68,7 @@
       protected PrintStream err;
       protected int msgOutputLevel;
       private long startTime = System.currentTimeMillis();
  -	
  +
       protected static String lSep = System.getProperty("line.separator");
   
       protected boolean emacsMode = false;
  
  
  
  1.2       +34 -35    jakarta-ant/src/main/org/apache/tools/ant/DesirableFilter.java
  
  Index: DesirableFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/DesirableFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DesirableFilter.java	2000/01/13 10:41:40	1.1
  +++ DesirableFilter.java	2000/11/25 02:38:34	1.2
  @@ -55,8 +55,8 @@
   package org.apache.tools.ant;
   
   import java.io.File;
  -import java.io.IOException;
   import java.io.FilenameFilter;
  +import java.io.IOException;
   
   /**
    * Filters filenames to determine whether or not the file is desirable.
  @@ -64,7 +64,6 @@
    * @author Jason Hunter [jhunter@servlets.com]
    * @author james@x180.com
    */
  -
   public class DesirableFilter implements FilenameFilter {
   
       /**
  @@ -73,40 +72,40 @@
        */
   
       public boolean accept(File dir, String name) {
  -
  -	// emacs save file
  -	if (name.endsWith("~")) {
  -	    return false;
  -	}
  -
  -	// emacs autosave file
  -	if (name.startsWith("#") && name.endsWith("#")) {
  -	    return false;
  -	}
  -
  -	// openwindows text editor does this I think
  -	if (name.startsWith("%") && name.endsWith("%")) {
  -	    return false;
  -	}
  -
  -	/* CVS stuff -- hopefully there won't be a case with
  -	 * an all cap file/dir named "CVS" that somebody wants
  -	 * to keep around...
  -	 */
  -	
  -	if (name.equals("CVS")) {
  -	    return false;
  -	}
  -	
  -    /* If we are going to ignore CVS might as well ignore 
  -     * this one as well...
  -     */
  -    if (name.equals(".cvsignore")){
  -        return false;
  -    }
  +        
  +        // emacs save file
  +        if (name.endsWith("~")) {
  +            return false;
  +        }
  +
  +        // emacs autosave file
  +        if (name.startsWith("#") && name.endsWith("#")) {
  +            return false;
  +        }
  +
  +        // openwindows text editor does this I think
  +        if (name.startsWith("%") && name.endsWith("%")) {
  +            return false;
  +        }
  +
  +        /* CVS stuff -- hopefully there won't be a case with
  +         * an all cap file/dir named "CVS" that somebody wants
  +         * to keep around...
  +         */
  +        
  +        if (name.equals("CVS")) {
  +            return false;
  +        }
  +        
  +        /* If we are going to ignore CVS might as well ignore 
  +         * this one as well...
  +         */
  +        if (name.equals(".cvsignore")){
  +            return false;
  +        }
       
  -	// default
  -	return true;
  +        // default
  +        return true;
       }
   }
   
  
  
  
  1.2       +93 -93    jakarta-ant/src/main/org/apache/tools/ant/FileScanner.java
  
  Index: FileScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/FileScanner.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileScanner.java	2000/08/21 14:36:03	1.1
  +++ FileScanner.java	2000/11/25 02:38:34	1.2
  @@ -7,96 +7,96 @@
    * directory scanner.
    */
   public interface FileScanner {
  -	/**
  -	 * Adds an array with default exclusions to the current exclusions set.
  -	 *
  -	 */
  -	public void addDefaultExcludes();
  -	/**
  -	 * Gets the basedir that is used for scanning. This is the directory that
  -	 * is scanned recursively.
  -	 *
  -	 * @return the basedir that is used for scanning
  -	 */
  -	public File getBasedir();
  -	/**
  -	 * Get the names of the directories that matched at least one of the include
  -	 * patterns, an matched also at least one of the exclude patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the directories
  -	 */
  -	public String[] getExcludedDirectories();
  -	/**
  -	 * Get the names of the files that matched at least one of the include
  -	 * patterns, an matched also at least one of the exclude patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the files
  -	 */
  -	public String[] getExcludedFiles();
  -	/**
  -	 * Get the names of the directories that matched at least one of the include
  -	 * patterns, an matched none of the exclude patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the directories
  -	 */
  -	public String[] getIncludedDirectories();
  -	/**
  -	 * Get the names of the files that matched at least one of the include
  -	 * patterns, an matched none of the exclude patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the files
  -	 */
  -	public String[] getIncludedFiles();
  -	/**
  -	 * Get the names of the directories that matched at none of the include
  -	 * patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the directories
  -	 */
  -	public String[] getNotIncludedDirectories();
  -	/**
  -	 * Get the names of the files that matched at none of the include patterns.
  -	 * The names are relative to the basedir.
  -	 *
  -	 * @return the names of the files
  -	 */
  -	public String[] getNotIncludedFiles();
  -	/**
  -	 * Scans the base directory for files that match at least one include
  -	 * pattern, and don't match any exclude patterns.
  -	 *
  -	 * @exception IllegalStateException when basedir was set incorrecly
  -	 */
  -	public void scan();
  -	/**
  -	 * Sets the basedir for scanning. This is the directory that is scanned
  -	 * recursively. 
  -	 *
  -	 * @param basedir the (non-null) basedir for scanning
  -	 */
  -	public void setBasedir(String basedir);
  -	/**
  -	 * Sets the basedir for scanning. This is the directory that is scanned
  -	 * recursively.
  -	 *
  -	 * @param basedir the basedir for scanning
  -	 */
  -	public void setBasedir(File basedir);
  -	/**
  -	 * Sets the set of exclude patterns to use.
  -	 *
  -	 * @param excludes list of exclude patterns
  -	 */
  -	public void setExcludes(String[] excludes);
  -	/**
  -	 * Sets the set of include patterns to use.
  -	 *
  -	 * @param includes list of include patterns
  -	 */
  -	public void setIncludes(String[] includes);
  -}
  \ No newline at end of file
  +    /**
  +     * Adds an array with default exclusions to the current exclusions set.
  +     *
  +     */
  +    public void addDefaultExcludes();
  +    /**
  +     * Gets the basedir that is used for scanning. This is the directory that
  +     * is scanned recursively.
  +     *
  +     * @return the basedir that is used for scanning
  +     */
  +    public File getBasedir();
  +    /**
  +     * Get the names of the directories that matched at least one of the include
  +     * patterns, an matched also at least one of the exclude patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the directories
  +     */
  +    public String[] getExcludedDirectories();
  +    /**
  +     * Get the names of the files that matched at least one of the include
  +     * patterns, an matched also at least one of the exclude patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the files
  +     */
  +    public String[] getExcludedFiles();
  +    /**
  +     * Get the names of the directories that matched at least one of the include
  +     * patterns, an matched none of the exclude patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the directories
  +     */
  +    public String[] getIncludedDirectories();
  +    /**
  +     * Get the names of the files that matched at least one of the include
  +     * patterns, an matched none of the exclude patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the files
  +     */
  +    public String[] getIncludedFiles();
  +    /**
  +     * Get the names of the directories that matched at none of the include
  +     * patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the directories
  +     */
  +    public String[] getNotIncludedDirectories();
  +    /**
  +     * Get the names of the files that matched at none of the include patterns.
  +     * The names are relative to the basedir.
  +     *
  +     * @return the names of the files
  +     */
  +    public String[] getNotIncludedFiles();
  +    /**
  +     * Scans the base directory for files that match at least one include
  +     * pattern, and don't match any exclude patterns.
  +     *
  +     * @exception IllegalStateException when basedir was set incorrecly
  +     */
  +    public void scan();
  +    /**
  +     * Sets the basedir for scanning. This is the directory that is scanned
  +     * recursively. 
  +     *
  +     * @param basedir the (non-null) basedir for scanning
  +     */
  +    public void setBasedir(String basedir);
  +    /**
  +     * Sets the basedir for scanning. This is the directory that is scanned
  +     * recursively.
  +     *
  +     * @param basedir the basedir for scanning
  +     */
  +    public void setBasedir(File basedir);
  +    /**
  +     * Sets the set of exclude patterns to use.
  +     *
  +     * @param excludes list of exclude patterns
  +     */
  +    public void setExcludes(String[] excludes);
  +    /**
  +     * Sets the set of include patterns to use.
  +     *
  +     * @param includes list of include patterns
  +     */
  +    public void setIncludes(String[] includes);
  +}
  
  
  
  1.2       +52 -52    jakarta-ant/src/main/org/apache/tools/ant/Location.java
  
  Index: Location.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Location.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Location.java	2000/04/26 21:21:04	1.1
  +++ Location.java	2000/11/25 02:38:34	1.2
  @@ -55,57 +55,57 @@
   package org.apache.tools.ant;
   
   /**
  - *	Stores the file name and line number in a file.
  + * Stores the file name and line number in a file.
    */
   public class Location {
  -	private String fileName;
  -	private int lineNumber;
  -	private int columnNumber;
  -
  -	public static final Location UNKNOWN_LOCATION = new Location();
  -
  -	/**
  -	 *	Creates an "unknown" location.
  -	 */
  -	private Location() {
  -		this(null, 0, 0);
  -	}
  -
  -	/**
  -	 *	Creates a location consisting of a file name but no line number.
  -	 */
  -	public Location(String fileName) {
  -		this(fileName, 0, 0);
  -	}
  -
  -	/**
  -	 *	Creates a location consisting of a file name and line number.
  -	 */
  -	public Location(String fileName, int lineNumber, int columnNumber) {
  -		this.fileName = fileName;
  -		this.lineNumber = lineNumber;
  -		this.columnNumber = columnNumber;
  -	}
  -
  -	/**
  -	 *	Returns the file name, line number and a trailing space. An error
  -	 *	message can be appended easily. For unknown locations, returns
  -	 *	an empty string.
  -	 */
  -	public String toString() {
  -		StringBuffer buf = new StringBuffer();
  -
  -		if (fileName != null) {
  -			buf.append(fileName);
  -
  -			if (lineNumber != 0) {
  -				buf.append(":");
  -				buf.append(lineNumber);
  -			}
  -
  -			buf.append(": ");
  -		}
  -
  -		return buf.toString();
  -	}
  -}
  \ No newline at end of file
  +    private String fileName;
  +    private int lineNumber;
  +    private int columnNumber;
  +
  +    public static final Location UNKNOWN_LOCATION = new Location();
  +
  +    /**
  +     * Creates an "unknown" location.
  +     */
  +    private Location() {
  +        this(null, 0, 0);
  +    }
  +
  +    /**
  +     * Creates a location consisting of a file name but no line number.
  +     */
  +    public Location(String fileName) {
  +        this(fileName, 0, 0);
  +    }
  +
  +    /**
  +     * Creates a location consisting of a file name and line number.
  +     */
  +    public Location(String fileName, int lineNumber, int columnNumber) {
  +        this.fileName = fileName;
  +        this.lineNumber = lineNumber;
  +        this.columnNumber = columnNumber;
  +    }
  +
  +    /**
  +     * Returns the file name, line number and a trailing space. An error
  +     * message can be appended easily. For unknown locations, returns
  +     * an empty string.
  +     */
  +    public String toString() {
  +        StringBuffer buf = new StringBuffer();
  +
  +        if (fileName != null) {
  +            buf.append(fileName);
  +
  +            if (lineNumber != 0) {
  +                buf.append(":");
  +                buf.append(lineNumber);
  +            }
  +
  +            buf.append(": ");
  +        }
  +
  +        return buf.toString();
  +    }
  +}
  
  
  
  1.45      +3 -3      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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Project.java	2000/10/10 16:27:22	1.44
  +++ Project.java	2000/11/25 02:38:34	1.45
  @@ -316,7 +316,7 @@
   
       public void setBaseDir(File baseDir) {
           this.baseDir = baseDir;
  -	setProperty( "basedir", baseDir.getAbsolutePath());
  +        setProperty( "basedir", baseDir.getAbsolutePath());
           String msg = "Project base dir set to: " + baseDir;
           log(msg, MSG_VERBOSE);
       }
  @@ -429,7 +429,7 @@
       public Task createTask(String taskType) throws BuildException {
           Class c = (Class) taskClassDefinitions.get(taskType);
   
  -	if (c == null)
  +        if (c == null)
               return null;
           try {
               Object o = c.newInstance();
  @@ -462,7 +462,7 @@
       public Object createDataType(String typeName) throws BuildException {
           Class c = (Class) dataClassDefinitions.get(typeName);
   
  -	if (c == null)
  +        if (c == null)
               return null;
   
           try {
  
  
  
  1.13      +2 -2      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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Target.java	2000/09/18 15:38:38	1.12
  +++ Target.java	2000/11/25 02:38:34	1.13
  @@ -139,9 +139,9 @@
                   try {
                       project.fireTaskStarted(task);
                       task.maybeConfigure();
  -               	    task.execute();
  +                    task.execute();
                       project.fireTaskFinished(task, null);
  -		}
  +                }
                   catch(RuntimeException exc) {
                       if (exc instanceof BuildException) {
                           BuildException be = (BuildException) exc;
  
  
  
  1.15      +2 -2      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Task.java	2000/09/18 14:04:53	1.14
  +++ Task.java	2000/11/25 02:38:34	1.15
  @@ -160,11 +160,11 @@
        *  what we are doing.
        */
       public void setDescription( String desc ) {
  -	description=desc;
  +        description=desc;
       }
   
       public String getDescription() {
  -	return description;
  +        return description;
       }
   
       /**
  
  
  
  1.4       +14 -14    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TaskAdapter.java	2000/07/06 16:48:10	1.3
  +++ TaskAdapter.java	2000/11/25 02:38:34	1.4
  @@ -71,20 +71,20 @@
        * Do the execution.
        */
       public void execute() throws BuildException {
  -	Method executeM=null;
  -	try {
  -	    Class c=proxy.getClass();
  -	    executeM=c.getMethod( "execute", new Class[0] );
  -	    if( executeM == null ) {
  -		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 ) {
  -	    log("Error in " + proxy.getClass(), Project.MSG_ERR);
  -	    throw new BuildException( ex );
  -	}
  +        Method executeM=null;
  +        try {
  +            Class c=proxy.getClass();
  +            executeM=c.getMethod( "execute", new Class[0] );
  +            if( executeM == null ) {
  +                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 ) {
  +            log("Error in " + proxy.getClass(), Project.MSG_ERR);
  +            throw new BuildException( ex );
  +        }
   
       }
       
  
  
  
  1.20      +4 -4      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Ant.java	2000/10/16 09:09:10	1.19
  +++ Ant.java	2000/11/25 02:38:36	1.20
  @@ -238,9 +238,9 @@
               reinit();
           }
   
  -	Property p=(Property)p1.createTask("property");
  -	p.setUserProperty(true);
  -	properties.addElement( p );
  -	return p;
  +        Property p=(Property)p1.createTask("property");
  +        p.setUserProperty(true);
  +        properties.addElement( p );
  +        return p;
       }
   }
  
  
  
  1.9       +32 -31    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Execute.java	2000/09/28 13:44:53	1.8
  +++ Execute.java	2000/11/25 02:38:36	1.9
  @@ -221,10 +221,10 @@
        * @param wd the working directory of the process.
        */
       public void setWorkingDirectory(File wd) {
  -	if (wd == null || wd.getAbsolutePath().equals(antWorkingDirectory))
  -	    workingDirectory = null;
  -	else
  -	    workingDirectory = wd;
  +        if (wd == null || wd.getAbsolutePath().equals(antWorkingDirectory))
  +            workingDirectory = null;
  +        else
  +            workingDirectory = wd;
       }
   
       /**
  @@ -383,11 +383,12 @@
            * Launches the given command in a new process, in the given working
            * directory
            */
  -        public Process exec(Project project, String[] cmd, String[] env, File workingDir) throws IOException
  +        public Process exec(Project project, String[] cmd, String[] env, File workingDir) 
  +            throws IOException
           {
  - 	    try {
  -		Object[] arguments = { cmd, env, workingDir };
  -		return (Process)_execWithCWD.invoke(Runtime.getRuntime(), arguments);
  +            try {
  +                Object[] arguments = { cmd, env, workingDir };
  +                return (Process)_execWithCWD.invoke(Runtime.getRuntime(), arguments);
               } 
               catch ( InvocationTargetException exc ) {
                   Throwable realexc = exc.getTargetException();
  @@ -400,16 +401,16 @@
                   else {
                       throw new IOException(realexc.getMessage());
                   }
  -	    } 
  +            } 
               catch ( Exception exc ) {
  -		// IllegalAccess, IllegalArgument, ClassCast
  -		throw new IOException(exc.getMessage());
  -	    }
  +                // IllegalAccess, IllegalArgument, ClassCast
  +                throw new IOException(exc.getMessage());
  +            }
           }
  -
  +        
           private Method _execWithCWD;
       }
  -
  +    
       /**
        * A command launcher that proxies another command launcher.  
        *
  @@ -458,13 +459,13 @@
   
               // Use cmd.exe to change to the specified directory before running
               // the command
  -	    String[] newcmd = new String[cmd.length+5];
  -	    newcmd[0] = "cmd";
  -	    newcmd[1] = "/c";
  -	    newcmd[2] = "cd";
  -	    newcmd[3] = workingDir.getAbsolutePath();
  -	    newcmd[4] = "&&";
  -	    System.arraycopy(cmd, 0, newcmd, 5, cmd.length);
  +            String[] newcmd = new String[cmd.length+5];
  +            newcmd[0] = "cmd";
  +            newcmd[1] = "/c";
  +            newcmd[2] = "cd";
  +            newcmd[3] = workingDir.getAbsolutePath();
  +            newcmd[4] = "&&";
  +            System.arraycopy(cmd, 0, newcmd, 5, cmd.length);
               return exec(project, newcmd, env);
           }
       }
  @@ -490,13 +491,13 @@
                   return exec(project, cmd, env);
               }
   
  -	    System.getProperties().put("user.dir", workingDir.getAbsolutePath());
  -	    try {
  -		return exec(project, cmd, env);
  -	    } 
  +            System.getProperties().put("user.dir", workingDir.getAbsolutePath());
  +            try {
  +                return exec(project, cmd, env);
  +            } 
               finally {
                   System.getProperties().put("user.dir", antWorkingDirectory);
  -	    }
  +            }
           }
       }
   
  @@ -533,11 +534,11 @@
               String antRun = project.resolveFile(antHome + File.separator + _script).toString();
   
               // Build the command
  -	    String[] newcmd = new String[cmd.length + 2];
  -	    newcmd[0] = antRun;
  -	    newcmd[1] = workingDir.getAbsolutePath();
  -	    System.arraycopy(cmd, 0, newcmd, 2, cmd.length);
  -
  +            String[] newcmd = new String[cmd.length + 2];
  +            newcmd[0] = antRun;
  +            newcmd[1] = workingDir.getAbsolutePath();
  +            System.arraycopy(cmd, 0, newcmd, 2, cmd.length);
  +            
               return exec(project, newcmd, env);
           }
   
  
  
  
  1.2       +16 -16    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java
  
  Index: ExecuteWatchdog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExecuteWatchdog.java	2000/07/19 13:00:31	1.1
  +++ ExecuteWatchdog.java	2000/11/25 02:38:36	1.2
  @@ -116,25 +116,25 @@
        * Watches the process and terminates it, if it runs for to long.
        */
       public synchronized void run() {
  -	try {
  -	    // This isn't a Task, don't have a Project object to log.
  -	    // project.log("ExecuteWatchdog: timeout = "+timeout+" msec",  Project.MSG_VERBOSE);
  -	    final long until = System.currentTimeMillis() + timeout;
  -	    long now;
  -	    while (watch && until > (now = System.currentTimeMillis())) {
  -		try {
  -		    wait(until - now);
  -		} catch (InterruptedException e) {}
  -	    }
  -	    if (watch) {
  -		process.destroy();
  -	    }
  -	    stop();
  -	} catch(Exception e) {
  +        try {
  +            // This isn't a Task, don't have a Project object to log.
  +            // project.log("ExecuteWatchdog: timeout = "+timeout+" msec",  Project.MSG_VERBOSE);
  +            final long until = System.currentTimeMillis() + timeout;
  +            long now;
  +            while (watch && until > (now = System.currentTimeMillis())) {
  +                try {
  +                    wait(until - now);
  +                } catch (InterruptedException e) {}
  +            }
  +            if (watch) {
  +                process.destroy();
  +            }
  +            stop();
  +        } catch(Exception e) {
               caught = e;
           }
       }
  -
  +    
       public void checkException() throws BuildException {
           if (caught != null) {
               throw new BuildException("Exception in ExecuteWatchdog.run: "
  
  
  
  1.12      +46 -47    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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Expand.java	2000/09/18 07:55:00	1.11
  +++ Expand.java	2000/11/25 02:38:36	1.12
  @@ -110,58 +110,57 @@
   
       private void expandFile(Touch touch, File srcF, File dir) {
           ZipInputStream zis = null;
  -	try {
  -	    
  -	    log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
  -	    // code from WarExpand
  -	    zis = new ZipInputStream(new FileInputStream(srcF));
  -	    ZipEntry ze = null;
  -	    
  -	    while ((ze = zis.getNextEntry()) != null) {
  -		File f = new File(dir, project.translatePath(ze.getName()));
  -		try {
  -		    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();
  -		    
  -		    if (ze.isDirectory()) {
  -			f.mkdirs(); 
  -		    } else {
  -			byte[] buffer = new byte[1024];
  -			int length = 0;
  -			FileOutputStream fos = new FileOutputStream(f);
  -			
  -			while ((length = zis.read(buffer)) >= 0) {
  -			    fos.write(buffer, 0, length);
  -			}
  -			
  -			fos.close();
  -		    }
  +        try {
  +            log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
  +            // code from WarExpand
  +            zis = new ZipInputStream(new FileInputStream(srcF));
  +            ZipEntry ze = null;
   
  +            while ((ze = zis.getNextEntry()) != null) {
  +                File f = new File(dir, project.translatePath(ze.getName()));
  +                try {
  +                    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();
  +                    
  +                    if (ze.isDirectory()) {
  +                        f.mkdirs(); 
  +                    } else {
  +                        byte[] buffer = new byte[1024];
  +                        int length = 0;
  +                        FileOutputStream fos = new FileOutputStream(f);
  +                        
  +                        while ((length = zis.read(buffer)) >= 0) {
  +                            fos.write(buffer, 0, length);
  +                        }
  +                        
  +                        fos.close();
  +                    }
  +                    
                       if (project.getJavaVersion() != Project.JAVA_1_1) {
                           touch.setFile(f);
                           touch.setMillis(ze.getTime());
                           touch.touch();
                       }
  -
  -		} catch( FileNotFoundException ex ) {
  -		    log("Unable to expand to file " + f.getPath(), Project.MSG_WARN);
  -		}
  -	    }
  -	    log("expand complete", Project.MSG_VERBOSE );
  -	} catch (IOException ioe) {
  -	    throw new BuildException("Error while expanding " + srcF.getPath(), ioe);
  -	} finally {
  -	    if (zis != null) {
  -	        try {
  -	            zis.close();
  -	        }
  -	        catch (IOException e) {}
  -	    }
  -	}
  +                    
  +                } catch( FileNotFoundException ex ) {
  +                    log("Unable to expand to file " + f.getPath(), Project.MSG_WARN);
  +                }
  +            }
  +            log("expand complete", Project.MSG_VERBOSE );
  +        } catch (IOException ioe) {
  +            throw new BuildException("Error while expanding " + srcF.getPath(), ioe);
  +        } finally {
  +            if (zis != null) {
  +                try {
  +                    zis.close();
  +                }
  +                catch (IOException e) {}
  +            }
  +        }
       }
  -
  +    
       /**
        * Set the destination directory. File will be unzipped into the
        * destination directory.
  @@ -169,7 +168,7 @@
        * @param d Path to the directory.
        */
       public void setDest(File d) {
  -	this.dest=d;
  +        this.dest=d;
       }
   
       /**
  @@ -178,6 +177,6 @@
        * @param s Path to zip-file.
        */
       public void setSrc(File s) {
  -	this.source = s;
  +        this.source = s;
       }
   }
  
  
  
  1.7       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Filter.java
  
  Index: Filter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Filter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Filter.java	2000/10/05 07:48:37	1.6
  +++ Filter.java	2000/11/25 02:38:36	1.7
  @@ -114,7 +114,7 @@
   
               Project proj = getProject();
   
  -            Enumeration enum = props.propertyNames();		
  +            Enumeration enum = props.propertyNames();
               while (enum.hasMoreElements()) {
                   String strPropName = (String)enum.nextElement();
                   String strValue = props.getProperty(strPropName);
  
  
  
  1.6       +8 -8      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GZip.java	2000/09/18 07:55:00	1.5
  +++ GZip.java	2000/11/25 02:38:36	1.6
  @@ -103,17 +103,17 @@
           } catch (IOException ioe) {
               String msg = "Problem creating gzip " + ioe.getMessage();
               throw new BuildException(msg, ioe, location);
  -	} finally {
  -	    if (zOut != null) {
  -	        try {
  +        } finally {
  +            if (zOut != null) {
  +                try {
                       // close up
  -	            zOut.close();
  -	        }
  -	        catch (IOException e) {}
  -	    }
  +                    zOut.close();
  +                }
  +                catch (IOException e) {}
  +            }
           }
       }
  -
  +    
       private void zipFile(InputStream in, GZIPOutputStream zOut)
           throws IOException
       {        
  
  
  
  1.8       +16 -16    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java
  
  Index: Jar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Jar.java	2000/09/15 11:41:18	1.7
  +++ Jar.java	2000/11/25 02:38:37	1.8
  @@ -71,39 +71,39 @@
       
       public Jar() {
           super();
  -	archiveType = "jar";
  +        archiveType = "jar";
           emptyBehavior = "create";
       }
   
       public void setJarfile(File jarFile) {
  -	super.setZipfile(jarFile);
  +        super.setZipfile(jarFile);
       }
       
       public void setManifest(File manifestFile) {
  -	manifest = manifestFile;
  +        manifest = manifestFile;
       }
   
       protected void initZipOutputStream(ZipOutputStream zOut)
  -	throws IOException, BuildException
  +        throws IOException, BuildException
       {
  -	// add manifest first
  -	if (manifest != null) {
  +        // add manifest first
  +        if (manifest != null) {
               zipDir(new File(manifest.getParent()), zOut, "META-INF/");
  -	    super.zipFile(manifest, zOut, "META-INF/MANIFEST.MF");
  -	} else {
  -	    String s = "/org/apache/tools/ant/defaultManifest.mf";
  -	    InputStream in = this.getClass().getResourceAsStream(s);
  +            super.zipFile(manifest, zOut, "META-INF/MANIFEST.MF");
  +        } else {
  +            String s = "/org/apache/tools/ant/defaultManifest.mf";
  +            InputStream in = this.getClass().getResourceAsStream(s);
               if ( in == null )
  -		throw new BuildException ( "Could not find: " + s );
  -	    zipDir(null, zOut, "META-INF/");
  -	    zipFile(in, zOut, "META-INF/MANIFEST.MF", System.currentTimeMillis());
  - 	}
  -     }
  +                throw new BuildException ( "Could not find: " + s );
  +            zipDir(null, zOut, "META-INF/");
  +            zipFile(in, zOut, "META-INF/MANIFEST.MF", System.currentTimeMillis());
  +        }
  +    }
   
       protected boolean isUpToDate(FileScanner[] scanners, File zipFile) throws BuildException
       {
           File[] files = grabFiles(scanners);
  -
  +        
           if (manifest != null) {
               // just add the manifest file to the mix
   
  
  
  
  1.37      +53 -55    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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Javadoc.java	2000/10/31 11:12:05	1.36
  +++ Javadoc.java	2000/11/25 02:38:37	1.37
  @@ -51,9 +51,10 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs;
   
  +import java.io.*;
  +import java.util.*;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Project;
  @@ -62,9 +63,6 @@
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
   
  -import java.io.*;
  -import java.util.*;
  -
   /**
    * This task makes it easy to generate Javadoc documentation for a collection
    * of source code.
  @@ -407,7 +405,7 @@
               LinkArgument le = createLink();
               le.setOffline(true);
               String linkOfflineError = "The linkoffline attribute must include a URL and " + 
  -                                      "a package-list file location separated by a space";
  +                "a package-list file location separated by a space";
               if (src.trim().length() == 0) {
                   throw new BuildException(linkOfflineError);
               }                
  @@ -582,7 +580,7 @@
           } else {
               toExecute.createArgument().setValue("-classpath");
               toExecute.createArgument().setValue(sourcePath.toString() +
  -                System.getProperty("path.separator") + classpath.toString());
  +                                                System.getProperty("path.separator") + classpath.toString());
           }
   
           if (version && doclet == null)
  @@ -672,15 +670,15 @@
               if (group != null) {
                   StringTokenizer tok = new StringTokenizer(group, ",", false);
                   while (tok.hasMoreTokens()) {
  -                  String grp = tok.nextToken().trim();
  -                  int space = grp.indexOf(" ");
  -                  if (space > 0){
  -                    String name = grp.substring(0, space);
  -                    String pkgList = grp.substring(space + 1);
  -                    toExecute.createArgument().setValue("-group");
  -                    toExecute.createArgument().setValue(name);
  -                    toExecute.createArgument().setValue(pkgList);
  -                  }
  +                    String grp = tok.nextToken().trim();
  +                    int space = grp.indexOf(" ");
  +                    if (space > 0){
  +                        String name = grp.substring(0, space);
  +                        String pkgList = grp.substring(space + 1);
  +                        toExecute.createArgument().setValue("-group");
  +                        toExecute.createArgument().setValue(name);
  +                        toExecute.createArgument().setValue(pkgList);
  +                    }
                   }
               }
               
  @@ -724,7 +722,7 @@
               }
           }
   
  -         if (packageList != null) {
  +        if (packageList != null) {
               toExecute.createArgument().setValue("@" + packageList);
           }
           log("Javadoc args: " + toExecute, Project.MSG_VERBOSE);
  @@ -835,48 +833,48 @@
       }
   
       protected Vector findPackages(File srcDir) {
  -    	Vector foundPkgs = new Vector();
  -    	
  -    	if ((srcDir != null) && (srcDir.isDirectory())) {
  -    		scan(srcDir, "", foundPkgs);
  -    	}
  -    	
  -    	return foundPkgs;
  +        Vector foundPkgs = new Vector();
  +
  +        if ((srcDir != null) && (srcDir.isDirectory())) {
  +            scan(srcDir, "", foundPkgs);
  +        }
  +
  +        return foundPkgs;
       }
   
       protected void scan(File srcDir, String vpath, Vector pkgs) {
  -    	foundJavaFile = false;
  -    	File dir = new File(srcDir, vpath);
  -    	
  -    	if (!dir.isDirectory()) {
  -    		return;
  -    	}
  -    
  -    	String[] files = dir.list(new FilenameFilter () {
  -    			public boolean accept(File dir1, String name) {
  -    				if (name.endsWith(".java")) {
  -    					foundJavaFile = true;
  -    					return false;
  -    				}
  -    				File d = new File(dir1, name);
  -    				if (d.isDirectory() 
  -                                    && d.getName().indexOf("-") == -1) {
  -    					return true;
  -    				}
  -    				return false;
  -    			}
  -    		});
  +        foundJavaFile = false;
  +        File dir = new File(srcDir, vpath);
  +
  +        if (!dir.isDirectory()) {
  +            return;
  +        }
       
  -    	if (foundJavaFile && vpath.length() > 0) {
  -    		String newPkg = vpath.substring(1).replace(File.separatorChar, '.');
  -    		if (!pkgs.contains(newPkg)) {
  -    			pkgs.addElement(newPkg);
  -    		}
  -    	}
  -    	
  -    	for (int i=0; i<files.length; i++) {
  -    		scan(srcDir, vpath + File.separator + files[i], pkgs);
  -    	}
  -    	return;
  +        String[] files = dir.list(new FilenameFilter () {
  +            public boolean accept(File dir1, String name) {
  +                if (name.endsWith(".java")) {
  +                    foundJavaFile = true;
  +                    return false;
  +                }
  +                File d = new File(dir1, name);
  +                if (d.isDirectory() 
  +                    && d.getName().indexOf("-") == -1) {
  +                        return true;
  +                    }
  +                return false;
  +            }
  +        });
  +        
  +        if (foundJavaFile && vpath.length() > 0) {
  +            String newPkg = vpath.substring(1).replace(File.separatorChar, '.');
  +            if (!pkgs.contains(newPkg)) {
  +                pkgs.addElement(newPkg);
  +            }
  +        }
  +
  +        for (int i=0; i<files.length; i++) {
  +            scan(srcDir, vpath + File.separator + files[i], pkgs);
  +        }
  +        return;
       }
   }
  
  
  
  1.5       +17 -17    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JikesOutputParser.java	2000/08/07 11:13:26	1.4
  +++ JikesOutputParser.java	2000/11/25 02:38:37	1.5
  @@ -57,8 +57,8 @@
        * @param task - task in whichs context we are called
        */
       protected JikesOutputParser(Task task, boolean emacsMode) {
  -	super();
  -	this.task = task;
  +        super();
  +        this.task = task;
           this.emacsMode = emacsMode;
       }
   
  @@ -74,24 +74,24 @@
       }
   
       private void parseStandardOutput(BufferedReader reader) throws IOException {
  -	String line;
  -	String lower;
  -	// We assume, that every output, jike does, stands for an error/warning
  -	// XXX 
  -	// Is this correct?
  -
  +        String line;
  +        String lower;
  +        // We assume, that every output, jike does, stands for an error/warning
  +        // XXX 
  +        // Is this correct?
  +        
           // TODO:
           // A warning line, that shows code, which contains a variable
           // error will cause some trouble. The parser should definitely
           // be much better.
   
  -	while ((line = reader.readLine()) != null) {
  -	    lower = line.toLowerCase();
  -	    if (line.trim().equals(""))
  -		continue;
  -	    if (lower.indexOf("error") != -1)
  -		setError(true);
  -	    else if (lower.indexOf("warning") != -1)
  +        while ((line = reader.readLine()) != null) {
  +            lower = line.toLowerCase();
  +            if (line.trim().equals(""))
  +                continue;
  +            if (lower.indexOf("error") != -1)
  +                setError(true);
  +            else if (lower.indexOf("warning") != -1)
                   setError(false);
               else {
                   // If we don't know the type of the line
  @@ -104,7 +104,7 @@
                       setError(true);
               }
               log(line);
  -	}
  +        }
       }
   
       private void parseEmacsOutput(BufferedReader reader) throws IOException {
  @@ -130,6 +130,6 @@
        * @return if errors ocured
        */
       protected boolean getErrorFlag() {
  -	return errorFlag;
  +        return errorFlag;
       }
   }
  
  
  
  1.12      +1 -1      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MatchingTask.java	2000/09/07 09:50:55	1.11
  +++ MatchingTask.java	2000/11/25 02:38:37	1.12
  @@ -119,7 +119,7 @@
               "Please use the includes attribute.",
               Project.MSG_WARN);
           if (itemString == null || itemString.equals("*") 
  -				               || itemString.equals(".")) {
  +            || itemString.equals(".")) {
               createInclude().setName("**");
           } else {
               StringTokenizer tok = new StringTokenizer(itemString, ", ");
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Mkdir.java	2000/11/20 22:56:36	1.4
  +++ Mkdir.java	2000/11/25 02:38:37	1.5
  @@ -76,7 +76,7 @@
           if (dir.isFile()) {
               throw new BuildException("Unable to create directory as a file already exists with that name: " + dir.getAbsolutePath());
           }
  -	
  +        
           if (!dir.exists()) {
   	    boolean result = dir.mkdirs();
   	    if (result == false) {
  
  
  
  1.13      +5 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SQLExec.java	2000/11/02 04:39:56	1.12
  +++ SQLExec.java	2000/11/25 02:38:37	1.13
  @@ -325,12 +325,14 @@
           try {
               Class dc;
               if (classpath != null) {
  -		log("Loading " + driver + " using AntClassLoader with classpath " + classpath, Project.MSG_VERBOSE);
  +                log( "Loading " + driver + " using AntClassLoader with classpath " + classpath, 
  +                     Project.MSG_VERBOSE );
  +
                   loader = new AntClassLoader(project, classpath, false);
                   dc = loader.loadClass(driver);
               }
               else {
  -		log("Loading " + driver + " using system loader.", Project.MSG_VERBOSE);
  +                log("Loading " + driver + " using system loader.", Project.MSG_VERBOSE);
                   dc = Class.forName(driver);
               }
               driverInstance = (Driver) dc.newInstance();
  @@ -364,7 +366,7 @@
               PrintStream out = System.out;
               try {
                   if (output != null) {
  -        	    log("Opening PrintStream to output file " + output, Project.MSG_VERBOSE);
  +                    log("Opening PrintStream to output file " + output, Project.MSG_VERBOSE);
                       out = new PrintStream(new BufferedOutputStream(new FileOutputStream(output)));
                   }
                           
  
  
  
  1.7       +7 -7      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Tar.java	2000/11/16 09:57:46	1.6
  +++ Tar.java	2000/11/25 02:38:37	1.7
  @@ -124,14 +124,14 @@
           } catch (IOException ioe) {
               String msg = "Problem creating TAR: " + ioe.getMessage();
               throw new BuildException(msg, ioe, location);
  -	} finally {
  -	    if (tOut != null) {
  -	        try {
  +        } finally {
  +            if (tOut != null) {
  +                try {
                       // close up
  -	            tOut.close();
  -	        }
  -	        catch (IOException e) {}
  -	    }
  +                    tOut.close();
  +                }
  +                catch (IOException e) {}
  +            }
           }
       }
   
  
  
  
  1.12      +37 -37    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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Taskdef.java	2000/09/27 07:42:23	1.11
  +++ Taskdef.java	2000/11/25 02:38:37	1.12
  @@ -87,52 +87,52 @@
       }
   
       public void execute() throws BuildException {
  -	    if (name==null || value==null ) {
  -		String msg = "name or classname attributes of taskdef element "
  -		    + "are undefined";
  -		throw new BuildException(msg);
  -	    }
  -	    try {
  -                ClassLoader loader = null;
  -                if (classpath != null) {
  -                    AntClassLoader al = new AntClassLoader(project, classpath,
  -                                                           false);
  -                    // need to load Task via system classloader or the new
  -                    // task we want to define will never be a Task but always
  -                    // be wrapped into a TaskAdapter.
  -                    al.addSystemPackageRoot("org.apache.tools.ant");
  -                    loader = al;
  -                } else {
  -                    loader = this.getClass().getClassLoader();
  -                }
  +        if (name==null || value==null ) {
  +            String msg = "name or classname attributes of taskdef element "
  +                + "are undefined";
  +            throw new BuildException(msg);
  +        }
  +        try {
  +            ClassLoader loader = null;
  +            if (classpath != null) {
  +                AntClassLoader al = new AntClassLoader(project, classpath,
  +                                                       false);
  +                // need to load Task via system classloader or the new
  +                // task we want to define will never be a Task but always
  +                // be wrapped into a TaskAdapter.
  +                al.addSystemPackageRoot("org.apache.tools.ant");
  +                loader = al;
  +            } else {
  +                loader = this.getClass().getClassLoader();
  +            }
   
  -                Class taskClass = null;
  -                if (loader != null) {
  -                    taskClass = loader.loadClass(value);
  -                } else {
  -                    taskClass = Class.forName(value);
  -                }
  -                project.addTaskDefinition(name, taskClass);
  -	    } catch (ClassNotFoundException cnfe) {
  -		String msg = "taskdef class " + value +
  -		    " cannot be found";
  -		throw new BuildException(msg, cnfe, location);
  -	    } catch (NoClassDefFoundError ncdfe) {
  -		String msg = "taskdef class " + value +
  -		    " cannot be found";
  -		throw new BuildException(msg, ncdfe, location);
  -	    }
  +            Class taskClass = null;
  +            if (loader != null) {
  +                taskClass = loader.loadClass(value);
  +            } else {
  +                taskClass = Class.forName(value);
  +            }
  +            project.addTaskDefinition(name, taskClass);
  +        } catch (ClassNotFoundException cnfe) {
  +            String msg = "taskdef class " + value +
  +                " cannot be found";
  +            throw new BuildException(msg, cnfe, location);
  +        } catch (NoClassDefFoundError ncdfe) {
  +            String msg = "taskdef class " + value +
  +                " cannot be found";
  +            throw new BuildException(msg, ncdfe, location);
  +        }
       }
       
       public void setName( String name) {
  -	this.name = name;
  +        this.name = name;
       }
   
       public String getClassname() {
  -	return value;
  +        return value;
       }
   
       public void setClassname(String v) {
  -	value = v;
  +        value = v;
       }
   }
  
  
  
  1.9       +1 -1      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Untar.java	2000/07/24 13:23:30	1.8
  +++ Untar.java	2000/11/25 02:38:37	1.9
  @@ -136,7 +136,7 @@
                   }
               }
           } catch (IOException ioe) {
  -	    throw new BuildException("Error while expanding " + srcF.getPath(),
  +            throw new BuildException("Error while expanding " + srcF.getPath(),
                                        ioe, location);
   	} finally {
   	    if (tis != null) {
  
  
  
  1.4       +8 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java
  
  Index: War.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/War.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- War.java	2000/10/31 13:53:06	1.3
  +++ War.java	2000/11/25 02:38:37	1.4
  @@ -77,12 +77,12 @@
   
       public War() {
           super();
  -	archiveType = "war";
  +        archiveType = "war";
           emptyBehavior = "create";
       }
   
       public void setWarfile(File warFile) {
  -	super.setZipfile(warFile);
  +        super.setZipfile(warFile);
       }
       
       public void setWebxml(File descr) {
  @@ -124,16 +124,16 @@
        * special way of nested lib, classes or webinf filesets.  
        */
       protected void initZipOutputStream(ZipOutputStream zOut)
  -	throws IOException, BuildException
  +        throws IOException, BuildException
       {
  -	// add deployment descriptor first
  -	if (deploymentDescriptor != null) {
  +        // add deployment descriptor first
  +        if (deploymentDescriptor != null) {
               zipDir(new File(deploymentDescriptor.getParent()), zOut, 
                      "WEB-INF/");
  -	    super.zipFile(deploymentDescriptor, zOut, "WEB-INF/web.xml");
  -	} else {
  +            super.zipFile(deploymentDescriptor, zOut, "WEB-INF/web.xml");
  +        } else {
               throw new BuildException("webxml attribute is required", location);
  - 	}
  +        }
   
           addFiles(libFileSets, zOut, "WEB-INF/lib/");
           addFiles(classesFileSets, zOut, "WEB-INF/classes/");
  
  
  
  1.9       +128 -124  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSLTProcess.java	2000/08/03 09:34:03	1.8
  +++ XSLTProcess.java	2000/11/25 02:38:37	1.9
  @@ -54,13 +54,13 @@
   
   package org.apache.tools.ant.taskdefs;
   
  -import org.apache.tools.ant.*;
   
   import java.io.*;
   import java.util.Enumeration;
   import java.util.Hashtable;
   import java.util.StringTokenizer;
   import java.util.Vector;
  +import org.apache.tools.ant.*;
   
   
   /**
  @@ -84,7 +84,7 @@
    * @author <a href="mailto:kvisco@exoffice.com">Keith Visco</a>
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
    * @author <a href="mailto:russgold@acm.org">Russell Gold</a>
  - * @version $Revision: 1.8 $ $Date: 2000/08/03 09:34:03 $
  + * @version $Revision: 1.9 $ $Date: 2000/11/25 02:38:37 $
    */
   public class XSLTProcess extends MatchingTask {
   
  @@ -100,7 +100,7 @@
   
       /**
        * Creates a new XSLTProcess Task.
  -    **/
  +     **/
       public XSLTProcess() {
       } //-- XSLTProcess
   
  @@ -109,35 +109,35 @@
        */
   
       public void execute() throws BuildException {
  -	DirectoryScanner scanner;
  -	String[]         list;
  -	String[]         dirs;
  +        DirectoryScanner scanner;
  +        String[]         list;
  +        String[]         dirs;
   
  -	if (baseDir == null)
  -	    baseDir = project.resolveFile(".");
  +        if (baseDir == null)
  +            baseDir = project.resolveFile(".");
           //-- make sure Source directory exists...
  -	if (destDir == null ) {
  -	    String msg = "destdir attributes must be set!";
  -	    throw new BuildException(msg);
  -	}
  -	scanner = getDirectoryScanner(baseDir);
  -	log("Transforming into "+destDir, Project.MSG_INFO);
  +        if (destDir == null ) {
  +            String msg = "destdir attributes must be set!";
  +            throw new BuildException(msg);
  +        }
  +        scanner = getDirectoryScanner(baseDir);
  +        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
           if (liaison == null) {
  -           try {
  -               setProcessor("xslp");
  -           } catch (Throwable e1) {
  -               try {
  -                   setProcessor("xalan");
  -               } catch (Throwable e2) {
  -                   throw new BuildException(e2);
  -               }
  -           }
  +            try {
  +                setProcessor("xslp");
  +            } catch (Throwable e1) {
  +                try {
  +                    setProcessor("xalan");
  +                } catch (Throwable e2) {
  +                    throw new BuildException(e2);
  +                }
  +            }
           }
   
  -	log("Using "+liaison.getClass().toString(), Project.MSG_VERBOSE);
  +        log("Using "+liaison.getClass().toString(), Project.MSG_VERBOSE);
   
           long styleSheetLastModified = 0;
           if (xslFile != null) {
  @@ -153,24 +153,24 @@
               }
           }
   
  -	// Process all the files marked for styling
  -	list = scanner.getIncludedFiles();
  -	for (int i = 0;i < list.length; ++i) {
  +        // Process all the files marked for styling
  +        list = scanner.getIncludedFiles();
  +        for (int i = 0;i < list.length; ++i) {
               process( baseDir, list[i], destDir, styleSheetLastModified );
  -	}
  +        }
           
  -	// Process all the directoried marked for styling
  -	dirs = scanner.getIncludedDirectories();
  -	for (int j = 0;j < dirs.length;++j){
  -	    list=new File(baseDir,dirs[j]).list();
  -	    for (int i = 0;i < list.length;++i)
  +        // Process all the directoried marked for styling
  +        dirs = scanner.getIncludedDirectories();
  +        for (int j = 0;j < dirs.length;++j){
  +            list=new File(baseDir,dirs[j]).list();
  +            for (int i = 0;i < list.length;++i)
                   process( baseDir, list[i], destDir, styleSheetLastModified );
  -	}
  +        }
       } //-- execute
   
       /**
        * Set the base directory.
  -    **/
  +     **/
       public void setBasedir(File dir) {
           baseDir = dir;
       } //-- setSourceDir
  @@ -179,7 +179,7 @@
        * Set the destination directory into which the XSL result
        * files should be copied to
        * @param dirName the name of the destination directory
  -    **/
  +     **/
       public void setDestdir(File dir) {
           destDir = dir;
       } //-- setDestDir
  @@ -187,16 +187,16 @@
       /**
        * Set the desired file extension to be used for the target
        * @param name the extension to use
  -    **/
  +     **/
       public void setExtension(String name) {
  -	    targetExtension = name;
  +            targetExtension = name;
       } //-- setDestDir
   
       /**
        * Sets the file to use for styling relative to the base directory.
        */
       public void setStyle(String xslFile) {
  -	this.xslFile = new File(xslFile);
  +        this.xslFile = new File(xslFile);
       }
   
       /**
  @@ -204,10 +204,14 @@
        */
       public void setProcessor(String processor) throws Exception {
   
  -	if (processor.equals("xslp")) {
  -            liaison = (XSLTLiaison) Class.forName("org.apache.tools.ant.taskdefs.optional.XslpLiaison").newInstance();
  -	} else if (processor.equals("xalan")) {
  -            liaison = (XSLTLiaison) Class.forName("org.apache.tools.ant.taskdefs.optional.XalanLiaison").newInstance();
  +        if (processor.equals("xslp")) {
  +            final Class clazz = 
  +                Class.forName("org.apache.tools.ant.taskdefs.optional.XslpLiaison");
  +            liaison = (XSLTLiaison) clazz.newInstance();
  +        } else if (processor.equals("xalan")) {
  +            final Class clazz = 
  +                Class.forName("org.apache.tools.ant.taskdefs.optional.XalanLiaison");
  +            liaison = (XSLTLiaison)clazz.newInstance();
           } else {
               liaison = (XSLTLiaison) Class.forName(processor).newInstance();
           }
  @@ -215,103 +219,103 @@
       }
   
       /*
  -    private void process(File sourceDir, File destDir)
  -        throws BuildException
  -    {
  +      private void process(File sourceDir, File destDir)
  +      throws BuildException
  +      {
   
           
  -        if (!sourceDir.isDirectory()) {
  -            throw new BuildException(sourceDir.getName() +
  -                " is not a directory!");
  -        }
  -        else if (!destDir.isDirectory()) {
  -            throw new BuildException(destDir.getName() +
  -                " is not a directory!");
  -        }
  -
  -	    String[] list = sourceDir.list(new DesirableFilter());
  -
  -	    if (list == null) {
  -	        return;  //-- nothing to do
  -	    }
  -
  -	    for (int i = 0; i < list.length; i++) {
  -
  -    	    String filename = list[i];
  -
  -    	    File inFile  = new File(sourceDir, filename);
  -
  -	        //-- if inFile is a directory, recursively process it
  -    	    if (inFile.isDirectory()) {
  -		if (!excluded(filename)) {
  -		new File(destDir, filename).mkdir();
  -		process(inFile, new File(destDir, filename));
  -		}
  -	    }
  -	    //-- process XML files
  -	    else if (hasXMLFileExtension(filename) && ! excluded(filename)) {
  -
  -	            //-- replace extension with the target extension
  -	            int idx = filename.lastIndexOf('.');
  -
  -		        File outFile = new File(destDir,
  -		            filename.substring(0,idx) + targetExt);
  -
  -		        if ((inFile.lastModified() > outFile.lastModified()) ||
  -			    (xslFile != null && xslFile.lastModified() > outFile.lastModified()))
  -		        {
  -			    processXML(inFile, outFile);
  -		        }
  -		    }
  -		    else {
  -		        File outFile = new File(destDir, filename);
  -		        if (inFile.lastModified() > outFile.lastModified()) {
  -		            try {
  -		                copyFile(inFile, outFile);
  -		            }
  -		            catch(java.io.IOException ex) {
  -		                String err = "error copying file: ";
  -		                err += inFile.getAbsolutePath();
  -		                err += "; " + ex.getMessage();
  -		                throw new BuildException(err, ex);
  -		            }
  -			        //filecopyList.put(srcFile.getAbsolutePath(),
  -					    //destFile.getAbsolutePath());
  -		        }
  -		    }
  -		} //-- </for>
  -    } //-- process(File, File)
  +      if (!sourceDir.isDirectory()) {
  +      throw new BuildException(sourceDir.getName() +
  +      " is not a directory!");
  +      }
  +      else if (!destDir.isDirectory()) {
  +      throw new BuildException(destDir.getName() +
  +      " is not a directory!");
  +      }
  +
  +      String[] list = sourceDir.list(new DesirableFilter());
  +
  +      if (list == null) {
  +      return;  //-- nothing to do
  +      }
  +
  +      for (int i = 0; i < list.length; i++) {
  +
  +      String filename = list[i];
  +
  +      File inFile  = new File(sourceDir, filename);
  +
  +      //-- if inFile is a directory, recursively process it
  +      if (inFile.isDirectory()) {
  +      if (!excluded(filename)) {
  +      new File(destDir, filename).mkdir();
  +      process(inFile, new File(destDir, filename));
  +      }
  +      }
  +      //-- process XML files
  +      else if (hasXMLFileExtension(filename) && ! excluded(filename)) {
  +
  +      //-- replace extension with the target extension
  +      int idx = filename.lastIndexOf('.');
  +
  +      File outFile = new File(destDir,
  +      filename.substring(0,idx) + targetExt);
  +
  +      if ((inFile.lastModified() > outFile.lastModified()) ||
  +      (xslFile != null && xslFile.lastModified() > outFile.lastModified()))
  +      {
  +      processXML(inFile, outFile);
  +      }
  +      }
  +      else {
  +      File outFile = new File(destDir, filename);
  +      if (inFile.lastModified() > outFile.lastModified()) {
  +      try {
  +      copyFile(inFile, outFile);
  +      }
  +      catch(java.io.IOException ex) {
  +      String err = "error copying file: ";
  +      err += inFile.getAbsolutePath();
  +      err += "; " + ex.getMessage();
  +      throw new BuildException(err, ex);
  +      }
  +      //filecopyList.put(srcFile.getAbsolutePath(),
  +      //destFile.getAbsolutePath());
  +      }
  +      }
  +      } //-- </for>
  +      } //-- process(File, File)
       */
   
       /**
        * Processes the given input XML file and stores the result
        * in the given resultFile.
  -    **/
  +     **/
       private void process(File baseDir, String xmlFile, File destDir, 
                            long styleSheetLastModified)
           throws BuildException {
   
  -	String fileExt=targetExtension;
  -	File   outFile=null;
  -	File   inFile=null;
  -
  -	try {
  -	    inFile = new File(baseDir,xmlFile);
  -	    outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt);
  -	    if (inFile.lastModified() > outFile.lastModified() ||
  +        String fileExt=targetExtension;
  +        File   outFile=null;
  +        File   inFile=null;
  +
  +        try {
  +            inFile = new File(baseDir,xmlFile);
  +            outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt);
  +            if (inFile.lastModified() > outFile.lastModified() ||
                   styleSheetLastModified > outFile.lastModified()) {
                   ensureDirectoryFor( outFile );
  -		//-- command line status
  -		log("Processing " + xmlFile + " to " + outFile, Project.MSG_VERBOSE);
  +                //-- command line status
  +                log("Processing " + xmlFile + " to " + outFile, Project.MSG_VERBOSE);
   
  -		liaison.transform(inFile.toString(), outFile.toString());
  -	    }
  +                liaison.transform(inFile.toString(), outFile.toString());
  +            }
           }
           catch (Exception ex) {
  -	    // If failed to process document, must delete target document,
  -	    // or it will not attempt to process it the second time
  -	    log("Failed to process " + inFile, Project.MSG_INFO);
  -	    outFile.delete();
  +            // If failed to process document, must delete target document,
  +            // or it will not attempt to process it the second time
  +            log("Failed to process " + inFile, Project.MSG_INFO);
  +            outFile.delete();
               throw new BuildException(ex);
           }
   
  
  
  
  1.18      +29 -31    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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Zip.java	2000/11/16 09:57:46	1.17
  +++ Zip.java	2000/11/25 02:38:37	1.18
  @@ -51,13 +51,8 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs;
   
  -import org.apache.tools.ant.*;
  -import org.apache.tools.ant.types.*;
  -import org.apache.tools.ant.util.*;
  -
   import java.io.*;
   import java.util.Enumeration;
   import java.util.Hashtable;
  @@ -65,6 +60,9 @@
   import java.util.StringTokenizer;
   import java.util.Vector;
   import java.util.zip.*;
  +import org.apache.tools.ant.*;
  +import org.apache.tools.ant.types.*;
  +import org.apache.tools.ant.util.*;
   
   /**
    * Create a ZIP archive.
  @@ -73,7 +71,6 @@
    * @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    */
  -
   public class Zip extends MatchingTask {
   
       private File zipFile;
  @@ -135,7 +132,8 @@
   
       public void execute() throws BuildException {
           if (baseDir == null && filesets.size() == 0 && "zip".equals(archiveType))
  -            throw new BuildException("basedir attribute must be set, or at least one fileset must be given!");
  +            throw new BuildException( "basedir attribute must be set, or at least " + 
  +                                      "one fileset must be given!" );
   
           if (zipFile == null) {
               throw new BuildException("You must specify the " + archiveType + " file to create!");
  @@ -157,29 +155,29 @@
   
           log("Building "+ archiveType +": "+ zipFile.getAbsolutePath());
   
  -	try {
  -	    ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(zipFile));
  -	    try {
  -		if (doCompress) {
  -		    zOut.setMethod(ZipOutputStream.DEFLATED);
  -		} else {
  -		    zOut.setMethod(ZipOutputStream.STORED);
  -		}
  -		initZipOutputStream(zOut);
  +        try {
  +            ZipOutputStream zOut = new ZipOutputStream(new FileOutputStream(zipFile));
  +            try {
  +                if (doCompress) {
  +                    zOut.setMethod(ZipOutputStream.DEFLATED);
  +                } else {
  +                    zOut.setMethod(ZipOutputStream.STORED);
  +                }
  +                initZipOutputStream(zOut);
                                   
                   for (int j = 0; j < scanners.length; j++) {
                       addFiles(scanners[j], zOut, "");
                   }
  -	    } finally {
  -		zOut.close ();
  -	    }
  -	} catch (IOException ioe) {
  -	    String msg = "Problem creating " + archiveType + ": " + ioe.getMessage();
  +            } finally {
  +                zOut.close ();
  +            }
  +        } catch (IOException ioe) {
  +            String msg = "Problem creating " + archiveType + ": " + ioe.getMessage();
   
               // delete a bogus ZIP file
  -	    if (!zipFile.delete()) {
  -		msg += " (and the archive is probably corrupt but I could not delete it)";
  -	    }
  +            if (!zipFile.delete()) {
  +                msg += " (and the archive is probably corrupt but I could not delete it)";
  +            }
   
               throw new BuildException(msg, ioe, location);
           }
  @@ -317,13 +315,13 @@
           }
           addedDirs.put(vPath, vPath);
           
  -	ZipEntry ze = new ZipEntry (vPath);
  -	if (dir != null) ze.setTime (dir.lastModified ());
  -	ze.setSize (0);
  -	ze.setMethod (ZipEntry.STORED);
  -	// This is faintly ridiculous:
  -	ze.setCrc (emptyCrc);
  -	zOut.putNextEntry (ze);
  +        ZipEntry ze = new ZipEntry (vPath);
  +        if (dir != null) ze.setTime (dir.lastModified ());
  +        ze.setSize (0);
  +        ze.setMethod (ZipEntry.STORED);
  +        // This is faintly ridiculous:
  +        ze.setCrc (emptyCrc);
  +        zOut.putNextEntry (ze);
       }
   
       protected void zipFile(InputStream in, ZipOutputStream zOut, String vPath,
  
  
  
  1.7       +0 -1      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NetRexxC.java	2000/11/25 01:10:08	1.6
  +++ NetRexxC.java	2000/11/25 02:38:41	1.7
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs.optional;
   
   import java.io.*;
  
  
  
  1.4       +7 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
  
  Index: Script.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Script.java	2000/10/12 13:38:15	1.3
  +++ Script.java	2000/11/25 02:38:41	1.4
  @@ -51,13 +51,12 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs.optional;
   
  -import org.apache.tools.ant.*;
  +import com.ibm.bsf.*;
   import java.io.*;
   import java.util.*;
  -import com.ibm.bsf.*;
  +import org.apache.tools.ant.*;
   
   /**
    * Execute a script
  @@ -76,7 +75,7 @@
           for (Enumeration e=dictionary.keys(); e.hasMoreElements(); ) {
               String key = (String)e.nextElement();
   
  -	    boolean isValid = key.length()>0 &&
  +            boolean isValid = key.length()>0 &&
                   Character.isJavaIdentifierStart(key.charAt(0));
   
               for (int i=1; isValid && i<key.length(); i++)
  @@ -109,7 +108,7 @@
               // execute the script
               manager.exec(language, "<ANT>", 0, 0, script);
           } catch (BSFException be) {
  -	    Throwable t = be;
  +            Throwable t = be;
               Throwable te = be.getTargetException();
               if (te != null) {
                   if  (te instanceof BuildException) {
  @@ -128,7 +127,7 @@
        * @param msg Sets the value for the script variable.
        */
       public void setLanguage(String language) {
  -	this.language = language;
  +        this.language = language;
       }
   
       /**
  @@ -151,7 +150,7 @@
           } catch (IOException e) {
               throw new BuildException(e);
           }
  -	
  +        
           script += new String(data);
       }
   
  @@ -161,6 +160,6 @@
        * @param msg Sets the value for the script variable.
        */
       public void addText(String text) {
  -	this.script += text;
  +        this.script += text;
       }
   }
  
  
  
  1.2       +58 -58    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  
  Index: CSharp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CSharp.java	2000/11/09 16:18:50	1.1
  +++ CSharp.java	2000/11/25 02:38:42	1.2
  @@ -1,8 +1,8 @@
  -/* -*-Java-*-
  +/*
   *******************************************************************
   *
   * File:         Csharp.java
  -* RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v 1.1 2000/11/09 16:18:50 bodewig Exp $
  +* RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v 1.2 2000/11/25 02:38:42 donaldp Exp $
   * Author:       Steve Loughran
   * Created:      July 21,  2000
   * Modified:     $Modtime: 00-11-01 12:57 $
  @@ -85,12 +85,12 @@
   // imports
   // ====================================================================
   
  +import java.io.*;
  +import java.text.*;
  +import java.util.*;
   import org.apache.tools.ant.*;
   import org.apache.tools.ant.taskdefs.*;
   import org.apache.tools.ant.types.*;
  -import java.io.*;
  -import java.util.*;
  -import java.text.*;
   
   
   // ====================================================================
  @@ -232,23 +232,23 @@
   <p>
   TODO
   <ol>
  -	<li>get PATH incorporated into reference/module lookup
  -	<li>is Win32Icon broken?
  -	<li>all the missing options
  +    <li>get PATH incorporated into reference/module lookup
  +    <li>is Win32Icon broken?
  +    <li>all the missing options
   </ol>
   <p>
   History
  -	<Table>
  -	<tr><td>0.2</td>
  -		<td> Slightly different</td>
  -		<td> Split command execution to a separate class; 
  -	</tr>
  -	<tr><td>0.1</td>
  -		<td> "I can't believe it's so rudimentary"</td>
  -		<td>  First pass; minimal builds only support; 
  -	</tr>
  +        <Table>
  +        <tr><td>0.2</td>
  +                <td> Slightly different</td>
  +                <td> Split command execution to a separate class; 
  +        </tr>
  +        <tr><td>0.1</td>
  +                <td> "I can't believe it's so rudimentary"</td>
  +                <td>  First pass; minimal builds only support; 
  +        </tr>
   
  -	</table>
  +        </table>
   @version 0.2
   @author Steve Loughran steve_l@iseran.com
   
  @@ -258,7 +258,7 @@
   public class CSharp 
       extends org.apache.tools.ant.taskdefs.MatchingTask {
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** constructor inits everything and set up the search pattern
        */
   
  @@ -283,7 +283,7 @@
       protected static final String csc_file_pattern="*."+csc_file_ext;
   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** list of reference classes. (pretty much a classpath equivalent)
        */
   
  @@ -335,14 +335,14 @@
          //bail on no references listed
          if (refpath.length()==0)
          return null;
  -	
  +        
          StringBuffer s=new StringBuffer("/reference:");
          s.append(refpath);
          return new String(s);
  -       }	
  +       }        
       */
   
  -    //=============================================================================	
  +    //=============================================================================        
       /* optimise flag
        */
    
  @@ -366,9 +366,9 @@
        */
       protected String getOptimizeParameter() {
           return "/optimize"+(_optimize?"+":"-");
  -    }	
  -	
  -    //=============================================================================	
  +    }        
  +        
  +    //=============================================================================        
       /** incremental build flag */
       protected boolean _incremental;
   
  @@ -390,9 +390,9 @@
        */
       protected String getIncrementalParameter() {
           return "/incremental"+(_incremental?"+":"-");
  -    }	
  +    }        
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** debug flag. Controls generation of debug information. 
        */
    
  @@ -404,7 +404,7 @@
    
       public void setDebug(boolean f)
       {_debug=f;}
  -	
  +        
       /** query the debug flag
        * @return true if debug is turned on
        */
  @@ -417,15 +417,15 @@
        */
       protected String getDebugParameter() {
           return "/debug"+(_debug?"+":"-");
  -    }	
  +    }        
   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** output XML documentation flag
  -     */	
  -	
  +     */        
  +        
       protected File _docFile;
  -	
  +        
       /** file for generated XML documentation
        * @param output file
        */
  @@ -443,9 +443,9 @@
               return "/doc:"+_docFile.toString();
           else
               return null;
  -    }	
  -	
  -    //=============================================================================	
  +    }        
  +        
  +    //=============================================================================        
       /** warning level: 0-4, with 4 being most verbose
        */
       private int _warnLevel;
  @@ -466,9 +466,9 @@
        */
       protected String getWarnLevelParameter() {
           return "/warn:"+_warnLevel;
  -    }	
  +    }        
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** enable unsafe code flag. Clearly set to false by default
        */
   
  @@ -484,9 +484,9 @@
        */
       protected String getUnsafeParameter(){
           return _unsafe?"/unsafe":null;
  -    }	
  -	
  -    //=============================================================================	
  +    }        
  +        
  +    //=============================================================================        
       /** main class (or null for automatic choice)
        */
       protected String _mainClass;
  @@ -504,9 +504,9 @@
               return "/main:"+_mainClass;
           else
               return null;
  -    }	
  +    }        
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** source directory upon which the search pattern is applied
        */
       private File _srcDir;
  @@ -518,7 +518,7 @@
           _srcDir = project.resolveFile(srcDirName);
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** destination directory (null means use the source directory)
        */
       private File _destDir;
  @@ -529,9 +529,9 @@
       public void setDestDir(String dirName) {
           _destDir = project.resolveFile(dirName);
       }
  -	
  +        
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** type of target. Should be one of exe|library|module|winexe|(null)
           default is exe; the actual value (if not null) is fed to the command line.
           <br>See /target
  @@ -548,7 +548,7 @@
           targetType=targetType.toLowerCase();
           if(targetType.equals("exe") || targetType.equals("library") ||
              targetType.equals("module") ||targetType.equals("winexe") ) {
  -            _targetType=targetType;	
  +            _targetType=targetType;        
           }
           else 
               throw new BuildException("targetType " +targetType+" is not a valid type");
  @@ -556,7 +556,7 @@
   
       public String getTargetType() { 
           return _targetType;
  -    } 	
  +    }         
   
       /** get the argument or null for no argument needed
        */
  @@ -565,14 +565,14 @@
               return "/target:"+_targetType;
           else
               return null;
  -    }	
  +    }        
   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /* icon for incorporation into apps
        */
    
  -    protected File _win32icon;	
  +    protected File _win32icon;        
   
       /**
        * Set the win32 icon 
  @@ -591,7 +591,7 @@
               return null;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** defines list 'RELEASE;WIN32;NO_SANITY_CHECKS;;SOMETHING_ELSE'
        *
        */
  @@ -614,7 +614,7 @@
           else return "/DEFINE:"+_definitions;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** list of extra modules to refer to 
        *
        */
  @@ -637,7 +637,7 @@
           else return "/addmodule:"+_additionalModules;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** output file. If not supplied this is derived from the
        *  source file
        */
  @@ -661,7 +661,7 @@
           return "/out:"+f.toString();
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** flag to control action on execution trouble
        */
   
  @@ -679,7 +679,7 @@
           return _failOnError;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** reset all contents. 
        */
       public void Clear() {
  @@ -701,7 +701,7 @@
       }
   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** do the work by building the command line and then calling it
        */
   
  
  
  
  1.2       +26 -29    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  
  Index: Ilasm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ilasm.java	2000/11/09 16:18:50	1.1
  +++ Ilasm.java	2000/11/25 02:38:42	1.2
  @@ -1,11 +1,11 @@
  -/* -*-Java-*-
  +/*
   *******************************************************************
   *
   * File:         Csharp.java
  -* RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v 1.1 2000/11/09 16:18:50 bodewig Exp $
  +* RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v 1.2 2000/11/25 02:38:42 donaldp Exp $
   * Author:       Steve Loughran
   * Created:      July 21,  2000
  -* Modified:		$Modtime: 00-11-01 10:25 $
  +* Modified:                $Modtime: 00-11-01 10:25 $
   * Language:     Java
   * Status:       Experimental 
   *
  @@ -85,12 +85,12 @@
   // imports
   // ====================================================================
   
  +import java.io.*;
  +import java.text.*;
  +import java.util.*;
   import org.apache.tools.ant.*;
   import org.apache.tools.ant.taskdefs.*;
   import org.apache.tools.ant.types.*;
  -import java.io.*;
  -import java.util.*;
  -import java.text.*;
   
   /**
      Task to assemble .net 'Intermediate Language' files.
  @@ -213,7 +213,7 @@
   public class Ilasm
       extends org.apache.tools.ant.taskdefs.MatchingTask {
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** constructor inits everything and set up the search pattern
        */
   
  @@ -241,7 +241,7 @@
        */
       protected static final String exe_title="ilasm";
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** reset all contents. 
        */
       public void Clear() {
  @@ -257,7 +257,7 @@
           _owner=null;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** source directory upon which the search pattern is applied
        */
       private File _srcDir;
  @@ -270,7 +270,7 @@
       }
   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** type of target. Should be one of exe|library|module|winexe|(null)
           default is exe; the actual value (if not null) is fed to the command line.
           <br>See /target
  @@ -286,7 +286,7 @@
           throws  BuildException {
           targetType=targetType.toLowerCase();
           if(targetType.equals("exe") || targetType.equals("library")) {
  -            _targetType=targetType;	
  +            _targetType=targetType;        
           }
           else 
               throw new BuildException("targetType " +targetType+" is not a valid type");
  @@ -294,7 +294,7 @@
   
       public String getTargetType() { 
           return _targetType;
  -    } 	
  +    }         
   
       /** get the argument or null for no argument needed
        */
  @@ -309,9 +309,9 @@
                   return "/dll";
               else
                   return null;
  -    }	
  -	
  -    //=============================================================================	
  +    }        
  +        
  +    //=============================================================================        
       /** owner string is a slightly trivial barrier to disassembly
        */
   
  @@ -328,7 +328,7 @@
               return null;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** test for a string containing something useful
        * @param string to test
        * @returns true if the argument is not null or empty
  @@ -336,7 +336,7 @@
       protected boolean notEmpty(String s)
       {return s!=null && s.length()!=0;}
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** verbose flag
        */
        
  @@ -350,7 +350,7 @@
           return _verbose?null:"/quiet";
       }   
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** listing flag
        */
        
  @@ -364,7 +364,7 @@
           return _listing?"/listing":"/nolisting";
       }
      
  -    //=============================================================================	
  +    //=============================================================================        
       /** output file. If not supplied this is derived from the
        *  source file
        */
  @@ -388,7 +388,7 @@
           return "/output="+f.toString();
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** resource file (.res format) to include in the app. 
        */
    
  @@ -406,7 +406,7 @@
               return null;
       }
      
  -    //=============================================================================	
  +    //=============================================================================        
       /** flag to control action on execution trouble
        */
   
  @@ -424,7 +424,7 @@
           return _failOnError;
       }
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** debug flag. Controls generation of debug information. 
        */
    
  @@ -436,7 +436,7 @@
    
       public void setDebug(boolean f)
       {_debug=f;}
  -	
  +        
       /** query the debug flag
        * @return true if debug is turned on
        */
  @@ -449,9 +449,9 @@
        */
       protected String getDebugParameter() {
           return _debug?"/debug":null;
  -    }	
  +    }        
      
  -    //=============================================================================	
  +    //=============================================================================        
       /** This is the execution entry point. Build a list of files and
        *  call ilasm on each of them.
        */
  @@ -475,7 +475,7 @@
       
       } // end execute
   
  -    //=============================================================================	
  +    //=============================================================================        
       /** do the work by building the command line and then calling it
        */
   
  @@ -504,7 +504,4 @@
           //now run the command of exe + settings + file
           command.runCommand();
       } // end executeOneFile
  -
  -
  -
   } //class
  
  
  
  1.2       +5 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  
  Index: NetCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NetCommand.java	2000/11/09 16:18:50	1.1
  +++ NetCommand.java	2000/11/25 02:38:43	1.2
  @@ -1,8 +1,8 @@
  -/* -*-Java-*-
  +/*
    *******************************************************************
    *
    * File:         CSharp.java
  - * RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v 1.1 2000/11/09 16:18:50 bodewig Exp $
  + * RCS:          $Header: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v 1.2 2000/11/25 02:38:43 donaldp Exp $
    * Author:       Steve Loughran
    * Created:      July 21,  2000
    * Modified:     $Modtime: 00-11-01 10:09 $
  @@ -78,12 +78,12 @@
   
   // imports
   
  +import java.io.*;
  +import java.text.*;
  +import java.util.*;
   import org.apache.tools.ant.*;
   import org.apache.tools.ant.taskdefs.*;
   import org.apache.tools.ant.types.*;
  -import java.io.*;
  -import java.util.*;
  -import java.text.*;
   
   
   
  @@ -232,6 +232,4 @@
               throw new BuildException(_title+" failed: " + e, e, _owner.getLocation());
           }
       }
  -
  -
   } //class
  
  
  
  1.7       +3 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  
  Index: GenericDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- GenericDeploymentTool.java	2000/11/11 15:11:41	1.6
  +++ GenericDeploymentTool.java	2000/11/25 02:38:44	1.7
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs.optional.ejb;
   
   import java.io.*;
  @@ -345,9 +344,9 @@
               
               // now the vendor specific files, if any             
               addVendorFiles(ejbFiles, baseName);
  -			
  -		    // add any inherited files
  -		    checkAndAddInherited(ejbFiles);
  +
  +            // add any inherited files
  +            checkAndAddInherited(ejbFiles);
   
               // Lastly create File object for the Jar files. If we are using
               // a flat destination dir, then we need to redefine baseName!
  
  
  
  1.2       +68 -15    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java
  
  Index: InnerClassFilenameFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/InnerClassFilenameFilter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InnerClassFilenameFilter.java	2000/09/24 11:50:18	1.1
  +++ InnerClassFilenameFilter.java	2000/11/25 02:38:44	1.2
  @@ -1,23 +1,76 @@
  +/*
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2000 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.
  + *
  + * 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.
  + *
  + * 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.
  + *
  + * 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.
  + *
  + * 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.
  + *
  + * 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
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * 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
  + * <http://www.apache.org/>.
  + */
   package org.apache.tools.ant.taskdefs.optional.ejb;
   
   import java.io.*;
   
   public class InnerClassFilenameFilter implements FilenameFilter {
  -	private String baseClassName;
  +    private String baseClassName;
   
  -	InnerClassFilenameFilter(String baseclass){
  -		int extidx = baseclass.lastIndexOf(".class");
  -		if (extidx == -1) {
  -			extidx = baseclass.length()-1;
  -		}
  -		baseClassName = baseclass.substring(0,extidx);
  -	}
  +    InnerClassFilenameFilter(String baseclass){
  +        int extidx = baseclass.lastIndexOf(".class");
  +        if (extidx == -1) {
  +            extidx = baseclass.length()-1;
  +        }
  +        baseClassName = baseclass.substring(0,extidx);
  +    }
   
  -	public boolean accept (File Dir, String filename){
  -        	if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) 
  -		    || (filename.indexOf(baseClassName + "$") != 0)) {
  -				return false;
  -		}
  -		return true;
  -	}
  +    public boolean accept (File Dir, String filename){
  +        if ((filename.lastIndexOf(".") != filename.lastIndexOf(".class")) 
  +            || (filename.indexOf(baseClassName + "$") != 0)) {
  +            return false;
  +        }
  +        return true;
  +    }
   }
  
  
  
  1.2       +148 -148  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
  
  Index: VAJExport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJExport.java	2000/11/07 20:19:49	1.1
  +++ VAJExport.java	2000/11/25 02:38:45	1.2
  @@ -54,18 +54,18 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
  -import org.apache.tools.ant.types.PatternSet;
  +
   
   import com.ibm.ivj.util.base.ExportCodeSpec;
   import com.ibm.ivj.util.base.IvjException;
   import com.ibm.ivj.util.base.Package;
  -
   import java.io.File;
  -import java.util.Vector;
   import java.util.Enumeration;
  +import java.util.Vector;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.types.PatternSet;
   
   /**
    * Export packages from the Visual Age for Java workspace. 
  @@ -96,145 +96,145 @@
    */
   
   public class VAJExport extends Task {
  -	protected File destDir;
  -	protected boolean exportSources = true;
  -	protected boolean exportResources = true;
  -	protected boolean exportClasses = false;
  -	protected boolean exportDebugInfo = false;
  -	protected boolean useDefaultExcludes = true;
  -
  -	protected PatternSet patternSet = new PatternSet();
  -
  -	/**
  -	 * add a name entry on the exclude list
  -	 */
  -	public PatternSet.NameEntry createExclude() {
  -		return patternSet.createExclude();
  -	}
  -
  -	/**
  -	 * add a name entry on the include list
  -	 */
  -	public PatternSet.NameEntry createInclude() {
  -		return patternSet.createInclude();
  -	}
  -
  -	/**
  -	 * do the export
  -	 */
  -	public void execute() throws BuildException {
  -		// first off, make sure that we've got a destdir
  -		if (destDir == null) {
  -			throw new BuildException("destdir attribute must be set!");
  -		}
  -
  -		VAJWorkspaceScanner ds = this.getWorkspaceScanner();
  -
  -		Package[] packages = ds.getIncludedPackages();
  -
  -		export(packages);
  -	}
  -
  -	/**
  -	 * export the array of Packages
  -	 */
  -	public void export(Package[] packages) {
  -		try {
  -			String dest = destDir.getAbsolutePath();
  -
  -			log("Exporting " + packages.length + " package(s) to " + dest);
  -			for (int i = 0; i < packages.length; i++) {
  -				log("    " + packages[i].getName(), Project.MSG_VERBOSE);
  -			}
  -
  -			ExportCodeSpec exportSpec = new ExportCodeSpec();
  -
  -			exportSpec.setPackages(packages);
  -			exportSpec.includeJava(exportSources);
  -			exportSpec.includeClass(exportClasses);
  -			exportSpec.includeResources(exportResources);
  -			exportSpec.includeClassDebugInfo(exportDebugInfo);
  -			exportSpec.useSubdirectories(true);
  -			exportSpec.overwriteFiles(true);
  -			exportSpec.setExportDirectory(dest);
  -			VAJUtil.getWorkspace().exportData(exportSpec);
  -		} catch (IvjException ex) {
  -			throw VAJUtil.createBuildException("Exporting failed!", ex);
  -		}
  -	}
  -
  -	/**
  -	 * Returns the directory scanner needed to access the files to process.
  -	 */
  -	protected VAJWorkspaceScanner getWorkspaceScanner() {
  -		VAJWorkspaceScanner scanner = new VAJWorkspaceScanner();
  -		scanner.setIncludes(patternSet.getIncludePatterns(getProject()));
  -		scanner.setExcludes(patternSet.getExcludePatterns(getProject()));
  -		if (useDefaultExcludes)
  -			scanner.addDefaultExcludes();
  -		scanner.scan();
  -		return scanner;
  -	}
  -
  -	/**
  -	 * Sets whether default exclusions should be used or not.
  -	 *
  -	 * @param useDefaultExcludes "true"|"on"|"yes" when default exclusions 
  -	 *                           should be used, "false"|"off"|"no" when they
  -	 *                           shouldn't be used.
  -	 */
  -	public void setDefaultexcludes(boolean useDefaultExcludes) {
  -		this.useDefaultExcludes = useDefaultExcludes;
  -	}
  -
  -	/**
  -	 * Set the destination directory into which the Java source
  -	 * files should be compiled.
  -	 */
  -	public void setDestdir(File destDir) {
  -		this.destDir = destDir;
  -	}
  -
  -	/**
  -	 * Sets the set of exclude patterns. Patterns may be separated by a comma
  -	 * or a space.
  -	 *
  -	 * @param excludes the string containing the exclude patterns
  -	 */
  -	public void setExcludes(String excludes) {
  -		patternSet.setExcludes(excludes);
  -	}
  -
  -	/**
  -	 */
  -	public void setExportClasses(boolean doExport) {
  -		exportClasses = doExport;
  -	}
  -
  -	/**
  -	 */
  -	public void setExportDebugInfo(boolean doExport) {
  -		exportDebugInfo = doExport;
  -	}
  -
  -	/**
  -	 */
  -	public void setExportResources(boolean doExport) {
  -		exportResources = doExport;
  -	}
  -
  -	/**
  -	 */
  -	public void setExportSources(boolean doExport) {
  -		exportSources = doExport;
  -	}
  -	/**
  -	 * Sets the set of include patterns. Patterns may be separated by a comma
  -	 * or a space.
  -	 *
  -	 * @param includes the string containing the include patterns
  -	 */
  -	public void setIncludes(String includes) {
  -		patternSet.setIncludes(includes);
  -	}
  -}
  \ No newline at end of file
  +    protected File destDir;
  +    protected boolean exportSources = true;
  +    protected boolean exportResources = true;
  +    protected boolean exportClasses = false;
  +    protected boolean exportDebugInfo = false;
  +    protected boolean useDefaultExcludes = true;
  +
  +    protected PatternSet patternSet = new PatternSet();
  +
  +    /**
  +     * add a name entry on the exclude list
  +     */
  +    public PatternSet.NameEntry createExclude() {
  +        return patternSet.createExclude();
  +    }
  +
  +    /**
  +     * add a name entry on the include list
  +     */
  +    public PatternSet.NameEntry createInclude() {
  +        return patternSet.createInclude();
  +    }
  +
  +    /**
  +     * do the export
  +     */
  +    public void execute() throws BuildException {
  +        // first off, make sure that we've got a destdir
  +        if (destDir == null) {
  +            throw new BuildException("destdir attribute must be set!");
  +        }
  +
  +        VAJWorkspaceScanner ds = this.getWorkspaceScanner();
  +
  +        Package[] packages = ds.getIncludedPackages();
  +
  +        export(packages);
  +    }
  +
  +    /**
  +     * export the array of Packages
  +     */
  +    public void export(Package[] packages) {
  +        try {
  +            String dest = destDir.getAbsolutePath();
  +
  +            log("Exporting " + packages.length + " package(s) to " + dest);
  +            for (int i = 0; i < packages.length; i++) {
  +                log("    " + packages[i].getName(), Project.MSG_VERBOSE);
  +            }
  +
  +            ExportCodeSpec exportSpec = new ExportCodeSpec();
  +
  +            exportSpec.setPackages(packages);
  +            exportSpec.includeJava(exportSources);
  +            exportSpec.includeClass(exportClasses);
  +            exportSpec.includeResources(exportResources);
  +            exportSpec.includeClassDebugInfo(exportDebugInfo);
  +            exportSpec.useSubdirectories(true);
  +            exportSpec.overwriteFiles(true);
  +            exportSpec.setExportDirectory(dest);
  +            VAJUtil.getWorkspace().exportData(exportSpec);
  +        } catch (IvjException ex) {
  +            throw VAJUtil.createBuildException("Exporting failed!", ex);
  +        }
  +    }
  +
  +    /**
  +     * Returns the directory scanner needed to access the files to process.
  +     */
  +    protected VAJWorkspaceScanner getWorkspaceScanner() {
  +        VAJWorkspaceScanner scanner = new VAJWorkspaceScanner();
  +        scanner.setIncludes(patternSet.getIncludePatterns(getProject()));
  +        scanner.setExcludes(patternSet.getExcludePatterns(getProject()));
  +        if (useDefaultExcludes)
  +            scanner.addDefaultExcludes();
  +        scanner.scan();
  +        return scanner;
  +    }
  +
  +    /**
  +     * Sets whether default exclusions should be used or not.
  +     *
  +     * @param useDefaultExcludes "true"|"on"|"yes" when default exclusions 
  +     *                           should be used, "false"|"off"|"no" when they
  +     *                           shouldn't be used.
  +     */
  +    public void setDefaultexcludes(boolean useDefaultExcludes) {
  +        this.useDefaultExcludes = useDefaultExcludes;
  +    }
  +
  +    /**
  +     * Set the destination directory into which the Java source
  +     * files should be compiled.
  +     */
  +    public void setDestdir(File destDir) {
  +        this.destDir = destDir;
  +    }
  +
  +    /**
  +     * Sets the set of exclude patterns. Patterns may be separated by a comma
  +     * or a space.
  +     *
  +     * @param excludes the string containing the exclude patterns
  +     */
  +    public void setExcludes(String excludes) {
  +        patternSet.setExcludes(excludes);
  +    }
  +
  +    /**
  +     */
  +    public void setExportClasses(boolean doExport) {
  +        exportClasses = doExport;
  +    }
  +
  +    /**
  +     */
  +    public void setExportDebugInfo(boolean doExport) {
  +        exportDebugInfo = doExport;
  +    }
  +
  +    /**
  +     */
  +    public void setExportResources(boolean doExport) {
  +        exportResources = doExport;
  +    }
  +
  +    /**
  +     */
  +    public void setExportSources(boolean doExport) {
  +        exportSources = doExport;
  +    }
  +    /**
  +     * Sets the set of include patterns. Patterns may be separated by a comma
  +     * or a space.
  +     *
  +     * @param includes the string containing the include patterns
  +     */
  +    public void setIncludes(String includes) {
  +        patternSet.setIncludes(includes);
  +    }
  +}
  
  
  
  1.3       +223 -221  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
  
  Index: VAJImport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJImport.java	2000/11/09 14:45:44	1.2
  +++ VAJImport.java	2000/11/25 02:38:45	1.3
  @@ -54,20 +54,20 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.tools.ant.Task;
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.types.FileSet;
  +
   
   import com.ibm.ivj.util.base.ImportCodeSpec;
   import com.ibm.ivj.util.base.IvjException;
   import com.ibm.ivj.util.base.Project;
   import com.ibm.ivj.util.base.ProjectEdition;
   import com.ibm.ivj.util.base.Type;
  -
   import java.io.File;
  -import java.util.Vector;
   import java.util.Enumeration;
  +import java.util.Vector;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.DirectoryScanner;
  +import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.types.FileSet;
   
   /**
    * Import source, class files, and resources to the Visual Age for Java 
  @@ -123,218 +123,220 @@
    * @author: Glenn McAllister, inspired by a similar task written by Peter Kelley
    */
   public class VAJImport extends Task {
  -	protected Vector filesets = new Vector();
  -	protected boolean importSources = true;
  -	protected boolean importResources = true;
  -	protected boolean importClasses = false;
  -	protected String importProject = null;
  -	protected Project vajproject = null;
  -
  -	/**
  -	 * The VisualAge for Java Project name to import into.
  -	 */
  -	public void setProject(String projectName) {
  -		this.importProject = projectName;
  -	}
  -
  -	/**
  -	 * Adds a set of files (nested fileset attribute).
  -	 */
  -	public void addFileset(FileSet set) {
  -		filesets.addElement(set);
  -	}
  -
  -	/**
  -	 * Import .class files.
  -	 */
  -	public void setImportClasses(boolean importClasses) {
  -		this.importClasses = importClasses;
  -	}
  -
  -	/**
  -	 * Import resource files (anything that doesn't end in
  -	 * .class or .java)
  -	 */
  -	public void setImportResources(boolean importResources) {
  -		this.importResources = importResources;
  -	}
  -
  -	/**
  -	 * Import .java files
  -	 */
  -	public void setImportSources(boolean importSources) {
  -		this.importSources = importSources;
  -	}
  -
  -	/**
  -	 * Do the import.
  -	 */
  -	public void execute() throws BuildException {
  -		if (filesets.size() == 0) {
  -			throw new BuildException("At least one fileset is required!");
  -		}
  -
  -		if (importProject == null || "".equals(importProject)) {
  -			throw new BuildException("The VisualAge for Java Project name is required!");
  -		}
  -
  -		vajproject = getVAJProject();
  -		if (vajproject == null) {
  -			try {
  -				vajproject = VAJUtil.getWorkspace().createProject(this.importProject, true);
  -			} catch (IvjException e) {
  -				throw VAJUtil.createBuildException(
  -					"Error while creating Project " + importProject + ": ", 
  -					e); 
  -			}
  -		}
  -
  -		for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
  -			importFileset((FileSet) e.nextElement());
  -		}
  -	}
  -
  -	/**
  -	 * Try to get the project we want from the Workspace.
  -	 */
  -	protected Project getVAJProject() {
  -		Project found = null;
  -		Project[] currentProjects = VAJUtil.getWorkspace().getProjects();
  -
  -		for (int i = 0; i < currentProjects.length; i++) {
  -			Project p = currentProjects[i];
  -			if (p.getName().equals(this.importProject)) {
  -				found = p;
  -				break;
  -			}
  -		}
  -
  -		return found;
  -	}
  -
  -	/**
  -	 * Import all files from the fileset into the Project in the
  -	 * Workspace.
  -	 */
  -	protected void importFileset(FileSet fileset) {
  -		DirectoryScanner ds = fileset.getDirectoryScanner(this.project);
  -		if (ds.getIncludedFiles().length == 0) {
  -			return;
  -		}
  -
  -		Vector classes = new Vector();
  -		Vector sources = new Vector();
  -		Vector resources = new Vector();
  -
  -		String[] classesArr = null;
  -		String[] sourcesArr = null;
  -		String[] resourcesArr = null;
  -
  -		StringBuffer msg = new StringBuffer();
  -		msg.append("Importing ");
  -		String connector = "";
  -
  -		ImportCodeSpec importSpec = new ImportCodeSpec();
  -		importSpec.setDefaultProject(vajproject);
  -
  -		scan(
  -			fileset.getDir(this.project), 
  -			ds.getIncludedFiles(), 
  -			classes, 
  -			sources, 
  -			resources); 
  -
  -		if (importClasses) {
  -			classesArr = new String[classes.size()];
  -			classes.copyInto(classesArr);
  -			importSpec.setClassFiles(classesArr);
  -			if (classesArr.length > 0) {
  -				logFiles(classes, "class");
  -				msg.append( classesArr.length );
  -				msg.append( " class " );
  -				msg.append( classesArr.length > 1 ? "files" : "file" );
  -				connector = ", ";
  -			}
  -		}
  -
  -		if (importSources) {
  -			sourcesArr = new String[sources.size()];
  -			sources.copyInto(sourcesArr);
  -			importSpec.setJavaFiles(sourcesArr);
  -			if (sourcesArr.length > 0) {
  -				logFiles(sources, "source");
  -				msg.append( connector );
  -				msg.append( sourcesArr.length );
  -				msg.append( " source " );
  -				msg.append( sourcesArr.length > 1 ? "files" : "file" );
  -				connector = ", ";
  -			}
  -		}
  -
  -		if (importResources) {
  -			String resourcePath = fileset.getDir(this.project).getAbsolutePath();
  -			resourcesArr = new String[resources.size()];
  -			resources.copyInto(resourcesArr);
  -			importSpec.setResourcePath(resourcePath);
  -			importSpec.setResourceFiles(resourcesArr);
  -			if (resourcesArr.length > 0) {
  -				logFiles(resources, "resource");
  -				log( "  (relative to resource path '" + resourcePath + "')", org.apache.tools.ant.Project.MSG_VERBOSE );
  -				msg.append( connector );
  -				msg.append( resourcesArr.length );
  -				msg.append( " resource " );
  -				msg.append( resourcesArr.length > 1 ? "files" : "file" );
  -			}
  -		}
  -
  -		msg.append( " into the " );
  -		msg.append( importProject );
  -		msg.append( " project." );
  -
  -		log(msg.toString());
  -		
  -		try {
  -			Type[] importedTypes = VAJUtil.getWorkspace().importData(importSpec);
  -			if (importedTypes == null) {
  -				throw new BuildException("Unable to import into Workspace!");
  -			}
  -		} catch (IvjException ivje) {
  -			VAJUtil.createBuildException("Error while importing into Workspace: ", ivje);
  -		}
  -	}
  -
  -	/**
  -	 * Sort the files into classes, sources, and resources.
  -	 */
  -	protected void scan(
  -		File dir, 
  -		String[] files, 
  -		Vector classes, 
  -		Vector sources, 
  -		Vector resources) {
  -		for (int i = 0; i < files.length; i++) {
  -			String file = (new File(dir, files[i])).getAbsolutePath();
  -			if (file.endsWith(".java") || file.endsWith(".JAVA")) {
  -				sources.addElement(file);
  -			} else
  -				if (file.endsWith(".class") || file.endsWith(".CLASS")) {
  -					classes.addElement(file);
  -				} else {
  -					// for resources VA expects the path relative to the resource path
  -					resources.addElement(files[i]);
  -				}
  -		}
  -	}
  -		
  -	/**
  -	 * Logs a list of file names to the message log
  -	 * @param fileNames java.util.Vector file names to be logged
  -	 * @param type java.lang.String file type
  -	 */
  -	protected void logFiles(Vector fileNames, String fileType) {
  -		log(  fileType + " files found for import:", org.apache.tools.ant.Project.MSG_VERBOSE);
  -		for ( Enumeration e = fileNames.elements(); e.hasMoreElements(); ) {
  -			log( "    " + e.nextElement(), org.apache.tools.ant.Project.MSG_VERBOSE );
  -		}
  -	} 
  -}
  \ No newline at end of file
  +    protected Vector filesets = new Vector();
  +    protected boolean importSources = true;
  +    protected boolean importResources = true;
  +    protected boolean importClasses = false;
  +    protected String importProject = null;
  +    protected Project vajproject = null;
  +
  +    /**
  +     * The VisualAge for Java Project name to import into.
  +     */
  +    public void setProject(String projectName) {
  +        this.importProject = projectName;
  +    }
  +
  +    /**
  +     * Adds a set of files (nested fileset attribute).
  +     */
  +    public void addFileset(FileSet set) {
  +        filesets.addElement(set);
  +    }
  +
  +    /**
  +     * Import .class files.
  +     */
  +    public void setImportClasses(boolean importClasses) {
  +        this.importClasses = importClasses;
  +    }
  +
  +    /**
  +     * Import resource files (anything that doesn't end in
  +     * .class or .java)
  +     */
  +    public void setImportResources(boolean importResources) {
  +        this.importResources = importResources;
  +    }
  +
  +    /**
  +     * Import .java files
  +     */
  +    public void setImportSources(boolean importSources) {
  +        this.importSources = importSources;
  +    }
  +
  +    /**
  +     * Do the import.
  +     */
  +    public void execute() throws BuildException {
  +        if (filesets.size() == 0) {
  +            throw new BuildException("At least one fileset is required!");
  +        }
  +
  +        if (importProject == null || "".equals(importProject)) {
  +            throw new BuildException("The VisualAge for Java Project name is required!");
  +        }
  +
  +        vajproject = getVAJProject();
  +        if (vajproject == null) {
  +            try {
  +                vajproject = VAJUtil.getWorkspace().createProject(this.importProject, true);
  +            } catch (IvjException e) {
  +                throw VAJUtil.createBuildException( "Error while creating Project " + 
  +                                                    importProject + ": ", 
  +                                                    e ); 
  +            }
  +        }
  +
  +        for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
  +            importFileset((FileSet) e.nextElement());
  +        }
  +    }
  +
  +    /**
  +     * Try to get the project we want from the Workspace.
  +     */
  +    protected Project getVAJProject() {
  +        Project found = null;
  +        Project[] currentProjects = VAJUtil.getWorkspace().getProjects();
  +
  +        for (int i = 0; i < currentProjects.length; i++) {
  +            Project p = currentProjects[i];
  +            if (p.getName().equals(this.importProject)) {
  +                found = p;
  +                break;
  +            }
  +        }
  +
  +        return found;
  +    }
  +
  +    /**
  +     * Import all files from the fileset into the Project in the
  +     * Workspace.
  +     */
  +    protected void importFileset(FileSet fileset) {
  +        DirectoryScanner ds = fileset.getDirectoryScanner(this.project);
  +        if (ds.getIncludedFiles().length == 0) {
  +            return;
  +        }
  +
  +        Vector classes = new Vector();
  +        Vector sources = new Vector();
  +        Vector resources = new Vector();
  +
  +        String[] classesArr = null;
  +        String[] sourcesArr = null;
  +        String[] resourcesArr = null;
  +
  +        StringBuffer msg = new StringBuffer();
  +        msg.append("Importing ");
  +        String connector = "";
  +
  +        ImportCodeSpec importSpec = new ImportCodeSpec();
  +        importSpec.setDefaultProject(vajproject);
  +
  +        scan(
  +             fileset.getDir(this.project), 
  +             ds.getIncludedFiles(), 
  +             classes, 
  +             sources, 
  +             resources); 
  +
  +        if (importClasses) {
  +            classesArr = new String[classes.size()];
  +            classes.copyInto(classesArr);
  +            importSpec.setClassFiles(classesArr);
  +            if (classesArr.length > 0) {
  +                logFiles(classes, "class");
  +                msg.append( classesArr.length );
  +                msg.append( " class " );
  +                msg.append( classesArr.length > 1 ? "files" : "file" );
  +                connector = ", ";
  +            }
  +        }
  +
  +        if (importSources) {
  +            sourcesArr = new String[sources.size()];
  +            sources.copyInto(sourcesArr);
  +            importSpec.setJavaFiles(sourcesArr);
  +            if (sourcesArr.length > 0) {
  +                logFiles(sources, "source");
  +                msg.append( connector );
  +                msg.append( sourcesArr.length );
  +                msg.append( " source " );
  +                msg.append( sourcesArr.length > 1 ? "files" : "file" );
  +                connector = ", ";
  +            }
  +        }
  +
  +        if (importResources) {
  +            String resourcePath = fileset.getDir(this.project).getAbsolutePath();
  +            resourcesArr = new String[resources.size()];
  +            resources.copyInto(resourcesArr);
  +            importSpec.setResourcePath(resourcePath);
  +            importSpec.setResourceFiles(resourcesArr);
  +            if (resourcesArr.length > 0) {
  +                logFiles(resources, "resource");
  +                log( "  (relative to resource path '" + resourcePath + "')", 
  +                     org.apache.tools.ant.Project.MSG_VERBOSE );
  +
  +                msg.append( connector );
  +                msg.append( resourcesArr.length );
  +                msg.append( " resource " );
  +                msg.append( resourcesArr.length > 1 ? "files" : "file" );
  +            }
  +        }
  +
  +        msg.append( " into the " );
  +        msg.append( importProject );
  +        msg.append( " project." );
  +
  +        log(msg.toString());
  +                
  +        try {
  +            Type[] importedTypes = VAJUtil.getWorkspace().importData(importSpec);
  +            if (importedTypes == null) {
  +                throw new BuildException("Unable to import into Workspace!");
  +            }
  +        } catch (IvjException ivje) {
  +            VAJUtil.createBuildException("Error while importing into Workspace: ", ivje);
  +        }
  +    }
  +
  +    /**
  +     * Sort the files into classes, sources, and resources.
  +     */
  +    protected void scan(
  +                        File dir, 
  +                        String[] files, 
  +                        Vector classes, 
  +                        Vector sources, 
  +                        Vector resources) {
  +        for (int i = 0; i < files.length; i++) {
  +            String file = (new File(dir, files[i])).getAbsolutePath();
  +            if (file.endsWith(".java") || file.endsWith(".JAVA")) {
  +                sources.addElement(file);
  +            } else
  +                if (file.endsWith(".class") || file.endsWith(".CLASS")) {
  +                    classes.addElement(file);
  +                } else {
  +                    // for resources VA expects the path relative to the resource path
  +                    resources.addElement(files[i]);
  +                }
  +        }
  +    }
  +                
  +    /**
  +     * Logs a list of file names to the message log
  +     * @param fileNames java.util.Vector file names to be logged
  +     * @param type java.lang.String file type
  +     */
  +    protected void logFiles(Vector fileNames, String fileType) {
  +        log(  fileType + " files found for import:", org.apache.tools.ant.Project.MSG_VERBOSE);
  +        for ( Enumeration e = fileNames.elements(); e.hasMoreElements(); ) {
  +            log( "    " + e.nextElement(), org.apache.tools.ant.Project.MSG_VERBOSE );
  +        }
  +    } 
  +}
  
  
  
  1.2       +174 -174  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
  
  Index: VAJLoadProjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJLoadProjects.java	2000/11/07 20:19:49	1.1
  +++ VAJLoadProjects.java	2000/11/25 02:38:46	1.2
  @@ -54,15 +54,15 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
   
  +
   import com.ibm.ivj.util.base.IvjException;
   import com.ibm.ivj.util.base.ProjectEdition;
  -
  -import java.util.Vector;
   import java.util.Enumeration;
  +import java.util.Vector;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
   
   /**
    * Load specific project versions into the Visual Age for Java workspace.
  @@ -79,175 +79,175 @@
    */
   
   public class VAJLoadProjects extends Task {
  -	Vector projectDescriptions = new Vector();
  -	Vector expandedProjectDescriptions = new Vector();
  +    Vector projectDescriptions = new Vector();
  +    Vector expandedProjectDescriptions = new Vector();
   
  -	/**
  -	 * Class to maintain VisualAge for Java Workspace Project descriptions.
  -	 */
  -	public class VAJProjectDescription {
  -		private String name;
  -		private String version;
  -		private boolean projectFound;
  -
  -		public VAJProjectDescription() {
  -		}
  -
  -		public VAJProjectDescription(String n, String v) {
  -			name = n;
  -			version = v;
  -		}
  -
  -		public String getName() {
  -			return name;
  -		}
  -
  -		public String getVersion() {
  -			return version;
  -		}
  -
  -		public boolean projectFound() {
  -			return projectFound;
  -		}
  -
  -		public void setName(String newName) {
  -			if (newName == null || newName.equals("")) {
  -				throw new BuildException("name attribute must be set");
  -			}
  -			name = newName;
  -		}
  -
  -		public void setVersion(String newVersion) {
  -			if (newVersion == null || newVersion.equals("")) {
  -				throw new BuildException("version attribute must be set");
  -			}
  -			version = newVersion;
  -		}
  -
  -		public void setProjectFound() {
  -			projectFound = true;
  -		}
  -	}
  +    /**
  +     * Class to maintain VisualAge for Java Workspace Project descriptions.
  +     */
  +    public class VAJProjectDescription {
  +        private String name;
  +        private String version;
  +        private boolean projectFound;
  +
  +        public VAJProjectDescription() {
  +        }
  +
  +        public VAJProjectDescription(String n, String v) {
  +            name = n;
  +            version = v;
  +        }
  +
  +        public String getName() {
  +            return name;
  +        }
  +
  +        public String getVersion() {
  +            return version;
  +        }
  +
  +        public boolean projectFound() {
  +            return projectFound;
  +        }
  +
  +        public void setName(String newName) {
  +            if (newName == null || newName.equals("")) {
  +                throw new BuildException("name attribute must be set");
  +            }
  +            name = newName;
  +        }
  +
  +        public void setVersion(String newVersion) {
  +            if (newVersion == null || newVersion.equals("")) {
  +                throw new BuildException("version attribute must be set");
  +            }
  +            version = newVersion;
  +        }
  +
  +        public void setProjectFound() {
  +            projectFound = true;
  +        }
  +    }
       
  -	/**
  -	 * Add a project description entry on the project list.
  -	 */
  -	public VAJProjectDescription createProject() {
  -		VAJProjectDescription d = new VAJProjectDescription();
  -		projectDescriptions.addElement(d);
  -		return d;
  -	}
  -	/**
  -	 * Load specified projects.
  -	 */
  -	public void execute() {
  -		expandDescriptions();
  -		log(
  -			"Loading " + expandedProjectDescriptions.size() + " project(s) into workspace"); 
  -		for (Enumeration e = expandedProjectDescriptions.elements(); 
  -			e.hasMoreElements(); 
  -			) {
  -			VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  -
  -			ProjectEdition pe = findProjectEdition(d.getName(), d.getVersion());
  -			try {
  -				log(
  -					"Loading " + d.getName() + ", Version " + d.getVersion() + ", into Workspace", 
  -					Project.MSG_VERBOSE); 
  -				pe.loadIntoWorkspace();
  -			} catch (IvjException ex) {
  -				throw VAJUtil.createBuildException(
  -					"Project " + d.getName() + " could not be loaded.", 
  -					ex); 
  -			}
  -		}
  -	}
  -
  -	/**
  -	 */
  -	public void expandDescriptions() {
  -		String[] projectNames;
  -		try {
  -			projectNames = VAJUtil.getWorkspace().getRepository().getProjectNames();
  -		} catch (IvjException e) {
  -			throw VAJUtil.createBuildException("VA Exception occured: ", e);
  -		}
  -
  -		for (int i = 0; i < projectNames.length; i++) {
  -			for (Enumeration e = projectDescriptions.elements(); e.hasMoreElements();) {
  -				VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  -				String pattern = d.getName();
  -				if (VAJWorkspaceScanner.match(pattern, projectNames[i])) {
  -					d.setProjectFound();
  -					expandedProjectDescriptions.addElement(
  -						new VAJProjectDescription(projectNames[i], d.getVersion())); 
  -					break;
  -				}
  -			}
  -		}
  -
  -		for (Enumeration e = projectDescriptions.elements(); e.hasMoreElements();) {
  -			VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  -			if (!d.projectFound()) {
  -				log("No Projects match the name " + d.getName(), Project.MSG_WARN);
  -			}
  -		}
  -	}
  -
  -	/**
  -	 */
  -	public static Vector findMatchingProjects(String pattern) {
  -		String[] projectNames;
  -		try {
  -			projectNames = VAJUtil.getWorkspace().getRepository().getProjectNames();
  -		} catch (IvjException e) {
  -			throw VAJUtil.createBuildException("VA Exception occured: ", e);
  -		}
  -
  -		Vector matchingProjects = new Vector();
  -		for (int i = 0; i < projectNames.length; i++) {
  -			if (VAJWorkspaceScanner.match(pattern, projectNames[i])) {
  -				matchingProjects.addElement(projectNames[i]);
  -			}
  -		}
  -
  -		return matchingProjects;
  -	}
  -
  -	/**
  -	 * Finds a specific project edition in the repository.
  -	 *
  -	 * @param name project name
  -	 * @param versionName project version name
  -	 * @return com.ibm.ivj.util.base.ProjectEdition
  -	 */
  -	public static ProjectEdition findProjectEdition(
  -		String name, 
  -		String versionName) {
  -		try {
  -			ProjectEdition[] editions = null;
  -			editions = VAJUtil.getWorkspace().getRepository().getProjectEditions(name);
  -
  -			if (editions == null) {
  -				throw new BuildException("Project " + name + " doesn't exist");
  -			}
  -
  -			ProjectEdition pe = null;
  -
  -			for (int i = 0; i < editions.length && pe == null; i++) {
  -				if (versionName.equals(editions[i].getVersionName())) {
  -					pe = editions[i];
  -				}
  -			}
  -			if (pe == null) {
  -				throw new BuildException(
  -					"Version " + versionName + " of Project " + name + " doesn't exist"); 
  -			}
  -			return pe;
  -
  -		} catch (IvjException e) {
  -			throw VAJUtil.createBuildException("VA Exception occured: ", e);
  -		}
  +    /**
  +     * Add a project description entry on the project list.
  +     */
  +    public VAJProjectDescription createProject() {
  +        VAJProjectDescription d = new VAJProjectDescription();
  +        projectDescriptions.addElement(d);
  +        return d;
  +    }
  +    /**
  +     * Load specified projects.
  +     */
  +    public void execute() {
  +        expandDescriptions();
  +        log(
  +            "Loading " + expandedProjectDescriptions.size() + " project(s) into workspace"); 
  +        for (Enumeration e = expandedProjectDescriptions.elements(); 
  +             e.hasMoreElements(); 
  +             ) {
  +            VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  +
  +            ProjectEdition pe = findProjectEdition(d.getName(), d.getVersion());
  +            try {
  +                log( "Loading " + d.getName() + ", Version " + d.getVersion() + 
  +                     ", into Workspace", 
  +                     Project.MSG_VERBOSE ); 
  +                pe.loadIntoWorkspace();
  +            } catch (IvjException ex) {
  +                throw VAJUtil.createBuildException( "Project " + d.getName() + 
  +                                                    " could not be loaded.", 
  +                                                    ex ); 
  +            }
  +        }
  +    }
  +
  +    /**
  +     */
  +    public void expandDescriptions() {
  +        String[] projectNames;
  +        try {
  +            projectNames = VAJUtil.getWorkspace().getRepository().getProjectNames();
  +        } catch (IvjException e) {
  +            throw VAJUtil.createBuildException("VA Exception occured: ", e);
  +        }
  +
  +        for (int i = 0; i < projectNames.length; i++) {
  +            for (Enumeration e = projectDescriptions.elements(); e.hasMoreElements();) {
  +                VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  +                String pattern = d.getName();
  +                if (VAJWorkspaceScanner.match(pattern, projectNames[i])) {
  +                    d.setProjectFound();
  +                    expandedProjectDescriptions.
  +                        addElement(new VAJProjectDescription(projectNames[i], d.getVersion())); 
  +                    break;
  +                }
  +            }
  +        }
  +
  +        for (Enumeration e = projectDescriptions.elements(); e.hasMoreElements();) {
  +            VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
  +            if (!d.projectFound()) {
  +                log("No Projects match the name " + d.getName(), Project.MSG_WARN);
  +            }
  +        }
  +    }
  +
  +    /**
  +     */
  +    public static Vector findMatchingProjects(String pattern) {
  +        String[] projectNames;
  +        try {
  +            projectNames = VAJUtil.getWorkspace().getRepository().getProjectNames();
  +        } catch (IvjException e) {
  +            throw VAJUtil.createBuildException("VA Exception occured: ", e);
  +        }
  +
  +        Vector matchingProjects = new Vector();
  +        for (int i = 0; i < projectNames.length; i++) {
  +            if (VAJWorkspaceScanner.match(pattern, projectNames[i])) {
  +                matchingProjects.addElement(projectNames[i]);
  +            }
  +        }
  +
  +        return matchingProjects;
  +    }
  +
  +    /**
  +     * Finds a specific project edition in the repository.
  +     *
  +     * @param name project name
  +     * @param versionName project version name
  +     * @return com.ibm.ivj.util.base.ProjectEdition
  +     */
  +    public static ProjectEdition findProjectEdition(
  +                                                    String name, 
  +                                                    String versionName) {
  +        try {
  +            ProjectEdition[] editions = null;
  +            editions = VAJUtil.getWorkspace().getRepository().getProjectEditions(name);
  +
  +            if (editions == null) {
  +                throw new BuildException("Project " + name + " doesn't exist");
  +            }
  +
  +            ProjectEdition pe = null;
  +
  +            for (int i = 0; i < editions.length && pe == null; i++) {
  +                if (versionName.equals(editions[i].getVersionName())) {
  +                    pe = editions[i];
  +                }
  +            }
  +            if (pe == null) {
  +                throw new BuildException( "Version " + versionName + " of Project " + 
  +                                          name + " doesn't exist" ); 
  +            }
  +            return pe;
  +
  +        } catch (IvjException e) {
  +            throw VAJUtil.createBuildException("VA Exception occured: ", e);
  +        }
   
  -	}
  -}
  \ No newline at end of file
  +    }
  +}
  
  
  
  1.2       +41 -41    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJUtil.java
  
  Index: VAJUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJUtil.java	2000/11/07 20:19:49	1.1
  +++ VAJUtil.java	2000/11/25 02:38:46	1.2
  @@ -54,9 +54,9 @@
    * <http://www.apache.org/>.
    */
   
  -import com.ibm.ivj.util.base.Workspace;
  -import com.ibm.ivj.util.base.ToolEnv;
   import com.ibm.ivj.util.base.IvjException;
  +import com.ibm.ivj.util.base.ToolEnv;
  +import com.ibm.ivj.util.base.Workspace;
   import org.apache.tools.ant.BuildException;
   
   /**
  @@ -66,43 +66,43 @@
    * @author Wolf Siberski, TUI Infotec GmbH
    */
   class VAJUtil {
  -	static private Workspace workspace;
  -	
  -	/**
  -	 * Wraps IvjException into a BuildException
  -	 *
  -	 * @return org.apache.tools.ant.BuildException
  -	 * @param errMsg Additional error message
  -	 * @param e IvjException which is wrapped
  -	 */
  -	public static BuildException createBuildException(
  -		String errMsg, 
  -		IvjException e) {
  -		errMsg = errMsg + "\n" + e.getMessage();
  -		String[] errors = e.getErrors();
  -		if (errors != null) {
  -			for (int i = 0; i < errors.length; i++) {
  -				errMsg = errMsg + "\n" + errors[i];
  -			}
  -		}
  -		return new BuildException(errMsg);
  -	}
  -	
  -	/**
  -	 * Insert the method's description here.
  -	 * Creation date: (19.09.2000 13:41:21)
  -	 * @return com.ibm.ivj.util.base.Workspace
  -	 */
  -	public static Workspace getWorkspace() {
  -		if (workspace == null) {
  -			workspace = ToolEnv.connectToWorkspace();
  -			if (workspace == null) {
  -				throw new BuildException(
  -					"Unable to connect to Workspace! "
  -						+ "Make sure you are running in VisualAge for Java."); 
  -			}
  -		}
  +    static private Workspace workspace;
  +        
  +    /**
  +     * Wraps IvjException into a BuildException
  +     *
  +     * @return org.apache.tools.ant.BuildException
  +     * @param errMsg Additional error message
  +     * @param e IvjException which is wrapped
  +     */
  +    public static BuildException createBuildException(
  +                                                      String errMsg, 
  +                                                      IvjException e) {
  +        errMsg = errMsg + "\n" + e.getMessage();
  +        String[] errors = e.getErrors();
  +        if (errors != null) {
  +            for (int i = 0; i < errors.length; i++) {
  +                errMsg = errMsg + "\n" + errors[i];
  +            }
  +        }
  +        return new BuildException(errMsg);
  +    }
  +        
  +    /**
  +     * Insert the method's description here.
  +     * Creation date: (19.09.2000 13:41:21)
  +     * @return com.ibm.ivj.util.base.Workspace
  +     */
  +    public static Workspace getWorkspace() {
  +        if (workspace == null) {
  +            workspace = ToolEnv.connectToWorkspace();
  +            if (workspace == null) {
  +                throw new BuildException(
  +                                         "Unable to connect to Workspace! "
  +                                         + "Make sure you are running in VisualAge for Java."); 
  +            }
  +        }
   
  -		return workspace;
  -	}
  -}
  \ No newline at end of file
  +        return workspace;
  +    }
  +}
  
  
  
  1.2       +160 -163  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java
  
  Index: VAJWorkspaceScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJWorkspaceScanner.java	2000/11/07 20:19:49	1.1
  +++ VAJWorkspaceScanner.java	2000/11/25 02:38:47	1.2
  @@ -1,5 +1,3 @@
  -package org.apache.tools.ant.taskdefs.optional.ide;
  -
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -53,15 +51,16 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  +package org.apache.tools.ant.taskdefs.optional.ide;
   
  -import org.apache.tools.ant.DirectoryScanner;
   import com.ibm.ivj.util.base.IvjException;
   import com.ibm.ivj.util.base.Package;
   import com.ibm.ivj.util.base.Project;
  +import java.io.File;
   import java.util.Enumeration;
  -import java.util.Vector;
   import java.util.StringTokenizer;
  -import java.io.File;
  +import java.util.Vector;
  +import org.apache.tools.ant.DirectoryScanner;
   
   /**
    * Class for scanning a Visual Age for Java workspace for packages matching
  @@ -88,162 +87,160 @@
    */
   public class VAJWorkspaceScanner extends DirectoryScanner {
   
  -	/**
  -	 * Patterns that should be excluded by default.
  -	 *
  -	 * @see #addDefaultExcludes()
  -	 */
  -	private final static String[] DEFAULTEXCLUDES = 
  -		{
  -			"IBM*/**", 
  -			"Java class libraries/**", 
  -			"Sun class libraries*/**", 
  -			"JSP Page Compile Generated Code/**", 
  -			"VisualAge*/**", 
  -			}; 
  -
  -	/**
  -	 * The packages that where found and matched at least one includes, and
  -	 * matched no excludes.
  -	 */
  -	private Vector packagesIncluded = new Vector();
  +    /**
  +     * Patterns that should be excluded by default.
  +     *
  +     * @see #addDefaultExcludes()
  +     */
  +    private final static String[] DEFAULTEXCLUDES = 
  +    {
  +        "IBM*/**", 
  +        "Java class libraries/**", 
  +        "Sun class libraries*/**", 
  +        "JSP Page Compile Generated Code/**", 
  +        "VisualAge*/**", 
  +    }; 
  +
  +    /**
  +     * The packages that where found and matched at least one includes, and
  +     * matched no excludes.
  +     */
  +    private Vector packagesIncluded = new Vector();
      
  -	/**
  -	 * Adds the array with default exclusions to the current exclusions set.
  -	 */
  -	public void addDefaultExcludes() {
  -		int excludesLength = excludes == null ? 0 : excludes.length;
  -		String[] newExcludes;
  -		newExcludes = new String[excludesLength + DEFAULTEXCLUDES.length];
  -		if (excludesLength > 0) {
  -			System.arraycopy(excludes, 0, newExcludes, 0, excludesLength);
  -		}
  -		for (int i = 0; i < DEFAULTEXCLUDES.length; i++) {
  -			newExcludes[i + excludesLength] = 
  -				DEFAULTEXCLUDES[i].replace('/', File.separatorChar).replace(
  -					'\\', 
  -					File.separatorChar); 
  -		}
  -		excludes = newExcludes;
  -	}
  -	
  -	/**
  -	 * Finds all Projects specified in include patterns.
  -	 *
  -	 * @return the projects
  -	 */
  -	public Vector findMatchingProjects() {
  -		Project[] projects = VAJUtil.getWorkspace().getProjects();
  -
  -		Vector matchingProjects = new Vector();
  -
  -		boolean allProjectsMatch = false;
  -		for (int i = 0; i < projects.length; i++) {
  -			Project project = projects[i];
  -			for (int j = 0; j < includes.length && !allProjectsMatch; j++) {
  -				StringTokenizer tok = new StringTokenizer(includes[j], File.separator);
  -				String projectNamePattern = tok.nextToken();
  -				if (projectNamePattern.equals("**")) {
  -					// if an include pattern starts with '**', 
  -					// all projects match
  -					allProjectsMatch = true;
  -				} else
  -					if (match(projectNamePattern, project.getName())) {
  -						matchingProjects.addElement(project);
  -						break;
  -					}
  -			}
  -		}
  -
  -		if (allProjectsMatch) {
  -			matchingProjects = new Vector();
  -			for (int i = 0; i < projects.length; i++) {
  -				matchingProjects.addElement(projects[i]);
  -			}
  -		}
  -
  -		return matchingProjects;
  -	}
  -	
  -	/**
  -	 * Get the names of the packages that matched at least one of the include
  -	 * patterns, and didn't match one of the exclude patterns.
  -	 *
  -	 * @return the matching packages
  -	 */
  -	public Package[] getIncludedPackages() {
  -		int count = packagesIncluded.size();
  -		Package[] packages = new Package[count];
  -		for (int i = 0; i < count; i++) {
  -			packages[i] = (Package) packagesIncluded.elementAt(i);
  -		}
  -		return packages;
  -	}
  -	
  -	/**
  -	 * Matches a string against a pattern. The pattern contains two special
  -	 * characters:
  -	 * '*' which means zero or more characters,
  -	 * '?' which means one and only one character.
  -	 *
  -	 * @param pattern the (non-null) pattern to match against
  -	 * @param str     the (non-null) string that must be matched against the
  -	 *                pattern
  -	 *
  -	 * @return <code>true</code> when the string matches against the pattern,
  -	 *         <code>false</code> otherwise.
  -	 */
  -	protected static boolean match(String pattern, String str) {
  -		return DirectoryScanner.match(pattern, str);
  -	}
  -	/**
  -	 * Scans the workspace for packages that match at least one include
  -	 * pattern, and don't match any exclude patterns.
  -	 *
  -	 */
  -	public void scan() {
  -		if (includes == null) {
  -			// No includes supplied, so set it to 'matches all'
  -			includes = new String[1];
  -			includes[0] = "**";
  -		}
  -		if (excludes == null) {
  -			excludes = new String[0];
  -		}
  -
  -		// only scan projects which are included in at least one include pattern
  -		Vector matchingProjects = findMatchingProjects();
  -		for (Enumeration e = matchingProjects.elements(); e.hasMoreElements();) {
  -			Project project = (Project) e.nextElement();
  -			scanProject(project);
  -		}
  -	}
  -	
  -	/**
  -	 * Scans a project for packages that match at least one include
  -	 * pattern, and don't match any exclude patterns.
  -	 *
  -	 */
  -	public void scanProject(Project project) {
  -		try {
  -			Package[] packages = project.getPackages();
  -			if (packages != null) {
  -				for (int i = 0; i < packages.length; i++) {
  -					Package item = packages[i];
  -					// replace '.' by file seperator because the patterns are
  -					// using file seperator syntax (and we can use the match
  -					// methods this way).
  -					String name = 
  -						project.getName()
  -							+ File.separator
  -							+ item.getName().replace('.', File.separatorChar); 
  -					if (isIncluded(name) && !isExcluded(name)) {
  -						packagesIncluded.addElement(item);
  -					}
  -				}
  -			}
  -		} catch (IvjException e) {
  -			throw VAJUtil.createBuildException("VA Exception occured: ", e);
  -		}
  -	}
  -}
  \ No newline at end of file
  +    /**
  +     * Adds the array with default exclusions to the current exclusions set.
  +     */
  +    public void addDefaultExcludes() {
  +        int excludesLength = excludes == null ? 0 : excludes.length;
  +        String[] newExcludes;
  +        newExcludes = new String[excludesLength + DEFAULTEXCLUDES.length];
  +        if (excludesLength > 0) {
  +            System.arraycopy(excludes, 0, newExcludes, 0, excludesLength);
  +        }
  +        for (int i = 0; i < DEFAULTEXCLUDES.length; i++) {
  +            newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].
  +                replace( '/', File.separatorChar ).replace( '\\', File.separatorChar ); 
  +        }
  +        excludes = newExcludes;
  +    }
  +        
  +    /**
  +     * Finds all Projects specified in include patterns.
  +     *
  +     * @return the projects
  +     */
  +    public Vector findMatchingProjects() {
  +        Project[] projects = VAJUtil.getWorkspace().getProjects();
  +
  +        Vector matchingProjects = new Vector();
  +
  +        boolean allProjectsMatch = false;
  +        for (int i = 0; i < projects.length; i++) {
  +            Project project = projects[i];
  +            for (int j = 0; j < includes.length && !allProjectsMatch; j++) {
  +                StringTokenizer tok = new StringTokenizer(includes[j], File.separator);
  +                String projectNamePattern = tok.nextToken();
  +                if (projectNamePattern.equals("**")) {
  +                    // if an include pattern starts with '**', 
  +                    // all projects match
  +                    allProjectsMatch = true;
  +                } else
  +                    if (match(projectNamePattern, project.getName())) {
  +                        matchingProjects.addElement(project);
  +                        break;
  +                    }
  +            }
  +        }
  +
  +        if (allProjectsMatch) {
  +            matchingProjects = new Vector();
  +            for (int i = 0; i < projects.length; i++) {
  +                matchingProjects.addElement(projects[i]);
  +            }
  +        }
  +
  +        return matchingProjects;
  +    }
  +        
  +    /**
  +     * Get the names of the packages that matched at least one of the include
  +     * patterns, and didn't match one of the exclude patterns.
  +     *
  +     * @return the matching packages
  +     */
  +    public Package[] getIncludedPackages() {
  +        int count = packagesIncluded.size();
  +        Package[] packages = new Package[count];
  +        for (int i = 0; i < count; i++) {
  +            packages[i] = (Package) packagesIncluded.elementAt(i);
  +        }
  +        return packages;
  +    }
  +        
  +    /**
  +     * Matches a string against a pattern. The pattern contains two special
  +     * characters:
  +     * '*' which means zero or more characters,
  +     * '?' which means one and only one character.
  +     *
  +     * @param pattern the (non-null) pattern to match against
  +     * @param str     the (non-null) string that must be matched against the
  +     *                pattern
  +     *
  +     * @return <code>true</code> when the string matches against the pattern,
  +     *         <code>false</code> otherwise.
  +     */
  +    protected static boolean match(String pattern, String str) {
  +        return DirectoryScanner.match(pattern, str);
  +    }
  +    /**
  +     * Scans the workspace for packages that match at least one include
  +     * pattern, and don't match any exclude patterns.
  +     *
  +     */
  +    public void scan() {
  +        if (includes == null) {
  +            // No includes supplied, so set it to 'matches all'
  +            includes = new String[1];
  +            includes[0] = "**";
  +        }
  +        if (excludes == null) {
  +            excludes = new String[0];
  +        }
  +
  +        // only scan projects which are included in at least one include pattern
  +        Vector matchingProjects = findMatchingProjects();
  +        for (Enumeration e = matchingProjects.elements(); e.hasMoreElements();) {
  +            Project project = (Project) e.nextElement();
  +            scanProject(project);
  +        }
  +    }
  +        
  +    /**
  +     * Scans a project for packages that match at least one include
  +     * pattern, and don't match any exclude patterns.
  +     *
  +     */
  +    public void scanProject(Project project) {
  +        try {
  +            Package[] packages = project.getPackages();
  +            if (packages != null) {
  +                for (int i = 0; i < packages.length; i++) {
  +                    Package item = packages[i];
  +                    // replace '.' by file seperator because the patterns are
  +                    // using file seperator syntax (and we can use the match
  +                    // methods this way).
  +                    String name = 
  +                        project.getName()
  +                        + File.separator
  +                        + item.getName().replace('.', File.separatorChar); 
  +                    if (isIncluded(name) && !isExcluded(name)) {
  +                        packagesIncluded.addElement(item);
  +                    }
  +                }
  +            }
  +        } catch (IvjException e) {
  +            throw VAJUtil.createBuildException("VA Exception occured: ", e);
  +        }
  +    }
  +}
  
  
  
  1.2       +79 -80    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java
  
  Index: ClassNameReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClassNameReader.java	2000/09/11 11:47:12	1.1
  +++ ClassNameReader.java	2000/11/25 02:38:48	1.2
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs.optional.jlink;
   
   import java.io .*;
  @@ -65,66 +64,66 @@
    */
   class ConstantPool extends Object{
   
  -	static final 
  -	byte UTF8 = 1, UNUSED = 2, INTEGER = 3, FLOAT = 4, LONG = 5, DOUBLE = 6,
  -	CLASS = 7, STRING = 8, FIELDREF = 9, METHODREF = 10,
  -	INTERFACEMETHODREF = 11, NAMEANDTYPE = 12;
  -
  -	 byte[] types;
  -
  -	 Object[] values;
  -
  -	 ConstantPool( DataInput data ) throws IOException {
  -		super();
  -
  -			int count = data .readUnsignedShort();
  -			types = new byte [ count ];
  -			values = new Object [ count ];
  -			// read in all constant pool entries.
  -			for ( int i = 1; i < count; i++ ) {
  -				byte type = data .readByte();
  -				types[i] = type;
  -				switch (type)
  -				{
  -				case UTF8 :
  -					values[i] = data .readUTF();
  -					break;
  -				
  -				case UNUSED :
  -					break;
  -				
  -				case INTEGER :
  -					values[i] = new Integer( data .readInt() );
  -					break;
  -				
  -				case FLOAT :
  -					values[i] = new Float( data .readFloat() );
  -					break;
  -				
  -				case LONG :
  -					values[i] = new Long( data .readLong() );
  -					++i;
  -					break;
  -				
  -				case DOUBLE :
  -					values[i] = new Double( data .readDouble() );
  -					++i;
  -					break;
  -				
  -				case CLASS :
  -				case STRING :
  -					values[i] = new Integer( data .readUnsignedShort() );
  -					break;
  -				
  -				case FIELDREF :
  -				case METHODREF :
  -				case INTERFACEMETHODREF :
  -				case NAMEANDTYPE :
  -					values[i] = new Integer( data .readInt() );
  -					break;
  -				}
  -			}
  -		}
  +    static final 
  +        byte UTF8 = 1, UNUSED = 2, INTEGER = 3, FLOAT = 4, LONG = 5, DOUBLE = 6,
  +        CLASS = 7, STRING = 8, FIELDREF = 9, METHODREF = 10,
  +        INTERFACEMETHODREF = 11, NAMEANDTYPE = 12;
  +
  +    byte[] types;
  +
  +    Object[] values;
  +
  +    ConstantPool( DataInput data ) throws IOException {
  +        super();
  +
  +        int count = data .readUnsignedShort();
  +        types = new byte [ count ];
  +        values = new Object [ count ];
  +        // read in all constant pool entries.
  +        for ( int i = 1; i < count; i++ ) {
  +            byte type = data .readByte();
  +            types[i] = type;
  +            switch (type)
  +            {
  +            case UTF8 :
  +                values[i] = data .readUTF();
  +                break;
  +                                
  +            case UNUSED :
  +                break;
  +                                
  +            case INTEGER :
  +                values[i] = new Integer( data .readInt() );
  +                break;
  +                                
  +            case FLOAT :
  +                values[i] = new Float( data .readFloat() );
  +                break;
  +                                
  +            case LONG :
  +                values[i] = new Long( data .readLong() );
  +                ++i;
  +                break;
  +                                
  +            case DOUBLE :
  +                values[i] = new Double( data .readDouble() );
  +                ++i;
  +                break;
  +                                
  +            case CLASS :
  +            case STRING :
  +                values[i] = new Integer( data .readUnsignedShort() );
  +                break;
  +                                
  +            case FIELDREF :
  +            case METHODREF :
  +            case INTERFACEMETHODREF :
  +            case NAMEANDTYPE :
  +                values[i] = new Integer( data .readInt() );
  +                break;
  +            }
  +        }
  +    }
   
   
   }
  @@ -135,25 +134,25 @@
    */
   public class ClassNameReader extends Object{
   
  -	public static 
  -	String getClassName( InputStream input ) throws IOException {
  -		DataInputStream data = new DataInputStream( input );
  -		// verify this is a valid class file.
  -		int cookie = data .readInt();
  -		if ( cookie != 0xCAFEBABE ) {
  -			return null;
  -		}
  -		int version = data .readInt();
  -		// read the constant pool.
  -		ConstantPool constants = new ConstantPool( data );
  -		Object[] values = constants .values;
  -		// read access flags and class index.
  -		int accessFlags = data .readUnsignedShort();
  -		int classIndex = data .readUnsignedShort();
  -		Integer stringIndex = (Integer) values[classIndex];
  -		String className = (String) values[stringIndex .intValue()];
  -		return className;
  -	}
  +    public static 
  +        String getClassName( InputStream input ) throws IOException {
  +        DataInputStream data = new DataInputStream( input );
  +        // verify this is a valid class file.
  +        int cookie = data .readInt();
  +        if ( cookie != 0xCAFEBABE ) {
  +            return null;
  +        }
  +        int version = data .readInt();
  +        // read the constant pool.
  +        ConstantPool constants = new ConstantPool( data );
  +        Object[] values = constants .values;
  +        // read access flags and class index.
  +        int accessFlags = data .readUnsignedShort();
  +        int classIndex = data .readUnsignedShort();
  +        Integer stringIndex = (Integer) values[classIndex];
  +        String className = (String) values[stringIndex .intValue()];
  +        return className;
  +    }
   
   
   }
  
  
  
  1.2       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
  
  Index: JlinkTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JlinkTask.java	2000/09/11 11:47:12	1.1
  +++ JlinkTask.java	2000/11/25 02:38:49	1.2
  @@ -177,7 +177,7 @@
               throw new BuildException( ex, location );
           }
       }
  -	
  +
       private boolean haveAddFiles(){
           return haveEntries(addfiles);
       }
  @@ -185,7 +185,7 @@
       private boolean haveMergeFiles(){
           return haveEntries(mergefiles);
       }
  -	
  +
       private boolean haveEntries(Path p){
           if (p == null){
               return false;
  
  
  
  1.3       +261 -260  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java
  
  Index: jlink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jlink.java	2000/10/04 09:29:17	1.2
  +++ jlink.java	2000/11/25 02:38:49	1.3
  @@ -65,74 +65,74 @@
   package org.apache.tools.ant.taskdefs.optional.jlink;
   
   import java.io .*;
  -import java.util.zip .*;
  -import java.util .Vector;
   import java.util .Enumeration;
  +import java.util .Vector;
  +import java.util.zip .*;
   
   public class jlink extends Object{
   
  -	/**
  +    /**
        * The file that will be created by this instance of jlink.
  -	 */
  -	public  void setOutfile( String outfile ) {
  -		if ( outfile == null ) {
  -			return ;
  -		}
  -		this .outfile = outfile;
  -	}
  +     */
  +    public  void setOutfile( String outfile ) {
  +        if ( outfile == null ) {
  +            return ;
  +        }
  +        this .outfile = outfile;
  +    }
   
  -	/**
  +    /**
        * Adds a file to be merged into the output.
  -	 */
  -	public  void addMergeFile( String mergefile ) {
  -		if ( mergefile == null ) {
  -			return ;
  -		}
  -		mergefiles .addElement( mergefile );
  -	}
  +     */
  +    public  void addMergeFile( String mergefile ) {
  +        if ( mergefile == null ) {
  +            return ;
  +        }
  +        mergefiles .addElement( mergefile );
  +    }
   
  -	/**
  +    /**
        * Adds a file to be added into the output.
  -	 */
  -	public  void addAddFile( String addfile ) {
  -		if ( addfile == null ) {
  -			return ;
  -		}
  -		addfiles .addElement( addfile );
  -	}
  +     */
  +    public  void addAddFile( String addfile ) {
  +        if ( addfile == null ) {
  +            return ;
  +        }
  +        addfiles .addElement( addfile );
  +    }
   
  -	/**
  +    /**
        * Adds several files to be merged into the output.
  -	 */
  -	public  void addMergeFiles( String[] mergefiles ) {
  -		if ( mergefiles == null ) {
  -			return ;
  -		}
  -		for ( int i = 0; i < mergefiles .length; i++ ) {
  -			addMergeFile( mergefiles[i] );
  -		}
  -	}
  +     */
  +    public  void addMergeFiles( String[] mergefiles ) {
  +        if ( mergefiles == null ) {
  +            return ;
  +        }
  +        for ( int i = 0; i < mergefiles .length; i++ ) {
  +            addMergeFile( mergefiles[i] );
  +        }
  +    }
   
  -	/**
  +    /**
        * Adds several file to be added into the output.
  -	 */
  -	public  void addAddFiles( String[] addfiles ) {
  -		if ( addfiles == null ) {
  -			return ;
  -		}
  -		for ( int i = 0; i < addfiles .length; i++ ) {
  -			addAddFile( addfiles[i] );
  -		}
  -	}
  +     */
  +    public  void addAddFiles( String[] addfiles ) {
  +        if ( addfiles == null ) {
  +            return ;
  +        }
  +        for ( int i = 0; i < addfiles .length; i++ ) {
  +            addAddFile( addfiles[i] );
  +        }
  +    }
   
  -	/**
  +    /**
        * Determines whether output will be compressed.
  -	 */
  -	public  void setCompression( boolean compress ) {
  -		this .compression = compress;
  -	}
  +     */
  +    public  void setCompression( boolean compress ) {
  +        this .compression = compress;
  +    }
   
  -	/**
  +    /**
        * Performs the linking of files.
        * Addfiles are added to the output as-is. For example, a 
        * jar file is added to the output as a jar file.
  @@ -146,104 +146,105 @@
        * provide multiple, disjoint directories, as
        * addfiles: they will all be added in a rational 
        * manner to outfile.
  -	 */
  -	public  void link() throws Exception {
  -		ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );
  -		if ( compression ) {
  -			output .setMethod( ZipOutputStream .DEFLATED );
  -			output .setLevel( Deflater .DEFAULT_COMPRESSION );
  -		} else {
  -			output .setMethod( ZipOutputStream .STORED );
  -		}
  -		Enumeration merges = mergefiles .elements();
  -		while ( merges .hasMoreElements() ) {
  -			String path = (String) merges .nextElement();
  -			File f = new File( path );
  -			if ( f.getName().endsWith( ".jar" ) || f.getName().endsWith( ".zip" ) ) {
  -				//Do the merge
  -				mergeZipJarContents( output, f );
  -			}
  -			else {
  -				//Add this file to the addfiles Vector and add it later at the top level of the output file.
  -				addAddFile( path );
  -			}
  -		}
  -		Enumeration adds = addfiles .elements();
  -		while ( adds .hasMoreElements() ) {
  -			String name = (String) adds .nextElement();
  -			File f = new File( name );
  -			if ( f .isDirectory() ) {
  -			    //System.out.println("in jlink: adding directory contents of " + f.getPath());
  -				addDirContents( output, f, f.getName() + '/', compression );
  -			}
  -			else {
  -				addFile( output, f, "", compression );
  -			}
  -		}
  -		if ( output != null ) {
  -			try  {
  -				output .close();
  -			} catch( IOException ioe ) {}
  -		}
  -	}
  -
  -	public static  void main( String[] args ) {
  -		// jlink output input1 ... inputN
  -		if ( args .length < 2 ) {
  -			System .out .println( "usage: jlink output input1 ... inputN" );
  -			System .exit( 1 );
  -		}
  -		jlink linker = new jlink();
  -		linker .setOutfile( args[0] );
  -		//To maintain compatibility with the command-line version, we will only add files to be merged.
  -		for ( int i = 1; i < args .length; i++ ) {
  -			linker .addMergeFile( args[i] );
  -		}
  -		try  {
  -			linker .link();
  -		} catch( Exception ex ) {
  -			System .err .print( ex .getMessage() );
  -		}
  -	}
  +     */
  +    public  void link() throws Exception {
  +        ZipOutputStream output = new ZipOutputStream( new FileOutputStream( outfile ) );
  +        if ( compression ) {
  +            output .setMethod( ZipOutputStream .DEFLATED );
  +            output .setLevel( Deflater .DEFAULT_COMPRESSION );
  +        } else {
  +            output .setMethod( ZipOutputStream .STORED );
  +        }
  +        Enumeration merges = mergefiles .elements();
  +        while ( merges .hasMoreElements() ) {
  +            String path = (String) merges .nextElement();
  +            File f = new File( path );
  +            if ( f.getName().endsWith( ".jar" ) || f.getName().endsWith( ".zip" ) ) {
  +                                //Do the merge
  +                mergeZipJarContents( output, f );
  +            }
  +            else {
  +                //Add this file to the addfiles Vector and add it 
  +                //later at the top level of the output file.
  +                addAddFile( path );
  +            }
  +        }
  +        Enumeration adds = addfiles .elements();
  +        while ( adds .hasMoreElements() ) {
  +            String name = (String) adds .nextElement();
  +            File f = new File( name );
  +            if ( f .isDirectory() ) {
  +                //System.out.println("in jlink: adding directory contents of " + f.getPath());
  +                addDirContents( output, f, f.getName() + '/', compression );
  +            }
  +            else {
  +                addFile( output, f, "", compression );
  +            }
  +        }
  +        if ( output != null ) {
  +            try  {
  +                output .close();
  +            } catch( IOException ioe ) {}
  +        }
  +    }
  +
  +    public static  void main( String[] args ) {
  +        // jlink output input1 ... inputN
  +        if ( args .length < 2 ) {
  +            System .out .println( "usage: jlink output input1 ... inputN" );
  +            System .exit( 1 );
  +        }
  +        jlink linker = new jlink();
  +        linker .setOutfile( args[0] );
  +        //To maintain compatibility with the command-line version, we will only add files to be merged.
  +        for ( int i = 1; i < args .length; i++ ) {
  +            linker .addMergeFile( args[i] );
  +        }
  +        try  {
  +            linker .link();
  +        } catch( Exception ex ) {
  +            System .err .print( ex .getMessage() );
  +        }
  +    }
   
       /*
        * Actually performs the merging of f into the output.
        * f should be a zip or jar file.
        */
  -	private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {
  -		//Check to see that the file with name "name" exists.
  -		if ( ! f .exists() ) {
  -			return ;
  -		}
  -		ZipFile zipf = new ZipFile( f );
  -		Enumeration entries = zipf.entries();
  -		while (entries.hasMoreElements()){
  -		    ZipEntry inputEntry = (ZipEntry) entries.nextElement();
  -    	    //Ignore manifest entries.  They're bound to cause conflicts between
  -	        //files that are being merged.  User should supply their own
  -	        //manifest file when doing the merge.
  -	        String inputEntryName = inputEntry.getName();
  -	        int index = inputEntryName.indexOf("META-INF");
  -	        if (index < 0){
  -	            //META-INF not found in the name of the entry. Go ahead and process it.
  -	            try {
  -        		    output.putNextEntry(processEntry(zipf, inputEntry));
  -        		} catch (ZipException ex){
  -        		    //If we get here, it could be because we are trying to put a
  -        		    //directory entry that already exists.
  -        		    //For example, we're trying to write "com", but a previous
  -        		    //entry from another mergefile was called "com".
  -        		    //In that case, just ignore the error and go on to the
  -        		    //next entry.
  -    		        String mess = ex.getMessage();
  -    		        if (mess.indexOf("duplicate") >= 0){
  -    		            //It was the duplicate entry.
  -    		            continue;
  -    		        } else {
  -        		        //I hate to admit it, but we don't know what happened here.  Throw the Exception.
  -        		        throw ex;
  -        		    }
  -        		}
  +    private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {
  +        //Check to see that the file with name "name" exists.
  +        if ( ! f .exists() ) {
  +            return ;
  +        }
  +        ZipFile zipf = new ZipFile( f );
  +        Enumeration entries = zipf.entries();
  +        while (entries.hasMoreElements()){
  +            ZipEntry inputEntry = (ZipEntry) entries.nextElement();
  +            //Ignore manifest entries.  They're bound to cause conflicts between
  +            //files that are being merged.  User should supply their own
  +            //manifest file when doing the merge.
  +            String inputEntryName = inputEntry.getName();
  +            int index = inputEntryName.indexOf("META-INF");
  +            if (index < 0){
  +                //META-INF not found in the name of the entry. Go ahead and process it.
  +                try {
  +                    output.putNextEntry(processEntry(zipf, inputEntry));
  +                } catch (ZipException ex){
  +                    //If we get here, it could be because we are trying to put a
  +                    //directory entry that already exists.
  +                    //For example, we're trying to write "com", but a previous
  +                    //entry from another mergefile was called "com".
  +                    //In that case, just ignore the error and go on to the
  +                    //next entry.
  +                    String mess = ex.getMessage();
  +                    if (mess.indexOf("duplicate") >= 0){
  +                                //It was the duplicate entry.
  +                        continue;
  +                    } else {
  +                                //I hate to admit it, but we don't know what happened here.  Throw the Exception.
  +                        throw ex;
  +                    }
  +                }
                   InputStream in = zipf.getInputStream(inputEntry);
                   int len = buffer.length;
                   int count = -1;
  @@ -252,168 +253,168 @@
                   }
                   in.close();
                   output.closeEntry();
  -	        }
  -		}
  -		zipf .close();
  -	}
  +            }
  +        }
  +        zipf .close();
  +    }
   
       /*
        * Adds contents of a directory to the output.
        */
  -	private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {
  -		String[] contents = dir .list();
  -		for ( int i = 0; i < contents .length; ++i ) {
  -			String name = contents[i];
  -			File file = new File( dir, name );
  -			if ( file .isDirectory() ) {
  -				addDirContents( output, file, prefix + name + '/', compress );
  -			}
  -			else {
  -				addFile( output, file, prefix, compress );
  -			}
  -		}
  -	}
  +    private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {
  +        String[] contents = dir .list();
  +        for ( int i = 0; i < contents .length; ++i ) {
  +            String name = contents[i];
  +            File file = new File( dir, name );
  +            if ( file .isDirectory() ) {
  +                addDirContents( output, file, prefix + name + '/', compress );
  +            }
  +            else {
  +                addFile( output, file, prefix, compress );
  +            }
  +        }
  +    }
   
       /*
        * Gets the name of an entry in the file.  This is the real name
        * which for a class is the name of the package with the class
        * name appended.
        */
  -	private String getEntryName( File file, String prefix ) {
  -		String name = file .getName();
  -		if ( ! name .endsWith( ".class" ) ) {
  -			// see if the file is in fact a .class file, and determine its actual name.
  -			try  {
  -				InputStream input = new FileInputStream( file );
  -				String className = ClassNameReader .getClassName( input );
  -				input .close();
  -				if ( className != null ) {
  -					return className .replace( '.', '/' ) + ".class";
  -				}
  -			} catch( IOException ioe ) {}
  -		}
  -		System.out.println("From " + file.getPath() + " and prefix " + prefix + ", creating entry " + prefix+name);
  -		return (prefix + name);
  -	}
  +    private String getEntryName( File file, String prefix ) {
  +        String name = file .getName();
  +        if ( ! name .endsWith( ".class" ) ) {
  +            // see if the file is in fact a .class file, and determine its actual name.
  +            try  {
  +                InputStream input = new FileInputStream( file );
  +                String className = ClassNameReader .getClassName( input );
  +                input .close();
  +                if ( className != null ) {
  +                    return className .replace( '.', '/' ) + ".class";
  +                }
  +            } catch( IOException ioe ) {}
  +        }
  +        System.out.println("From " + file.getPath() + " and prefix " + prefix + ", creating entry " + prefix+name);
  +        return (prefix + name);
  +    }
   
       /*
        * Adds a file to the output stream.
        */
  -	private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {
  -		//Make sure file exists
  -		long checksum = 0;
  -		if ( ! file .exists() ) {
  -			return ;
  -		}
  -		ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );
  -		entry .setTime( file .lastModified() );
  -		entry .setSize( file .length() );
  +    private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {
  +        //Make sure file exists
  +        long checksum = 0;
  +        if ( ! file .exists() ) {
  +            return ;
  +        }
  +        ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );
  +        entry .setTime( file .lastModified() );
  +        entry .setSize( file .length() );
           if (! compress){
  -		    entry.setCrc(calcChecksum(file));
  +            entry.setCrc(calcChecksum(file));
           }
  -		FileInputStream input = new FileInputStream( file );
  -		addToOutputStream(output, input, entry);
  -	}
  -	
  +        FileInputStream input = new FileInputStream( file );
  +        addToOutputStream(output, input, entry);
  +    }
  +        
       /*
        * A convenience method that several other methods might call.
        */
  -	private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{
  -	    try {
  -            output.putNextEntry(ze);	    
  -	    } catch (ZipException zipEx) {
  -	        //This entry already exists. So, go with the first one.
  -	        input.close();
  -	        return;
  -	    }
  -	    int numBytes = -1;
  -	    while((numBytes = input.read(buffer)) > 0){
  -	        output.write(buffer, 0, numBytes);
  -	    }
  -	    output.closeEntry();
  -	    input.close();
  -	}
  +    private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{
  +        try {
  +            output.putNextEntry(ze);            
  +        } catch (ZipException zipEx) {
  +            //This entry already exists. So, go with the first one.
  +            input.close();
  +            return;
  +        }
  +        int numBytes = -1;
  +        while((numBytes = input.read(buffer)) > 0){
  +            output.write(buffer, 0, numBytes);
  +        }
  +        output.closeEntry();
  +        input.close();
  +    }
   
       /*
        * A method that does the work on a given entry in a mergefile.
        * The big deal is to set the right parameters in the ZipEntry 
        * on the output stream.
        */
  -	private ZipEntry processEntry( ZipFile zip, ZipEntry inputEntry ) throws IOException{
  -	    /*
  -	    First, some notes.
  -	    On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the
  -	    ZipInputStream does not work for compressed (deflated) files.  Those calls return -1.
  -	    For uncompressed (stored) files, those calls do work.
  -	    However, using ZipFile.getEntries() works for both compressed and 
  -	    uncompressed files.
  -	    
  -	    Now, from some simple testing I did, it seems that the value of CRC-32 is
  -	    independent of the compression setting. So, it should be easy to pass this 
  -	    information on to the output entry.
  -	    */
  -		String name = inputEntry .getName();
  -		if ( ! (inputEntry .isDirectory() || name .endsWith( ".class" )) ) {
  -			try  {
  -				InputStream input = zip.getInputStream( zip .getEntry( name ) );
  -				String className = ClassNameReader .getClassName( input );
  -				input .close();
  -				if ( className != null ) {
  -					name = className .replace( '.', '/' ) + ".class";
  -				}
  -			} catch( IOException ioe ) {}
  -		}
  -		ZipEntry outputEntry = new ZipEntry( name );
  -		outputEntry.setTime(inputEntry .getTime() );
  -		outputEntry.setExtra(inputEntry.getExtra());
  -		outputEntry.setComment(inputEntry.getComment());
  +    private ZipEntry processEntry( ZipFile zip, ZipEntry inputEntry ) throws IOException{
  +        /*
  +          First, some notes.
  +          On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the
  +          ZipInputStream does not work for compressed (deflated) files.  Those calls return -1.
  +          For uncompressed (stored) files, those calls do work.
  +          However, using ZipFile.getEntries() works for both compressed and 
  +          uncompressed files.
  +            
  +          Now, from some simple testing I did, it seems that the value of CRC-32 is
  +          independent of the compression setting. So, it should be easy to pass this 
  +          information on to the output entry.
  +        */
  +        String name = inputEntry .getName();
  +        if ( ! (inputEntry .isDirectory() || name .endsWith( ".class" )) ) {
  +            try  {
  +                InputStream input = zip.getInputStream( zip .getEntry( name ) );
  +                String className = ClassNameReader .getClassName( input );
  +                input .close();
  +                if ( className != null ) {
  +                    name = className .replace( '.', '/' ) + ".class";
  +                }
  +            } catch( IOException ioe ) {}
  +        }
  +        ZipEntry outputEntry = new ZipEntry( name );
  +        outputEntry.setTime(inputEntry .getTime() );
  +        outputEntry.setExtra(inputEntry.getExtra());
  +        outputEntry.setComment(inputEntry.getComment());
           outputEntry.setTime(inputEntry.getTime());
  -		if (compression){
  -		    outputEntry.setMethod(ZipEntry.DEFLATED);
  +        if (compression){
  +            outputEntry.setMethod(ZipEntry.DEFLATED);
               //Note, don't need to specify size or crc for compressed files.
  -		} else {
  -		    outputEntry.setMethod(ZipEntry.STORED);
  +        } else {
  +            outputEntry.setMethod(ZipEntry.STORED);
               outputEntry.setCrc(inputEntry.getCrc());
  -		    outputEntry.setSize(inputEntry.getSize());
  -		}
  -		return outputEntry;
  -	}
  -	
  +            outputEntry.setSize(inputEntry.getSize());
  +        }
  +        return outputEntry;
  +    }
  +        
       /*
        * Necessary in the case where you add a entry that
        * is not compressed.
        */
  -	private long calcChecksum(File f) throws IOException {
  -	    BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
  -	    return calcChecksum(in, f.length());
  -	}
  +    private long calcChecksum(File f) throws IOException {
  +        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
  +        return calcChecksum(in, f.length());
  +    }
   
       /*
        * Necessary in the case where you add a entry that
        * is not compressed.
        */
  -	private long calcChecksum(InputStream in, long size) throws IOException{
  -	    CRC32 crc = new CRC32();
  -		int len = buffer.length;
  -		int count = -1;
  -		int haveRead = 0; 
  +    private long calcChecksum(InputStream in, long size) throws IOException{
  +        CRC32 crc = new CRC32();
  +        int len = buffer.length;
  +        int count = -1;
  +        int haveRead = 0; 
           while((count=in.read(buffer, 0, len)) > 0){
               haveRead += count;
               crc.update(buffer, 0, count);
           }
           in.close();
           return crc.getValue();
  -	}
  +    }
   
  -	private  String outfile = null;
  +    private  String outfile = null;
   
  -	private  Vector mergefiles = new Vector( 10 );
  +    private  Vector mergefiles = new Vector( 10 );
   
  -	private  Vector addfiles = new Vector( 10 );
  +    private  Vector addfiles = new Vector( 10 );
   
  -	private  boolean compression = false;
  -	
  -	byte[] buffer = new byte[8192];
  +    private  boolean compression = false;
  +        
  +    byte[] buffer = new byte[8192];
   
   }
   
  
  
  
  1.13      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JUnitTask.java	2000/10/05 09:12:05	1.12
  +++ JUnitTask.java	2000/11/25 02:38:49	1.13
  @@ -137,11 +137,11 @@
       }
   
       public void setJvm(String value) {
  -	commandline.setVm(value);
  +        commandline.setVm(value);
       }
   
       public Commandline.Argument createJvmarg() {
  -	return commandline.createVmArgument();
  +        return commandline.createVmArgument();
       }
   
       public Path createClasspath() {
  
  
  
  1.3       +63 -63    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTP.java	2000/11/15 16:40:33	1.2
  +++ FTP.java	2000/11/25 02:38:50	1.3
  @@ -54,12 +54,12 @@
   
   package org.apache.tools.ant.taskdefs.optional.net;
   
  -import org.apache.tools.ant.*;
  -import org.apache.tools.ant.types.*;
  +import com.oroinc.net.ftp.*;
   import java.io.*;
   import java.net.*;
   import java.util.*;
  -import com.oroinc.net.ftp.*;
  +import org.apache.tools.ant.*;
  +import org.apache.tools.ant.types.*;
   
   /**
    * Basic FTP client that performs the following actions:
  @@ -79,7 +79,7 @@
   {
       protected final static int SEND_FILES   = 0;
       protected final static int GET_FILES    = 1;
  -    protected final static int DEL_FILES    = 2;	
  +    protected final static int DEL_FILES    = 2;        
       protected final static int LIST_FILES   = 3;
       
       private String remotedir;
  @@ -110,11 +110,11 @@
           "retrieved",
           "deleted",
           "listed"
  -    };		
  -	
  +    };                
  +        
       protected class FTPDirectoryScanner extends DirectoryScanner {
           protected FTPClient ftp = null;
  -	
  +        
           public FTPDirectoryScanner(FTPClient ftp) {
               super();
               this.ftp = ftp;
  @@ -197,7 +197,7 @@
                   throw new BuildException("Error while communicating with FTP server: ", e);
               }
           }
  -    }	
  +    }        
   
       /**
        * Sets the remote directory where files will be placed.  This may
  @@ -343,7 +343,7 @@
        */
       public void setListing(File listing) throws BuildException {
           this.listing = listing;
  -    }	
  +    }        
       
   
       /**
  @@ -385,8 +385,8 @@
               ds = new FTPDirectoryScanner(ftp);
               fs.setupDirectoryScanner(ds, project);
               ds.scan();
  -        }			
  -				
  +        }                        
  +                                
           String[] dsfiles = ds.getIncludedFiles();
           String dir = null;
           if ((ds.getBasedir() == null) && ((action == SEND_FILES) || (action == GET_FILES))) {
  @@ -410,29 +410,29 @@
           for (int i = 0; i < dsfiles.length; i++)
           {
               switch (action) {
  -                case SEND_FILES: {
  -                    sendFile(ftp, dir, dsfiles[i]);
  -                    break;
  -                }
  +            case SEND_FILES: {
  +                sendFile(ftp, dir, dsfiles[i]);
  +                break;
  +            }
   
  -                case GET_FILES: {
  -                    getFile(ftp, dir, dsfiles[i]);
  -                    break;
  -                }
  +            case GET_FILES: {
  +                getFile(ftp, dir, dsfiles[i]);
  +                break;
  +            }
   
  -                case DEL_FILES: {
  -                    delFile(ftp, dsfiles[i]);
  -                    break;
  -                }
  +            case DEL_FILES: {
  +                delFile(ftp, dsfiles[i]);
  +                break;
  +            }
   
  -                case LIST_FILES: {
  -                    listFile(ftp, bw, dsfiles[i]);
  -                    break;
  -                }
  +            case LIST_FILES: {
  +                listFile(ftp, bw, dsfiles[i]);
  +                break;
  +            }
   
  -                default: {
  -                    throw new BuildException("unknown ftp action " + action );
  -                }
  +            default: {
  +                throw new BuildException("unknown ftp action " + action );
  +            }
               }
           }
   
  @@ -516,8 +516,8 @@
                       (ftp.getReplyCode() != 550))
                   {
                       throw new BuildException(
  -                        "could not create directory: " +
  -                        ftp.getReplyString());
  +                                             "could not create directory: " +
  +                                             ftp.getReplyString());
                   }
                   dirCache.addElement(dir);
               }
  @@ -537,8 +537,8 @@
           if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
           {
               throw new BuildException(
  -                "could not date test remote file: " +
  -                ftp.getReplyString());
  +                                     "could not date test remote file: " +
  +                                     ftp.getReplyString());
           }
   
           if (files == null)
  @@ -590,8 +590,8 @@
               if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
               {
                   throw new BuildException(
  -                    "could not transfer file: " +
  -                    ftp.getReplyString());
  +                                         "could not transfer file: " +
  +                                         ftp.getReplyString());
               }
               
               log("File " + file.getAbsolutePath() + " copied to " + server,
  @@ -619,7 +619,7 @@
        * Delete a file from the remote host.
        */
       protected void delFile(FTPClient ftp, String filename)
  -            throws IOException, BuildException {
  +        throws IOException, BuildException {
           if (verbose) {
               log("deleting " + filename);
           }
  @@ -657,23 +657,23 @@
                   log("transferring " + filename + " to " + file.getAbsolutePath());
               }
   
  -			
  -            File pdir = new File(file.getParent());	// stay 1.1 compatible
  +                        
  +            File pdir = new File(file.getParent());        // stay 1.1 compatible
               if (!pdir.exists()) {
                   pdir.mkdirs();
  -            }		
  +            }                
               outstream = new BufferedOutputStream(new FileOutputStream(file));
               ftp.retrieveFile(resolveFile(filename), outstream);
  -			
  +                        
               if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
               {
                   throw new BuildException(
  -"could not transfer file: " +
  - ftp.getReplyString());
  +                                         "could not transfer file: " +
  +                                         ftp.getReplyString());
               }
  -			
  +                        
               log("File " + file.getAbsolutePath() + " copied from " + server,
  - Project.MSG_VERBOSE);
  +                Project.MSG_VERBOSE);
   
               transferred++;
           }
  @@ -753,8 +753,8 @@
                   if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
                   {
                       throw new BuildException(
  -                        "could not set transfer type: " +
  -                        ftp.getReplyString());
  +                                             "could not set transfer type: " +
  +                                             ftp.getReplyString());
                   }
               }
               
  @@ -765,8 +765,8 @@
                   if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
                   {
                       throw new BuildException(
  -                        "could not enter into passive mode: " +
  -                        ftp.getReplyString());
  +                                             "could not enter into passive mode: " +
  +                                             ftp.getReplyString());
                   }
               }
   
  @@ -777,8 +777,8 @@
                   if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()))
                   {
                       throw new BuildException(
  -                        "could not change remote directory: " +
  -                        ftp.getReplyString());
  +                                             "could not change remote directory: " +
  +                                             ftp.getReplyString());
                   }
               }
   
  @@ -793,18 +793,18 @@
           finally
           {
               /*
  -            if (ftp != null && ftp.isConnected())
  -            {
  -                try
  -                {
  -                    // this hangs - I don't know why.
  -                    ftp.disconnect();
  -                }
  -                catch(IOException ex)
  -                {
  -                    // ignore it
  -                }
  -            }
  +              if (ftp != null && ftp.isConnected())
  +              {
  +              try
  +              {
  +              // this hangs - I don't know why.
  +              ftp.disconnect();
  +              }
  +              catch(IOException ex)
  +              {
  +              // ignore it
  +              }
  +              }
               */
           }
       }
  
  
  
  1.5       +13 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  
  Index: MSVSS.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MSVSS.java	2000/08/04 13:30:56	1.4
  +++ MSVSS.java	2000/11/25 02:38:53	1.5
  @@ -54,13 +54,13 @@
   
   package org.apache.tools.ant.taskdefs.optional.vss;
   
  +
  +import java.io.File;
   import org.apache.tools.ant.*;
   import org.apache.tools.ant.taskdefs.Execute;
   import org.apache.tools.ant.taskdefs.LogStreamHandler;
   import org.apache.tools.ant.types.Commandline;
   
  -import java.io.File;
  -
   /**
    * A base class for creating tasks for executing commands on Visual SourceSafe.
    * <p>
  @@ -149,7 +149,6 @@
           return m_vssPath;
       }
   
  -
       protected int run(Commandline cmd) {
           try {
               Execute exe = new Execute(new LogStreamHandler(this, 
  @@ -168,7 +167,7 @@
        * Constant for the thing to execute
        */
       private static final String SS_EXE = "ss";
  -	/** */
  +    /** */
       public static final String PROJECT_PREFIX = "$";
   
       /**
  @@ -188,25 +187,25 @@
        */
       public static final String COMMAND_HISTORY = "History";
   
  -	/** */
  +    /** */
       public static final String FLAG_LOGIN = "-Y";
  -	/** */
  +    /** */
       public static final String FLAG_OVERRIDE_WORKING_DIR = "-GL";
  -	/** */
  +    /** */
       public static final String FLAG_AUTORESPONSE = "-I";
  -	/** */
  +    /** */
       public static final String FLAG_RECURSION = "-R";
  -	/** */
  +    /** */
       public static final String FLAG_VERSION = "-V";
  -	/** */
  +    /** */
       public static final String FLAG_VERSION_DATE = "-Vd";
  -	/** */
  +    /** */
       public static final String FLAG_VERSION_LABEL = "-VL";
  -	/** */
  +    /** */
       public static final String FLAG_WRITABLE = "-W";
  -	/** */
  +    /** */
       public static final String VALUE_NO = "-N";
  -	/** */
  +    /** */
       public static final String VALUE_YES = "-Y";
   }
   
  
  
  
  1.3       +6 -5      jakarta-ant/src/main/org/apache/tools/ant/types/DataType.java
  
  Index: DataType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/DataType.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DataType.java	2000/11/17 10:00:58	1.2
  +++ DataType.java	2000/11/25 02:38:54	1.3
  @@ -54,10 +54,10 @@
   
   package org.apache.tools.ant.types;
   
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
   
   import java.util.Stack;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Project;
   
   /**
    * Base class for those classes that can appear inside the build file
  @@ -95,14 +95,14 @@
        * in commenting what we are doing.  
        */
       public void setDescription( String desc ) {
  -	description=desc;
  +        description=desc;
       }
   
       /**
        * Return the description for the current data type.
        */
       public String getDescription() {
  -	return description;
  +        return description;
       }
   
       /**
  @@ -166,7 +166,8 @@
        * only attribute if it is set.  
        */
       protected BuildException tooManyAttributes() {
  -        return new BuildException("You must not specify more than one attribute when using refid");
  +        return new BuildException( "You must not specify more than one attribute" +
  +                                   " when using refid" );
       }
   
       /**
  
  
  

Mime
View raw message