ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sound AntSoundPlayer.java
Date Tue, 27 Nov 2001 18:04:54 GMT
umagesh     01/11/27 10:04:54

  Modified:    src/main/org/apache/tools/ant RuntimeConfigurable.java
               src/main/org/apache/tools/ant/taskdefs Deltree.java
                        ExecTask.java Get.java Javac.java Javadoc.java
                        Mkdir.java
               src/main/org/apache/tools/ant/taskdefs/compilers Kjc.java
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        EjbJar.java IPlanetEjbc.java IPlanetEjbcTask.java
               src/main/org/apache/tools/ant/taskdefs/optional/ide
                        VAJAntTool.java VAJAntToolGUI.java
                        VAJBuildInfo.java VAJExport.java VAJImport.java
                        VAJImportServlet.java VAJLocalUtil.java
                        VAJProjectDescription.java VAJRemoteUtil.java
                        VAJTask.java VAJToolsServlet.java VAJUtil.java
                        VAJWorkspaceScanner.java
               src/main/org/apache/tools/ant/taskdefs/optional/jdepend
                        JDependTask.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        AggregateTransformer.java BaseTest.java
                        XMLResultAggregator.java
               src/main/org/apache/tools/ant/taskdefs/optional/metamata
                        MMetricsStreamHandler.java
               src/main/org/apache/tools/ant/taskdefs/optional/perforce
                        P4Edit.java P4HandlerAdapter.java P4Label.java
                        P4Submit.java SimpleP4OutputHandler.java
               src/main/org/apache/tools/ant/taskdefs/optional/sitraka
                        XMLReport.java
               src/main/org/apache/tools/ant/taskdefs/optional/sitraka/bytecode
                        ClassPathLoader.java Utils.java
               src/main/org/apache/tools/ant/taskdefs/optional/sound
                        AntSoundPlayer.java
  Log:
  Convert tabs to spaces...
  
  Revision  Changes    Path
  1.10      +4 -4      jakarta-ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  
  Index: RuntimeConfigurable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RuntimeConfigurable.java	2001/10/31 11:04:59	1.9
  +++ RuntimeConfigurable.java	2001/11/27 18:04:51	1.10
  @@ -132,14 +132,14 @@
       public String getElementTag() {
           return elementTag;
       }
  -    
  -    
  +
  +
       /**
        * Configure the wrapped element and all children.
        */
       public void maybeConfigure(Project p) throws BuildException {
  -	String id = null;
  -	
  +    String id = null;
  +
           if (attributes != null) {
               ProjectHelper.configure(wrappedObject, attributes, p);
               id = attributes.getValue("id");
  
  
  
  1.11      +37 -37    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java
  
  Index: Deltree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Deltree.java	2001/10/28 21:26:29	1.10
  +++ Deltree.java	2001/11/27 18:04:52	1.11
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -72,28 +72,28 @@
       private File dir;
   
       public void setDir(File dir) {
  -	this.dir = dir;
  +        this.dir = dir;
       }
  -    
  +
       public void execute() throws BuildException {
           log("DEPRECATED - The deltree task is deprecated.  Use delete instead.");
   
           if (dir == null) {
               throw new BuildException("dir attribute must be set!", location);
  -        } 
  +        }
   
  -	if (dir.exists()) {
  -	    if (!dir.isDirectory()) {
  -		if (!dir.delete()) {
  -        	    throw new BuildException("Unable to delete directory " 
  +        if (dir.exists()) {
  +            if (!dir.isDirectory()) {
  +                if (!dir.delete()) {
  +                    throw new BuildException("Unable to delete directory "
                                                + dir.getAbsolutePath(),
                                                location);
  -	        }
  -		return;
  -		// String msg = "Given dir: " + dir.getAbsolutePath() +
  -		// " is not a dir";
  -		// throw new BuildException(msg);
  -	    }
  +                }
  +                return;
  +                // String msg = "Given dir: " + dir.getAbsolutePath() +
  +                // " is not a dir";
  +                // throw new BuildException(msg);
  +            }
   
               log("Deleting: " + dir.getAbsolutePath());
   
  @@ -105,31 +105,31 @@
               }
           }
       }
  -    
  +
       private void removeDir(File dir) throws IOException {
   
           // check to make sure that the given dir isn't a symlink
           // the comparison of absolute path and canonical path
           // catches this
  -	
  -	//        if (dir.getCanonicalPath().equals(dir.getAbsolutePath())) {
  -	// (costin) It will not work if /home/costin is symlink to /da0/home/costin ( taz
  -	// for example )
  -	String[] list = dir.list();
  -	for (int i = 0; i < list.length; i++) {
  -	    String s = list[i];
  -	    File f = new File(dir, s);
  -	    if (f.isDirectory()) {
  -		removeDir(f);
  -	    } else {
  -		if (!f.delete()) {
  -        	    throw new BuildException("Unable to delete file " + f.getAbsolutePath());
  -	        }
  -	    }
  -	}
  +
  +        //        if (dir.getCanonicalPath().equals(dir.getAbsolutePath())) {
  +        // (costin) It will not work if /home/costin is symlink to /da0/home/costin ( taz
  +        // for example )
  +        String[] list = dir.list();
  +        for (int i = 0; i < list.length; i++) {
  +            String s = list[i];
  +            File f = new File(dir, s);
  +            if (f.isDirectory()) {
  +                removeDir(f);
  +            } else {
  +                if (!f.delete()) {
  +                    throw new BuildException("Unable to delete file " + f.getAbsolutePath());
  +                }
  +            }
  +        }
           if (!dir.delete()) {
  -	    throw new BuildException("Unable to delete directory " + dir.getAbsolutePath());
  -	}
  +            throw new BuildException("Unable to delete directory " + dir.getAbsolutePath());
  +        }
       }
   }
   
  
  
  
  1.18      +13 -13    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  
  Index: ExecTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ExecTask.java	2001/10/28 21:26:29	1.17
  +++ ExecTask.java	2001/11/27 18:04:52	1.18
  @@ -75,7 +75,7 @@
    * @author rubys@us.ibm.com
    * @author thomas.haas@softwired-inc.com
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @author <a href="mailto:mariusz@rakiura.org">Mariusz Nowostawski</a> 
  + * @author <a href="mailto:mariusz@rakiura.org">Mariusz Nowostawski</a>
    */
   public class ExecTask extends Task {
   
  @@ -95,7 +95,7 @@
   
       /** Controls whether the VM (1.3 and above) is used to execute the command */
       private boolean vmLauncher = true;
  -     
  +
       /**
        * Timeout in milliseconds after which the process will be killed.
        */
  @@ -146,7 +146,7 @@
        * the process
        */
       public void setOutputproperty(String outputprop) {
  -	this.outputprop = outputprop;
  +        this.outputprop = outputprop;
       }
   
       /**
  @@ -195,10 +195,10 @@
               throw new BuildException("no executable specified", location);
           }
           if (dir != null && !dir.exists()) {
  -        	throw new BuildException("The directory you specified does not exist");
  +            throw new BuildException("The directory you specified does not exist");
           }
           if (dir != null && !dir.isDirectory()) {
  -        	throw new BuildException("The directory you specified is not a directory");
  +            throw new BuildException("The directory you specified is not a directory");
           }
       }
   
  @@ -224,7 +224,7 @@
       public void setVMLauncher(boolean vmLauncher) {
           this.vmLauncher = vmLauncher;
       }
  -    
  +
       /**
        * Create an Execute instance with the correct working directory set.
        */
  @@ -233,7 +233,7 @@
           if (dir == null) dir = project.getBaseDir();
           // show the command
           log(cmdl.toString(), Project.MSG_VERBOSE);
  -        
  +
           Execute exe = new Execute(createHandler(), createWatchdog());
           exe.setAntRun(project);
           exe.setWorkingDirectory(dir);
  @@ -265,7 +265,7 @@
               }
           }
           if (baos != null) {
  -            BufferedReader in = 
  +            BufferedReader in =
                   new BufferedReader(new StringReader(baos.toString()));
               String line = null;
               StringBuffer val = new StringBuffer();
  @@ -278,7 +278,7 @@
               project.setProperty(outputprop, val.toString());
           }
       }
  -    
  +
       /**
        * Run the command using the given Execute instance. This may be overidden by subclasses
        */
  @@ -309,10 +309,10 @@
                   throw new BuildException("Cannot write to "+out, ioe, location);
               }
           } else if (outputprop != null) {
  -	    //	    try {
  -	    baos = new ByteArrayOutputStream();
  -	    log("Output redirected to ByteArray", Project.MSG_VERBOSE);
  -	    return new PumpStreamHandler(baos);
  +        //    try {
  +        baos = new ByteArrayOutputStream();
  +        log("Output redirected to ByteArray", Project.MSG_VERBOSE);
  +        return new PumpStreamHandler(baos);
           } else {
               return new LogStreamHandler(this,
                                           Project.MSG_INFO, Project.MSG_WARN);
  
  
  
  1.11      +134 -141  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java
  
  Index: Get.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Get.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Get.java	2001/10/28 21:26:29	1.10
  +++ Get.java	2001/11/27 18:04:52	1.11
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -67,9 +67,9 @@
   import org.apache.tools.ant.Project;
   
   /**
  - * Get a particular file from a URL source. 
  - * Options include verbose reporting, timestamp based fetches and controlling 
  - * actions on failures. NB: access through a firewall only works if the whole 
  + * Get a particular file from a URL source.
  + * Options include verbose reporting, timestamp based fetches and controlling
  + * actions on failures. NB: access through a firewall only works if the whole
    * Java runtime is correctly configured.
    *
    * @author costin@dnt.ro
  @@ -84,7 +84,7 @@
       private String uname = null;
       private String pword = null;
   
  -    
  +
       /**
        * Does the work.
        *
  @@ -99,12 +99,12 @@
               throw new BuildException("dest attribute is required", location);
           }
   
  -        if (dest.exists() && dest.isDirectory()) { 
  +        if (dest.exists() && dest.isDirectory()) {
               throw new BuildException("The specified destination is a directory",
                                        location);
           }
   
  -        if (dest.exists() && !dest.canWrite()) { 
  +        if (dest.exists() && !dest.canWrite()) {
               throw new BuildException("Can't write to " + dest.getAbsolutePath(),
                                        location);
           }
  @@ -123,10 +123,10 @@
                       Date t=new Date(timestamp);
                       log("local file date : "+t.toString());
                   }
  -                
  +
                   hasTimestamp=true;
               }
  -        
  +
               //set up the URL connection
               URLConnection connection=source.openConnection();
               //modify the headers
  @@ -134,24 +134,23 @@
               if(useTimestamp && hasTimestamp) {
                   connection.setIfModifiedSince(timestamp);
               }
  -	    // prepare Java 1.1 style credentials
  -	    if (uname != null || pword != null) {
  -	      String up = uname + ":" + pword;
  -	      String encoding;
  -	      // check to see if sun's Base64 encoder is available.
  -	      try {
  -		sun.misc.BASE64Encoder encoder = 
  -		  (sun.misc.BASE64Encoder) Class.forName("sun.misc.BASE64Encoder").newInstance();
  -		encoding = encoder.encode (up.getBytes());
  -
  -	      }
  -	      catch (Exception ex) { // sun's base64 encoder isn't available 
  -		Base64Converter encoder = new Base64Converter();
  -		encoding = encoder.encode(up.getBytes());
  -	      }
  -	      connection.setRequestProperty ("Authorization", "Basic " + encoding);
  +            // prepare Java 1.1 style credentials
  +            if (uname != null || pword != null) {
  +                String up = uname + ":" + pword;
  +                String encoding;
  +                // check to see if sun's Base64 encoder is available.
  +                try {
  +                    sun.misc.BASE64Encoder encoder =
  +                        (sun.misc.BASE64Encoder) Class.forName("sun.misc.BASE64Encoder").newInstance();
  +                    encoding = encoder.encode (up.getBytes());
   
  -	    }
  +                }
  +                catch (Exception ex) { // sun's base64 encoder isn't available
  +                    Base64Converter encoder = new Base64Converter();
  +                    encoding = encoder.encode(up.getBytes());
  +                }
  +                connection.setRequestProperty ("Authorization", "Basic " + encoding);
  +            }
   
               //connect to the remote site (may take some time)
               connection.connect();
  @@ -160,23 +159,23 @@
                   HttpURLConnection httpConnection=(HttpURLConnection)connection;
                   if(httpConnection.getResponseCode()==HttpURLConnection.HTTP_NOT_MODIFIED)  {
                       //not modified so no file download. just return instead
  -                    //and trace out something so the user doesn't think that the 
  +                    //and trace out something so the user doesn't think that the
                       //download happened when it didnt
                       log("Not modified - so not downloaded");
  -                    return; 
  +                    return;
                   }
  -		// test for 401 result (HTTP only)
  +                // test for 401 result (HTTP only)
                   if(httpConnection.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED)  {
                       log("Not authorized - check " + dest + " for details");
  -                    return; 
  +                    return;
                   }
   
               }
   
               //REVISIT: at this point even non HTTP connections may support the if-modified-since
               //behaviour -we just check the date of the content and skip the write if it is not
  -            //newer. Some protocols (FTP) dont include dates, of course. 
  -                   
  +            //newer. Some protocols (FTP) dont include dates, of course.
  +
               FileOutputStream fos = new FileOutputStream(dest);
   
               InputStream is=null;
  @@ -190,15 +189,15 @@
               }
               if( is==null ) {
                   log( "Can't get " + source + " to " + dest);
  -                if(ignoreErrors) 
  +                if(ignoreErrors)
                       return;
                   throw new BuildException( "Can't get " + source + " to " + dest,
                                             location);
               }
  -                
  +
               byte[] buffer = new byte[100 * 1024];
               int length;
  -            
  +
               while ((length = is.read(buffer)) >= 0) {
                   fos.write(buffer, 0, length);
                   if (verbose) System.out.print(".");
  @@ -206,8 +205,8 @@
               if(verbose) System.out.println();
               fos.close();
               is.close();
  -           
  -            //if (and only if) the use file time option is set, then the 
  +
  +            //if (and only if) the use file time option is set, then the
               //saved file now has its timestamp set to that of the downloaded file
               if(useTimestamp)  {
                   long remoteTimestamp=connection.getLastModified();
  @@ -219,18 +218,15 @@
                   if(remoteTimestamp!=0)
                       touchFile(dest,remoteTimestamp);
               }
  -
  -           
  -
           } catch (IOException ioe) {
               log("Error getting " + source + " to " + dest );
  -            if(ignoreErrors) 
  +            if(ignoreErrors)
                   return;
               throw new BuildException(ioe, location);
           }
       }
  -    
  -    /** 
  +
  +    /**
        * set the timestamp of a named file to a specified time.
        *
        * @param filename
  @@ -240,7 +236,7 @@
        *@exception BuildException Thrown in unrecoverable error. Likely
        *this comes from file access failures.
        */
  -    protected boolean touchFile(File file, long timemillis) 
  +    protected boolean touchFile(File file, long timemillis)
           throws BuildException  {
   
           if (project.getJavaVersion() != Project.JAVA_1_1) {
  @@ -252,11 +248,11 @@
               touch.setMillis(timemillis);
               touch.touch();
               return true;
  -            
  +
           } else {
               return false;
           }
  -    }        
  +    }
   
       /**
        * Set the URL.
  @@ -300,13 +296,13 @@
        * <p>In this situation, the if-modified-since header is set so that the file is
        * only fetched if it is newer than the local file (or there is no local file)
        * This flag is only valid on HTTP connections, it is ignored in other cases.
  -     * When the flag is set, the local copy of the downloaded file will also 
  -     * have its timestamp set to the remote file time. 
  +     * When the flag is set, the local copy of the downloaded file will also
  +     * have its timestamp set to the remote file time.
        * <br>
        * Note that remote files of date 1/1/1970 (GMT) are treated as 'no timestamp', and
        * web servers often serve files with a timestamp in the future by replacing their timestamp
  -     * with that of the current time. Also, inter-computer clock differences can cause no end of 
  -     * grief. 
  +     * with that of the current time. Also, inter-computer clock differences can cause no end of
  +     * grief.
        * @param v "true" to enable file time fetching
        */
       public void setUseTimestamp(boolean v) {
  @@ -334,95 +330,92 @@
         this.pword = p;
       }
   
  -     /*********************************************************************
  -     * BASE 64 encoding of a String or an array of bytes.
  -     *
  -     * Based on RFC 1421.
  -     * 
  -     * @author
  -     *    Unknown
  -     *  @author
  -     *    <a HREF="gg@grtmail.com">Gautam Guliani</a>
  -     *********************************************************************/
  -
  -     class  Base64Converter
  -     {
  -
  -     public final char [ ]  alphabet = {
  -       'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',   //  0 to  7
  -       'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',   //  8 to 15
  -       'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',   // 16 to 23
  -       'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',   // 24 to 31
  -       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',   // 32 to 39
  -       'o', 'p', 'q', 'r', 's', 't', 'u', 'v',   // 40 to 47
  -       'w', 'x', 'y', 'z', '0', '1', '2', '3',   // 48 to 55
  -       '4', '5', '6', '7', '8', '9', '+', '/' }; // 56 to 63
  -
  -
  -     public String  encode ( String  s )
  -     {
  -       return encode ( s.getBytes ( ) );
  -     }
  -
  -     public String  encode ( byte [ ]  octetString )
  -     {
  -       int  bits24;
  -       int  bits6;
  -
  -       char [ ]  out
  -         = new char [ ( ( octetString.length - 1 ) / 3 + 1 ) * 4 ];
  -
  -       int outIndex = 0;
  -       int i        = 0;
  -
  -       while ( ( i + 3 ) <= octetString.length ) {
  -       // store the octets 
  -	 bits24=( octetString [ i++ ] & 0xFF ) << 16;
  -         bits24 |=( octetString [ i++ ] & 0xFF ) << 8;
  -
  -         bits6=( bits24 & 0x00FC0000 )>> 18; 
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -         bits6 = ( bits24 & 0x0003F000 ) >> 12; 
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -         bits6 = ( bits24 & 0x00000FC0 ) >> 6; 
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -         bits6 = ( bits24 & 0x0000003F );
  -         out [ outIndex++ ] = alphabet [ bits6 ]; 
  -       }
  -
  -       if ( octetString.length - i == 2 )
  -       {
  -         // store the octets 
  -         bits24  = ( octetString [ i     ] & 0xFF ) << 16;
  -         bits24 |=( octetString [ i + 1 ] & 0xFF ) << 8;
  -         bits6=( bits24 & 0x00FC0000 )>> 18;
  -         out [ outIndex++ ] = alphabet [ bits6 ]; 
  -         bits6 = ( bits24 & 0x0003F000 ) >> 12; 
  -         out [ outIndex++ ] = alphabet [ bits6 ]; 
  -         bits6 = ( bits24 & 0x00000FC0 ) >> 6; 
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -
  -         // padding
  -         out [ outIndex++ ] = '='; 
  -       }
  -       else if ( octetString.length - i == 1 )
  -       {
  -         // store the octets 
  -         bits24 = ( octetString [ i ] & 0xFF ) << 16;
  -         bits6=( bits24 & 0x00FC0000 )>> 18;
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -         bits6 = ( bits24 & 0x0003F000 ) >> 12; 
  -         out [ outIndex++ ] = alphabet [ bits6 ];
  -
  -         // padding
  -         out [ outIndex++ ] = '='; 
  -         out [ outIndex++ ] = '='; 
  -       }
  +    /*********************************************************************
  +    * BASE 64 encoding of a String or an array of bytes.
  +    *
  +    * Based on RFC 1421.
  +    *
  +    * @author
  +    *    Unknown
  +    *  @author
  +    *    <a HREF="gg@grtmail.com">Gautam Guliani</a>
  +    *********************************************************************/
  +
  +    class  Base64Converter
  +    {
  +
  +        public final char [ ]  alphabet = {
  +            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',   //  0 to  7
  +            'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',   //  8 to 15
  +            'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',   // 16 to 23
  +            'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',   // 24 to 31
  +            'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',   // 32 to 39
  +            'o', 'p', 'q', 'r', 's', 't', 'u', 'v',   // 40 to 47
  +            'w', 'x', 'y', 'z', '0', '1', '2', '3',   // 48 to 55
  +            '4', '5', '6', '7', '8', '9', '+', '/' }; // 56 to 63
  +
  +
  +        public String  encode ( String  s )
  +        {
  +            return encode ( s.getBytes ( ) );
  +        }
   
  -       return new String ( out );
  -     }
  +        public String  encode ( byte [ ]  octetString )
  +        {
  +            int  bits24;
  +            int  bits6;
  +
  +            char [ ]  out
  +              = new char [ ( ( octetString.length - 1 ) / 3 + 1 ) * 4 ];
  +
  +            int outIndex = 0;
  +            int i        = 0;
  +
  +            while ( ( i + 3 ) <= octetString.length ) {
  +                // store the octets
  +                bits24=( octetString [ i++ ] & 0xFF ) << 16;
  +                bits24 |=( octetString [ i++ ] & 0xFF ) << 8;
  +
  +                bits6=( bits24 & 0x00FC0000 )>> 18;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x0003F000 ) >> 12;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x00000FC0 ) >> 6;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x0000003F );
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +            }
   
  -     }
  +            if ( octetString.length - i == 2 )
  +            {
  +                // store the octets
  +                bits24  = ( octetString [ i     ] & 0xFF ) << 16;
  +                bits24 |=( octetString [ i + 1 ] & 0xFF ) << 8;
  +                bits6=( bits24 & 0x00FC0000 )>> 18;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x0003F000 ) >> 12;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x00000FC0 ) >> 6;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
   
  +                // padding
  +                out [ outIndex++ ] = '=';
  +            }
  +            else if ( octetString.length - i == 1 )
  +            {
  +                // store the octets
  +                bits24 = ( octetString [ i ] & 0xFF ) << 16;
  +                bits6=( bits24 & 0x00FC0000 )>> 18;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +                bits6 = ( bits24 & 0x0003F000 ) >> 12;
  +                out [ outIndex++ ] = alphabet [ bits6 ];
  +
  +                // padding
  +                out [ outIndex++ ] = '=';
  +                out [ outIndex++ ] = '=';
  +            }
   
  +            return new String ( out );
  +        }
  +     }
   }
  
  
  
  1.77      +19 -19    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Javac.java	2001/11/22 08:41:49	1.76
  +++ Javac.java	2001/11/27 18:04:52	1.77
  @@ -134,7 +134,7 @@
   
       private String source;
       private String debugLevel;
  -    
  +
       /**
        * Get the value of debugLevel.
        * @return value of debugLevel.
  @@ -158,7 +158,7 @@
       public String getSource() {
           return source;
       }
  -    
  +
       /**
        * Set the value of source.
        * @param v  Value to assign to source.
  @@ -500,7 +500,7 @@
        * Is this a forked invocation of JDK's javac?
        */
       public boolean isForkedJavac() {
  -        return !"false".equals(fork) || 
  +        return !"false".equals(fork) ||
               "extJavac".equals(project.getProperty("build.compiler"));
       }
   
  @@ -534,7 +534,7 @@
        * Adds an implementation specific command line argument.
        */
       public ImplementationSpecificArgument createCompilerArg() {
  -        ImplementationSpecificArgument arg = 
  +        ImplementationSpecificArgument arg =
               new ImplementationSpecificArgument();
           implementationSpecificArgs.addElement(arg);
           return arg;
  @@ -546,10 +546,10 @@
        */
       public String[] getCurrentCompilerArgs() {
           Vector args = new Vector();
  -        for (Enumeration enum = implementationSpecificArgs.elements(); 
  +        for (Enumeration enum = implementationSpecificArgs.elements();
                enum.hasMoreElements();
                ) {
  -            String[] curr = 
  +            String[] curr =
                   ((ImplementationSpecificArgument) enum.nextElement()).getParts();
               for (int i=0; i<curr.length; i++) {
                   args.addElement(curr[i]);
  @@ -666,25 +666,25 @@
       }
   
       protected String getSystemJavac() {
  -	// This is the most common extension case - exe for windows and OS/2, 
  +        // This is the most common extension case - exe for windows and OS/2,
           // nothing for *nix.
  -	String extension =  Os.isFamily("dos") ? ".exe" : "";
  +        String extension =  Os.isFamily("dos") ? ".exe" : "";
   
  -	// Look for java in the java.home/../bin directory.  Unfortunately
  -	// on Windows java.home doesn't always refer to the correct location, 
  -	// so we need to fall back to assuming java is somewhere on the
  -	// PATH.
  -	java.io.File jExecutable = 
  +        // Look for java in the java.home/../bin directory.  Unfortunately
  +        // on Windows java.home doesn't always refer to the correct location,
  +        // so we need to fall back to assuming java is somewhere on the
  +        // PATH.
  +        java.io.File jExecutable =
               new java.io.File(System.getProperty("java.home") +
                                "/../bin/javac" + extension );
   
  -	if (jExecutable.exists() && !Os.isFamily("netware")) {
  -	    return jExecutable.getAbsolutePath();
  -	} else {
  -	    return "javac";
  -	}
  +        if (jExecutable.exists() && !Os.isFamily("netware")) {
  +            return jExecutable.getAbsolutePath();
  +        } else {
  +            return "javac";
  +        }
       }
  -    
  +
       private String determineCompiler() {
           String compiler = project.getProperty("build.compiler");
   
  
  
  
  1.66      +57 -57    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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Javadoc.java	2001/11/02 16:36:49	1.65
  +++ Javadoc.java	2001/11/27 18:04:52	1.66
  @@ -107,15 +107,15 @@
       public class DocletParam {
           private String name;
           private String value;
  -        
  +
           public void setName(String name) {
               this.name = name;
           }
  -        
  +
           public String getName() {
               return name;
           }
  -        
  +
           public void setValue(String value) {
               this.value = value;
           }
  @@ -128,17 +128,17 @@
       public class DocletInfo {
           private String name;
           private Path path;
  -        
  +
           private Vector params = new Vector();
   
           public void setName(String name) {
               this.name = name;
           }
  -        
  +
           public String getName() {
               return name;
           }
  -        
  +
           public void setPath(Path path) {
               if (this.path == null) {
                   this.path = path;
  @@ -150,7 +150,7 @@
           public Path getPath() {
               return path;
           }
  -        
  +
           public Path createPath() {
               if (path == null) {
                   path = new Path(getProject());
  @@ -168,10 +168,10 @@
           public DocletParam createParam() {
               DocletParam param = new DocletParam();
               params.addElement(param);
  -            
  +
               return param;
           }
  -        
  +
           public Enumeration getParams() {
               return params.elements();
           }
  @@ -219,7 +219,7 @@
       }
   
       private Commandline cmd = new Commandline();
  -    private static boolean javadoc1 = 
  +    private static boolean javadoc1 =
           (Project.getJavaVersion() == Project.JAVA_1_1);
   
   
  @@ -235,11 +235,11 @@
                   cmd.createArgument().setValue(key);
                   cmd.createArgument().setValue(value);
               } else {
  -                project.log(this, 
  -                            "Warning: Leaving out empty argument '" + key + "'", 
  +                project.log(this,
  +                            "Warning: Leaving out empty argument '" + key + "'",
                               Project.MSG_WARN);
               }
  -        } 
  +        }
       }
   
       private void add11ArgIf(boolean b, String arg) {
  @@ -294,7 +294,7 @@
       /**
        * Sets whether default exclusions should be used or not.
        *
  -     * @param useDefaultExcludes "true"|"on"|"yes" when default exclusions 
  +     * @param useDefaultExcludes "true"|"on"|"yes" when default exclusions
        *                           should be used, "false"|"off"|"no" when they
        *                           shouldn't be used.
        */
  @@ -313,7 +313,7 @@
       public void setAdditionalparam(String add){
           cmd.createArgument().setLine(add);
       }
  -    
  +
       public void setSourcepath(Path src) {
           if (sourcePath == null) {
               sourcePath = src;
  @@ -405,7 +405,7 @@
           }
           doclet.setName(src);
       }
  -    
  +
       public void setDocletPath(Path src) {
           if (doclet == null) {
               doclet = new DocletInfo();
  @@ -551,17 +551,17 @@
           if (!javadoc1) {
               LinkArgument le = createLink();
               le.setOffline(true);
  -            String linkOfflineError = "The linkoffline attribute must include a URL and " + 
  +            String linkOfflineError = "The linkoffline attribute must include a URL and " +
                   "a package-list file location separated by a space";
               if (src.trim().length() == 0) {
                   throw new BuildException(linkOfflineError);
  -            }                
  +            }
               StringTokenizer tok = new StringTokenizer(src, " ", false);
               le.setHref(tok.nextToken());
   
               if (!tok.hasMoreTokens()) {
                   throw new BuildException(linkOfflineError);
  -            }                                        
  +            }
               le.setPackagelistLoc(project.resolveFile(tok.nextToken()));
           }
       }
  @@ -613,46 +613,46 @@
       public void setPackageList(String src) {
           packageList = src;
       }
  -    
  +
       public LinkArgument createLink() {
           LinkArgument la = new LinkArgument();
           links.addElement(la);
           return la;
       }
  -    
  +
       public class LinkArgument {
           private String href;
           private boolean offline = false;
           private File packagelistLoc;
  -        
  +
           public LinkArgument() {
           }
   
           public void setHref(String hr) {
               href = hr;
           }
  -        
  +
           public String getHref() {
               return href;
           }
  -        
  +
           public void setPackagelistLoc(File src) {
               packagelistLoc = src;
           }
  -        
  +
           public File getPackagelistLoc() {
               return packagelistLoc;
           }
  -        
  +
           public void setOffline(boolean offline) {
               this.offline = offline;
           }
  -        
  +
           public boolean isLinkOffline() {
               return offline;
           }
       }
  -    
  +
       public GroupArgument createGroup() {
           GroupArgument ga = new GroupArgument();
           groups.addElement(ga);
  @@ -703,7 +703,7 @@
               return p.toString();
           }
       }
  -    
  +
       public void setCharset(String src) {
           this.add12ArgIfNotEmpty("-charset", src);
       }
  @@ -778,7 +778,7 @@
                   throw new BuildException(msg);
               }
           }
  -        
  +
   
   // --------------------------------- javadoc2 arguments for default doclet
   
  @@ -789,7 +789,7 @@
                   if (doclet.getName() == null) {
                       throw new BuildException("The doclet name must be specified.", location);
                   }
  -                else {                
  +                else {
                       toExecute.createArgument().setValue("-doclet");
                       toExecute.createArgument().setValue(doclet.getName());
                       if (doclet.getPath() != null) {
  @@ -801,28 +801,28 @@
                           if (param.getName() == null) {
                               throw new BuildException("Doclet parameters must have a name");
                           }
  -                        
  +
                           toExecute.createArgument().setValue(param.getName());
                           if (param.getValue() != null) {
                               toExecute.createArgument().setValue(param.getValue());
                           }
  -                    }                        
  +                    }
                   }
  -            } 
  +            }
               if (bootclasspath != null) {
                   toExecute.createArgument().setValue("-bootclasspath");
                   toExecute.createArgument().setPath(bootclasspath);
               }
  -            
  +
               // add the links arguments
               if (links.size() != 0) {
                   for (Enumeration e = links.elements(); e.hasMoreElements(); ) {
                       LinkArgument la = (LinkArgument)e.nextElement();
  -                
  +
                       if (la.getHref() == null) {
                           throw new BuildException("Links must provide the URL to the external class documentation.");
                       }
  -                
  +
                       if (la.isLinkOffline()) {
                           File packageListLocation = la.getPackagelistLoc();
                           if (packageListLocation == null) {
  @@ -836,7 +836,7 @@
                               toExecute.createArgument().setValue(packageListLocation.getAbsolutePath());
                           }
                           else {
  -                            log("Warning: No package list was found at " + packageListLocation, 
  +                            log("Warning: No package list was found at " + packageListLocation,
                                   Project.MSG_VERBOSE);
                           }
                       }
  @@ -845,8 +845,8 @@
                           toExecute.createArgument().setValue(la.getHref());
                       }
                   }
  -            }                                   
  -                                                
  +            }
  +
               // add the single group arguments
               // Javadoc 1.2 rules:
               //   Multiple -group args allowed.
  @@ -872,7 +872,7 @@
                       }
                   }
               }
  -            
  +
               // add the group arguments
               if (groups.size() != 0) {
                   for (Enumeration e = groups.elements(); e.hasMoreElements(); ) {
  @@ -929,10 +929,10 @@
                           tmpList = fileUtils.createTempFile("javadoc", "", null);
                           toExecute.createArgument().setValue("@" + tmpList.getAbsolutePath());
                       }
  -                    srcListWriter = new PrintWriter(new FileWriter(tmpList.getAbsolutePath(), 
  +                    srcListWriter = new PrintWriter(new FileWriter(tmpList.getAbsolutePath(),
                                                                      true));
                   }
  -            
  +
                   Enumeration enum = sourceFiles.elements();
                   while (enum.hasMoreElements()) {
                       SourceFile sf = (SourceFile) enum.nextElement();
  @@ -945,7 +945,7 @@
                   }
   
               } catch (IOException e) {
  -                throw new BuildException("Error creating temporary file", 
  +                throw new BuildException("Error creating temporary file",
                                            e, location);
               } finally {
                   if (srcListWriter != null) {
  @@ -965,7 +965,7 @@
           JavadocOutputStream err = new JavadocOutputStream(Project.MSG_WARN);
           Execute exe = new Execute(new PumpStreamHandler(out, err));
           exe.setAntRun(project);
  -        
  +
           /*
            * No reason to change the working directory as all filenames and
            * path components have been resolved already.
  @@ -987,7 +987,7 @@
                   tmpList.delete();
                   tmpList = null;
               }
  -            
  +
               out.logFlush();
               err.logFlush();
               try {
  @@ -1002,7 +1002,7 @@
        * with the packages found in that path subdirs matching one of the given
        * patterns.
        */
  -    private void evaluatePackages(Commandline toExecute, Path sourcePath, 
  +    private void evaluatePackages(Commandline toExecute, Path sourcePath,
                                     Vector packages, Vector excludePackages) {
           log("Source path = " + sourcePath.toString(), Project.MSG_VERBOSE);
           StringBuffer msg = new StringBuffer("Packages = ");
  @@ -1050,10 +1050,10 @@
               if (pkg.endsWith("*")) {
                   pkg += "*";
               }
  -            
  +
               fs.createExclude().setName(pkg);
           }
  -        
  +
           PrintWriter packageListWriter = null;
           try {
               if (useExternalFile) {
  @@ -1066,10 +1066,10 @@
               for (int j=0; j<list.length; j++) {
                   File source = project.resolveFile(list[j]);
                   fs.setDir(source);
  -                
  +
                   DirectoryScanner ds = fs.getDirectoryScanner(project);
                   String[] packageDirs = ds.getIncludedDirectories();
  -                
  +
                   for (int i=0; i<packageDirs.length; i++) {
                       File pd = new File(source, packageDirs[i]);
                       String[] files = pd.list(new FilenameFilter () {
  @@ -1080,7 +1080,7 @@
                                   return false;        // ignore dirs
                               }
                           });
  -                    
  +
                       if (files.length > 0) {
                           String pkgDir = packageDirs[i].replace('/','.').replace('\\','.');
                           if (!addedPackages.contains(pkgDir)) {
  @@ -1095,7 +1095,7 @@
                   }
               }
           } catch (IOException ioex) {
  -            throw new BuildException("Error creating temporary file", 
  +            throw new BuildException("Error creating temporary file",
                                        ioex, location);
           } finally {
               if (packageListWriter != null) {
  @@ -1132,8 +1132,8 @@
                   super.processLine(line, messageLevel);
               }
           }
  +
   
  -        
           protected void logFlush() {
               if (queuedLine != null) {
                   super.processLine(queuedLine, Project.MSG_VERBOSE);
  @@ -1146,15 +1146,15 @@
        * Convenience method to expand properties.
        */
       protected String expand(String content) {
  -        return ProjectHelper.replaceProperties(project, content, 
  +        return ProjectHelper.replaceProperties(project, content,
                                                  project.getProperties());
       }
   
       private String getJavadocExecutableName()
       {
  -        // This is the most common extension case - exe for windows and OS/2, 
  +        // This is the most common extension case - exe for windows and OS/2,
           // nothing for *nix.
  -	String extension =  Os.isFamily("dos") ? ".exe" : "";
  +        String extension =  Os.isFamily("dos") ? ".exe" : "";
   
           // Look for javadoc in the java.home/../bin directory.  Unfortunately
           // on Windows java.home doesn't always refer to the correct location,
  
  
  
  1.10      +17 -17    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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Mkdir.java	2001/10/28 21:26:29	1.9
  +++ Mkdir.java	2001/11/27 18:04:52	1.10
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -50,7 +50,7 @@
    * 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;
   
  @@ -68,7 +68,7 @@
   public class Mkdir extends Task {
   
       private File dir;
  -    
  +
       public void execute() throws BuildException {
           if (dir == null) {
               throw new BuildException("dir attribute is required", location);
  @@ -77,19 +77,19 @@
           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) {
  -		String msg = "Directory " + dir.getAbsolutePath() + " creation was not " +
  -		    "successful for an unknown reason";
  -		throw new BuildException(msg, location);
  -	    }
  -	    log("Created dir: " + dir.getAbsolutePath());
  -	}
  +            boolean result = dir.mkdirs();
  +            if (result == false) {
  +                String msg = "Directory " + dir.getAbsolutePath() + " creation was not " +
  +                    "successful for an unknown reason";
  +                throw new BuildException(msg, location);
  +            }
  +            log("Created dir: " + dir.getAbsolutePath());
  +        }
       }
   
       public void setDir(File dir) {
  -	this.dir = dir;
  +        this.dir = dir;
       }
   }
  
  
  
  1.5       +15 -15    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
  
  Index: Kjc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Kjc.java	2001/11/06 10:47:33	1.4
  +++ Kjc.java	2001/11/27 18:04:52	1.5
  @@ -80,9 +80,9 @@
               Class c = Class.forName("at.dms.kjc.Main");
   
               // Call the compile() method
  -            Method compile = c.getMethod("compile", 
  +            Method compile = c.getMethod("compile",
                                            new Class [] { String [].class });
  -            Boolean ok = (Boolean)compile.invoke(null, 
  +            Boolean ok = (Boolean)compile.invoke(null,
                                                    new Object[] {cmd.getArguments()});
               return ok.booleanValue();
           }
  @@ -105,8 +105,8 @@
        */
       protected Commandline setupKjcCommand() {
           Commandline cmd = new Commandline();
  -	
  -	// generate classpath, because kjc does't support sourcepath.
  +
  +        // generate classpath, because kjc does't support sourcepath.
           Path classpath = getCompileClasspath();
   
           if (deprecation == true) {
  @@ -118,26 +118,26 @@
               cmd.createArgument().setFile(destDir);
           }
   
  -        // generate the clsspath 
  +        // generate the clsspath
           cmd.createArgument().setValue("-classpath");
   
  -	Path cp = new Path(project);
  +    Path cp = new Path(project);
   
  -	// kjc don't have bootclasspath option.
  -	if (bootclasspath != null) {
  +    // kjc don't have bootclasspath option.
  +    if (bootclasspath != null) {
               cp.append(bootclasspath);
  -	}
  +    }
   
  -	if (extdirs != null) {
  +    if (extdirs != null) {
               cp.addExtdirs(extdirs);
  -	}
  +    }
   
  -	cp.append(classpath);
  -	cp.append(src);
  +    cp.append(classpath);
  +    cp.append(src);
   
  -	cmd.createArgument().setPath(cp);
  +    cmd.createArgument().setPath(cp);
   
  -	// kjc-1.5A doesn't support -encoding option now.
  +    // kjc-1.5A doesn't support -encoding option now.
           // but it will be supported near the feature.
           if (encoding != null) {
               cmd.createArgument().setValue("-encoding");
  
  
  
  1.24      +52 -52    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  
  Index: EjbJar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- EjbJar.java	2001/10/28 21:30:20	1.23
  +++ EjbJar.java	2001/11/27 18:04:52	1.24
  @@ -89,7 +89,7 @@
    * </p>
    *
    * <p>Functionality is currently provided for standard EJB1.1 jars and Weblogic
  - * 5.1 jars. The weblogic deployment descriptors, used in constructing the 
  + * 5.1 jars. The weblogic deployment descriptors, used in constructing the
    * Weblogic jar, are located based on a simple naming convention. The name of the
    * standard deployment descriptor is taken upto the first instance of a String,
    * specified by the attribute baseNameTerminator, and then the regular Weblogic
  @@ -106,23 +106,23 @@
    * @author <a href="mailto:tfennell@sapient.com">Tim Fennell</a>
    */
   public class EjbJar extends MatchingTask {
  -    
  +
       public static class DTDLocation {
           private String publicId = null;
           private String location = null;
  -        
  +
           public void setPublicId(String publicId) {
               this.publicId = publicId;
           }
  -        
  +
           public void setLocation(String location) {
               this.location = location;
           }
  -        
  +
           public String getPublicId() {
               return publicId;
           }
  -        
  +
           public String getLocation() {
               return location;
           }
  @@ -138,7 +138,7 @@
   
           /** Stores a handle to the directory under which to search for deployment descriptors */
           public File descriptorDir;
  -        
  +
           /** Instance variable that marks the end of the 'basename' */
           public String baseNameTerminator = "-";
   
  @@ -150,28 +150,28 @@
            * of a flat directory as the destination for the jar files.
            */
           public boolean flatDestDir = false;
  -        
  +
           /**
            * The classpath to use when loading classes
            */
           public Path classpath;
  -    
  +
           /**
            * A Fileset of support classes
            */
           public List supportFileSets = new ArrayList();
  -        
  +
           /**
            * The list of configured DTD locations
            */
           public ArrayList dtdLocations = new ArrayList();
  -        
  +
           /**
            * The naming scheme used to determine the generated jar name
            * from the descriptor information
            */
           public NamingScheme namingScheme;
  -        
  +
           /**
            * The Manifest file
            */
  @@ -196,7 +196,7 @@
           deployment descriptor tools are provided. Normally each deployment tool
           will specify the desitination dir itself. */
       private File destDir;
  - 
  +
       /** Instance variable that stores the suffix for the generated jarfile. */
       private String genericJarSuffix = "-generic.jar";
   
  @@ -235,7 +235,7 @@
   
       /**
        * Create a nested element used to configure a deployment tool for iPlanet
  -	 * Application Server.
  +     * Application Server.
        *
        * @return the deployment tool instance to be configured.
        */
  @@ -279,7 +279,7 @@
        *
        * This classpath is used to locate the super classes and interfaces
        * of the classes that will make up the EJB jar.
  -     * 
  +     *
        * @return the path to be configured.
        */
       public Path createClasspath() {
  @@ -296,7 +296,7 @@
       public DTDLocation createDTD() {
           DTDLocation dtdLocation = new DTDLocation();
           config.dtdLocations.add(dtdLocation);
  -        
  +
           return dtdLocation;
       }
   
  @@ -310,7 +310,7 @@
           config.supportFileSets.add(supportFileSet);
           return supportFileSet;
       }
  -    
  +
   
        /**
         * Set the Manifest file to use when jarring.
  @@ -327,7 +327,7 @@
   
       /**
        * Set the srcdir attribute. The source directory is the directory that contains
  -     * the classes that will be added to the EJB jar. Typically this will include the 
  +     * the classes that will be added to the EJB jar. Typically this will include the
        * home and remote interfaces and the bean class.
        *
        * @param inDir the source directory.
  @@ -342,7 +342,7 @@
        * The descriptor directory contains the EJB deployment descriptors. These are XML
        * files that declare the properties of a bean in a particular deployment scenario. Such
        * properties include, for example, the transactional nature of the bean and the security
  -     * access control to the bean's methods.  
  +     * access control to the bean's methods.
        *
        * @param inDir the directory containing the deployment descriptors.
        */
  @@ -352,8 +352,8 @@
   
       /**
        * Set the base name of the EJB jar that is to be created if it is not to be
  -     * determined from the name of the deployment descriptor files. 
  -     * 
  +     * determined from the name of the deployment descriptor files.
  +     *
        * @param inValue the basename that will be used when writing the jar file containing
        * the EJB
        */
  @@ -364,9 +364,9 @@
               config.namingScheme.setValue(NamingScheme.BASEJARNAME);
           }
           else if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME)) {
  -            throw new BuildException("The basejarname attribute is not compatible with the " + 
  +            throw new BuildException("The basejarname attribute is not compatible with the " +
                                        config.namingScheme.getValue() + " naming scheme");
  -        }                                     
  +        }
       }
   
       /**
  @@ -379,22 +379,22 @@
           config.namingScheme = namingScheme;
           if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
               config.baseJarName != null) {
  -            throw new BuildException("The basejarname attribute is not compatible with the " + 
  +            throw new BuildException("The basejarname attribute is not compatible with the " +
                                        config.namingScheme.getValue() + " naming scheme");
  -        }                                     
  +        }
       }
  -    
  +
   
       /**
        * Set the destination directory.
  -     * 
  +     *
        * The EJB jar files will be written into this directory. The jar files that exist in
  -     * this directory are also used when determining if the contents of the jar file 
  +     * this directory are also used when determining if the contents of the jar file
        * have changed.
        *
        * Note that this parameter is only used if no deployment tools are specified. Typically
        * each deployment tool will specify its own destination directory.
  -     * 
  +     *
        * @param inFile the destination directory.
        */
       public void setDestdir(File inDir) {
  @@ -402,7 +402,7 @@
       }
   
       /**
  -     * Set the classpath to use when resolving classes for inclusion in the jar. 
  +     * Set the classpath to use when resolving classes for inclusion in the jar.
        *
        * @param classpath the classpath to use.
        */
  @@ -413,26 +413,26 @@
       /**
        * Set the flat dest dir flag.
        *
  -     * This flag controls whether the destination jars are written out in the 
  -     * destination directory with the same hierarchal structure from which 
  -     * the deployment descriptors have been read. If this is set to true the 
  +     * This flag controls whether the destination jars are written out in the
  +     * destination directory with the same hierarchal structure from which
  +     * the deployment descriptors have been read. If this is set to true the
        * generated EJB jars are written into the root of the destination directory,
        * otherwise they are written out in the same relative position as the deployment
        * descriptors in the descriptor directory.
  -     * 
  +     *
        * @param inValue the new value of the flatdestdir flag.
        */
       public void setFlatdestdir(boolean inValue) {
           config.flatDestDir = inValue;
       }
  -     
  +
       /**
        * Set the suffix for the generated jar file.
        * When generic jars are generated, they have a suffix which is appended to the
        * the bean name to create the name of the jar file. Note that this suffix includes
  -     * the extension fo te jar file and should therefore end with an appropriate 
  +     * the extension fo te jar file and should therefore end with an appropriate
        * extension such as .jar or .ear
  -     * 
  +     *
        * @param inString the string to use as the suffix.
        */
       public void setGenericjarsuffix(String inString) {
  @@ -443,7 +443,7 @@
        * Set the baseNameTerminator.
        *
        * The basename terminator is the string which terminates the bean name. The convention
  -     * used by this task is that bean descriptors are named as the BeanName with some suffix. 
  +     * used by this task is that bean descriptors are named as the BeanName with some suffix.
        * The baseNameTerminator string separates the bean name and the suffix and is used to
        * determine the bean name.
        *
  @@ -468,19 +468,19 @@
           }
           else if (config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
                    config.baseJarName == null) {
  -            throw new BuildException("The basejarname attribute must be specified " + 
  +            throw new BuildException("The basejarname attribute must be specified " +
                                        "with the basejarname naming scheme");
           }
  -    }        
  +    }
   
       /**
        * Invoked by Ant after the task is prepared, when it is ready to execute
  -     * this task.  
  +     * this task.
        *
  -     * This will configure all of the nested deployment tools to allow them to 
  -     * process the jar. If no deployment tools have been configured a generic 
  +     * This will configure all of the nested deployment tools to allow them to
  +     * process the jar. If no deployment tools have been configured a generic
        * tool is created to handle the jar.
  -     * 
  +     *
        * A parser is configured and then each descriptor found is passed to all
        * the deployment tool elements for processing.
        *
  @@ -490,7 +490,7 @@
        */
       public void execute() throws BuildException {
           validateConfig();
  -        
  +
           if (deploymentTools.size() == 0) {
               GenericDeploymentTool genericTool = new GenericDeploymentTool();
               genericTool.setTask(this);
  @@ -498,27 +498,27 @@
               genericTool.setGenericJarSuffix(genericJarSuffix);
               deploymentTools.add(genericTool);
           }
  -        
  +
           for (Iterator i = deploymentTools.iterator(); i.hasNext(); ) {
               EJBDeploymentTool tool = (EJBDeploymentTool)i.next();
               tool.configure(config);
               tool.validateConfigured();
           }
  -        
  +
           try {
               // Create the parser using whatever parser the system dictates
               SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
               saxParserFactory.setValidating(true);
               SAXParser saxParser = saxParserFactory.newSAXParser();
  -    
  -                        
  +
  +
               DirectoryScanner ds = getDirectoryScanner(config.descriptorDir);
               ds.scan();
               String[] files = ds.getIncludedFiles();
  -    
  +
               log(files.length + " deployment descriptors located.",
                   Project.MSG_VERBOSE);
  -            
  +
               // Loop through the files. Each file represents one deployment
               // descriptor, and hence one bean in our model.
               for (int index = 0; index < files.length; ++index) {
  @@ -527,7 +527,7 @@
                       EJBDeploymentTool tool = (EJBDeploymentTool)i.next();
                       tool.processDescriptor(files[index], saxParser);
                   }
  -            }    
  +            }
           }
           catch (SAXException se) {
               String msg = "SAXException while creating parser."
  
  
  
  1.3       +1172 -1173jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
  
  Index: IPlanetEjbc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IPlanetEjbc.java	2001/10/28 21:30:20	1.2
  +++ IPlanetEjbc.java	2001/11/27 18:04:52	1.3
  @@ -80,23 +80,23 @@
   import org.xml.sax.AttributeList;
   
   /**
  - * Utility class to compile EJB stubs and skeletons for the iPlanet Application 
  + * Utility class to compile EJB stubs and skeletons for the iPlanet Application
    * Server (iAS).  The class will read a standard EJB descriptor (as well as an
  - * EJB descriptor specific to iPlanet Application Server) to identify one or 
  - * more EJBs to process.  It will search for EJB "source" classes (the remote 
  + * EJB descriptor specific to iPlanet Application Server) to identify one or
  + * more EJBs to process.  It will search for EJB "source" classes (the remote
    * interface, home interface, and EJB implementation class) and the EJB stubs
  - * and skeletons in the specified destination directory.  Only if the stubs and 
  + * and skeletons in the specified destination directory.  Only if the stubs and
    * skeletons cannot be found or if they're out of date will the iPlanet
    * Application Server ejbc utility be run.
    * <p>
    * Because this class (and it's assorted inner classes) may be bundled into the
  - * iPlanet Application Server distribution at some point (and removed from the 
  - * Ant distribution), the class has been written to be independent of all 
  - * Ant-specific classes.  It is also for this reason (and to avoid cluttering 
  - * the Apache Ant source files) that this utility has been packaged into a 
  + * iPlanet Application Server distribution at some point (and removed from the
  + * Ant distribution), the class has been written to be independent of all
  + * Ant-specific classes.  It is also for this reason (and to avoid cluttering
  + * the Apache Ant source files) that this utility has been packaged into a
    * single source file.
    * <p>
  - * For more information on Ant Tasks for iPlanet Application Server, see the 
  + * For more information on Ant Tasks for iPlanet Application Server, see the
    * <code>IPlanetDeploymentTool</code> and <code>IPlanetEjbcTask</code> classes.
    *
    * @see    IPlanetDeploymentTool
  @@ -105,692 +105,692 @@
    */
   public class IPlanetEjbc {
   
  -	/* Constants used for the "beantype" attribute */
  -	private final static String ENTITY_BEAN       = "entity";
  -	private final static String STATELESS_SESSION = "stateless";
  -	private final static String STATEFUL_SESSION  = "stateful";
  -
  -	/* Filenames of the standard EJB descriptor and the iAS-specific descriptor */
  -	private File        stdDescriptor;
  -	private File        iasDescriptor;
  -
  -	/* 
  -	 * Directory where "source" EJB files are stored and where stubs and
  -	 * skeletons will also be written.
  -	 */
  -	private File        destDirectory;
  -
  -	/* Classpath used when the iAS ejbc is called */
  -	private String      classpath;
  -	private String[]    classpathElements;
  -
  -	/* Options passed to the iAS ejbc */
  -	private boolean     retainSource = false;
  -	private boolean     debugOutput  = false;
  -
  -	/* iAS installation directory (used if ejbc isn't on user's PATH) */
  -	private File        iasHomeDir;
  -
  -	/* Parser and handler used to process both EJB descriptor files */
  -	private SAXParser   parser;
  -	private EjbcHandler handler = new EjbcHandler();
  -
  -	/*
  -	 * This Hashtable maintains a list of EJB class files processed by the ejbc
  -	 * utility (both "source" class files as well as stubs and skeletons). The
  -	 * key for the Hashtable is a String representing the path to the class file
  -	 * (relative to the destination directory).  The value for the Hashtable is
  -	 * a File object which reference the actual class file.
  -	 */
  -	private Hashtable   ejbFiles     = new Hashtable();
  -
  -	/* Value of the display-name element read from the standard EJB descriptor */
  -	private String      displayName;
  -
  -	/**
  -	 * Constructs an instance which may be used to process EJB descriptors and
  -	 * generate EJB stubs and skeletons, if needed.
  -	 *
  -	 * @param stdDescriptor File referencing a standard EJB descriptor.
  -	 * @param iasDescriptor File referencing an iAS-specific EJB descriptor.
  -	 * @param destDirectory File referencing the base directory where both
  -	 *                      EJB "source" files are found and where stubs and
  -	 *                      skeletons will be written.
  -	 * @param classpath     String representation of the classpath to be used
  -	 *                      by the iAS ejbc utility.
  -	 * @param parser        SAXParser to be used to process both of the EJB
  -	 *                      descriptors.
  -	 */
  -	public IPlanetEjbc(File stdDescriptor,
  -					   File iasDescriptor,
  -					   File destDirectory,
  -					   String classpath,
  -					   SAXParser parser) {
  -		this.stdDescriptor = stdDescriptor;
  -		this.iasDescriptor      = iasDescriptor;
  -		this.destDirectory      = destDirectory;
  -		this.classpath          = classpath;
  -		this.parser             = parser;
  -
  -		/*
  -		 * Parse the classpath into it's individual elements and store the
  -		 * results in the "classpathElements" instance variable.
  -		 */
  -		List elements = new ArrayList();
  -		if (classpath != null) {
  -			StringTokenizer st = new StringTokenizer(classpath, 
  -														File.pathSeparator);
  -			while (st.hasMoreTokens()) {
  -				elements.add(st.nextToken());
  -			}
  -			classpathElements 
  -					= (String[])elements.toArray(new String[elements.size()]);
  -		}
  -	}
  -
  -    /**
  -     * Sets whether or not the Java source files which are generated by the 
  -	 * ejbc process should be retained or automatically deleted.
  -	 *
  -	 * @param retainsource A boolean indicating if the Java source files for
  -	 *                     the stubs and skeletons should be retained.
  -     */
  -	public void setRetainSource(boolean retainSource) {
  -		this.retainSource = retainSource;
  -	}
  +    /* Constants used for the "beantype" attribute */
  +    private final static String ENTITY_BEAN       = "entity";
  +    private final static String STATELESS_SESSION = "stateless";
  +    private final static String STATEFUL_SESSION  = "stateful";
  +
  +    /* Filenames of the standard EJB descriptor and the iAS-specific descriptor */
  +    private File        stdDescriptor;
  +    private File        iasDescriptor;
  +
  +    /*
  +     * Directory where "source" EJB files are stored and where stubs and
  +     * skeletons will also be written.
  +     */
  +    private File        destDirectory;
  +
  +    /* Classpath used when the iAS ejbc is called */
  +    private String      classpath;
  +    private String[]    classpathElements;
  +
  +    /* Options passed to the iAS ejbc */
  +    private boolean     retainSource = false;
  +    private boolean     debugOutput  = false;
  +
  +    /* iAS installation directory (used if ejbc isn't on user's PATH) */
  +    private File        iasHomeDir;
  +
  +    /* Parser and handler used to process both EJB descriptor files */
  +    private SAXParser   parser;
  +    private EjbcHandler handler = new EjbcHandler();
  +
  +    /*
  +     * This Hashtable maintains a list of EJB class files processed by the ejbc
  +     * utility (both "source" class files as well as stubs and skeletons). The
  +     * key for the Hashtable is a String representing the path to the class file
  +     * (relative to the destination directory).  The value for the Hashtable is
  +     * a File object which reference the actual class file.
  +     */
  +    private Hashtable   ejbFiles     = new Hashtable();
  +
  +    /* Value of the display-name element read from the standard EJB descriptor */
  +    private String      displayName;
  +
  +    /**
  +     * Constructs an instance which may be used to process EJB descriptors and
  +     * generate EJB stubs and skeletons, if needed.
  +     *
  +     * @param stdDescriptor File referencing a standard EJB descriptor.
  +     * @param iasDescriptor File referencing an iAS-specific EJB descriptor.
  +     * @param destDirectory File referencing the base directory where both
  +     *                      EJB "source" files are found and where stubs and
  +     *                      skeletons will be written.
  +     * @param classpath     String representation of the classpath to be used
  +     *                      by the iAS ejbc utility.
  +     * @param parser        SAXParser to be used to process both of the EJB
  +     *                      descriptors.
  +     */
  +    public IPlanetEjbc(File stdDescriptor,
  +                       File iasDescriptor,
  +                       File destDirectory,
  +                       String classpath,
  +                       SAXParser parser) {
  +        this.stdDescriptor = stdDescriptor;
  +        this.iasDescriptor      = iasDescriptor;
  +        this.destDirectory      = destDirectory;
  +        this.classpath          = classpath;
  +        this.parser             = parser;
  +
  +        /*
  +         * Parse the classpath into it's individual elements and store the
  +         * results in the "classpathElements" instance variable.
  +         */
  +        List elements = new ArrayList();
  +        if (classpath != null) {
  +            StringTokenizer st = new StringTokenizer(classpath,
  +                                                        File.pathSeparator);
  +            while (st.hasMoreTokens()) {
  +                elements.add(st.nextToken());
  +            }
  +            classpathElements
  +                    = (String[])elements.toArray(new String[elements.size()]);
  +        }
  +    }
  +
  +    /**
  +     * Sets whether or not the Java source files which are generated by the
  +     * ejbc process should be retained or automatically deleted.
  +     *
  +     * @param retainsource A boolean indicating if the Java source files for
  +     *                     the stubs and skeletons should be retained.
  +     */
  +    public void setRetainSource(boolean retainSource) {
  +        this.retainSource = retainSource;
  +    }
   
       /**
        * Sets whether or not debugging output will be generated when ejbc is
  -	 * executed.
  -	 *
  -	 * @param debugOutput A boolean indicating if debugging output should be 
  -	 *                    generated
  -     */
  -	public void setDebugOutput(boolean debugOutput) {
  -		this.debugOutput = debugOutput;
  -	}
  +     * executed.
  +     *
  +     * @param debugOutput A boolean indicating if debugging output should be
  +     *                    generated
  +     */
  +    public void setDebugOutput(boolean debugOutput) {
  +        this.debugOutput = debugOutput;
  +    }
   
       /**
        * Registers the location of a local DTD file or resource.  By registering
  -	 * a local DTD, EJB descriptors can be parsed even when the remote servers
  -	 * which contain the "public" DTDs cannot be accessed.
  +     * a local DTD, EJB descriptors can be parsed even when the remote servers
  +     * which contain the "public" DTDs cannot be accessed.
        *
        * @param publicID The public DTD identifier found in an XML document.
  -	 * @param location The file or resource name for the appropriate DTD stored
  -	 *                 on the local machine.
  +     * @param location The file or resource name for the appropriate DTD stored
  +     *                 on the local machine.
        */
  -	public void registerDTD(String publicID, String location) {
  -		handler.registerDTD(publicID, location);
  -	}
  +    public void registerDTD(String publicID, String location) {
  +        handler.registerDTD(publicID, location);
  +    }
   
       /**
        * Setter method used to store the "home" directory of the user's iAS
  -	 * installation.  The directory specified should typically be
  -	 * <code>[install-location]/iplanet/ias6/ias</code>.
  -	 *
  +     * installation.  The directory specified should typically be
  +     * <code>[install-location]/iplanet/ias6/ias</code>.
  +     *
        * @param iashome The home directory for the user's iAS installation.
  +     */
  +    public void setIasHomeDir(File iasHomeDir) {
  +        this.iasHomeDir = iasHomeDir;
  +    }
  +
  +    /**
  +     * Returns a Hashtable which contains a list of EJB class files processed by
  +     * the ejbc utility (both "source" class files as well as stubs and
  +     * skeletons). The key for the Hashtable is a String representing the path
  +     * to the class file (relative to the destination directory).  The value for
  +     * the Hashtable is a File object which reference the actual class file.
  +     *
  +     * @return The list of EJB files processed by the ejbc utility.
        */
  -	public void setIasHomeDir(File iasHomeDir) {
  -		this.iasHomeDir = iasHomeDir;
  -	}
  -
  -	/**
  -	 * Returns a Hashtable which contains a list of EJB class files processed by
  -	 * the ejbc utility (both "source" class files as well as stubs and 
  -	 * skeletons). The key for the Hashtable is a String representing the path 
  -	 * to the class file (relative to the destination directory).  The value for
  -	 * the Hashtable is a File object which reference the actual class file.
  -	 *
  -	 * @return The list of EJB files processed by the ejbc utility.
  -	 */
  -	public Hashtable getEjbFiles() {
  -		return ejbFiles;
  -	}
  -
  -	/**
  -	 * Returns the display-name element read from the standard EJB descriptor.
  -	 *
  -	 * @return The EJB-JAR display name.
  -	 */
  -	public String getDisplayName() {
  -		return displayName;
  -	}
  -
  -	/**
  -	 * Returns the list of CMP descriptors referenced in the EJB descriptors.
  -	 *
  -	 * @return An array of CMP descriptors.
  -	 */
  -	public String[] getCmpDescriptors() {
  -		List returnList = new ArrayList();
  -
  -		EjbInfo[] ejbs = handler.getEjbs();
  -
  -		for (int i = 0; i < ejbs.length ; i++) {
  -			List descriptors = (List) ejbs[i].getCmpDescriptors();
  -			returnList.addAll(descriptors);
  -		}
  -
  -		return (String[]) returnList.toArray(new String[returnList.size()]);
  -	}
  -
  -	/**
  -	 * Main application method for the iPlanet Application Server ejbc utility.
  -	 * If the application is run with no commandline arguments, a usage
  -	 * statement is printed for the user.
  -	 *
  -	 * @param args The commandline arguments passed to the application.
  -	 */
  -	public static void main(String[] args) {
  -		File        stdDescriptor;
  -		File        iasDescriptor;
  -		File        destDirectory = null;
  -		String      classpath     = null;
  -		SAXParser   parser		  = null;
  -		boolean     debug         = false;
  -		boolean     retainSource  = false;
  -		IPlanetEjbc ejbc;
  -		
  -		if ((args.length < 2) || (args.length > 8)) {
  -			usage();
  -			return;
  -		}
  -
  -		stdDescriptor = new File(args[args.length - 2]);
  -		iasDescriptor = new File(args[args.length - 1]);
  -
  -		for (int i = 0; i < args.length - 2; i++) {
  -			if (args[i].equals("-classpath")) {
  -				classpath = args[++i];
  -			} else if (args[i].equals("-d")) {
  -				destDirectory = new File(args[++i]);
  -			} else if (args[i].equals("-debug")) {
  -				debug = true;
  -			} else if (args[i].equals("-keepsource")) {
  -				retainSource = true;
  -			} else {
  -				usage();
  -				return;
  -			}
  -		}
  -
  -		/* If the -classpath flag isn't specified, use the system classpath */
  -		if (classpath == null) {
  -			Properties props = System.getProperties();
  -			classpath = props.getProperty("java.class.path");
  -		}
  -
  -		/* 
  -		 * If the -d flag isn't specified, use the working directory as the 
  -		 * destination directory
  -		 */
  -		if (destDirectory == null) {
  -			Properties props = System.getProperties();
  -			destDirectory = new File(props.getProperty("user.dir"));
  -		}
  -
  -		/* Construct a SAXParser used to process the descriptors */
  -		SAXParserFactory parserFactory = SAXParserFactory.newInstance();
  -		parserFactory.setValidating(true);
  -		try {
  -			parser = parserFactory.newSAXParser();
  -		} catch (Exception e) {
  -			// SAXException or ParserConfigurationException may be thrown
  -			System.out.println("An exception was generated while trying to ");
  -			System.out.println("create a new SAXParser.");
  -			e.printStackTrace();
  -			return;
  -		}
  -
  -		/* Build and populate an instance of the ejbc utility */
  -		ejbc = new IPlanetEjbc(stdDescriptor, iasDescriptor, destDirectory,
  -								classpath, parser);
  -		ejbc.setDebugOutput(debug);
  -		ejbc.setRetainSource(retainSource);
  -
  -		/* Execute the ejbc utility -- stubs/skeletons are rebuilt, if needed */
  -		try {
  -			ejbc.execute();
  -		} catch (IOException e) {
  -			System.out.println("An IOException has occurred while reading the "
  -					+ "XML descriptors (" + e.getMessage() + ").");
  -			return;
  -		} catch (SAXException e) {
  -			System.out.println("A SAXException has occurred while reading the "
  -					+ "XML descriptors (" + e.getMessage() + ").");
  -			return;
  -		} catch (IPlanetEjbc.EjbcException e) {
  -			System.out.println("An error has occurred while executing the ejbc "
  -					+ "utility (" + e.getMessage() + ").");
  -			return;
  -		}
  -	}
  -
  -	/**
  -	 * Print a usage statement.
  -	 */
  -	private static void usage() {
  -		System.out.println("java org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc \\");
  -		System.out.println("  [OPTIONS] [EJB 1.1 descriptor] [iAS EJB descriptor]");
  -		System.out.println("");
  -		System.out.println("Where OPTIONS are:");
  -		System.out.println("  -debug -- for additional debugging output");
  -		System.out.println("  -keepsource -- to retain Java source files generated");
  -		System.out.println("  -classpath [classpath] -- classpath used for compilation");
  -		System.out.println("  -d [destination directory] -- directory for compiled classes");
  -		System.out.println("");
  -		System.out.println("If a classpath is not specified, the system classpath");
  -		System.out.println("will be used.  If a destination directory is not specified,");
  -		System.out.println("the current working directory will be used (classes will");
  -		System.out.println("still be placed in subfolders which correspond to their");
  -		System.out.println("package name).");
  -		System.out.println("");
  -		System.out.println("The EJB home interface, remote interface, and implementation");
  -		System.out.println("class must be found in the destination directory.  In");
  -		System.out.println("addition, the destination will look for the stubs and skeletons");
  -		System.out.println("in the destination directory to ensure they are up to date.");
  -	}
  -
  -	/**
  -     * Compiles the stub and skeletons for the specified EJBs, if they need to 
  -	 * be updated.
  -	 *
  -	 * @throws EjbcException If the ejbc utility cannot be correctly configured
  -	 *                       or if one or more of the EJB "source" classes
  -	 *                       cannot be found in the destination directory
  +    public Hashtable getEjbFiles() {
  +        return ejbFiles;
  +    }
  +
  +    /**
  +     * Returns the display-name element read from the standard EJB descriptor.
  +     *
  +     * @return The EJB-JAR display name.
  +     */
  +    public String getDisplayName() {
  +        return displayName;
  +    }
  +
  +    /**
  +     * Returns the list of CMP descriptors referenced in the EJB descriptors.
  +     *
  +     * @return An array of CMP descriptors.
  +     */
  +    public String[] getCmpDescriptors() {
  +        List returnList = new ArrayList();
  +
  +        EjbInfo[] ejbs = handler.getEjbs();
  +
  +        for (int i = 0; i < ejbs.length ; i++) {
  +            List descriptors = (List) ejbs[i].getCmpDescriptors();
  +            returnList.addAll(descriptors);
  +        }
  +
  +        return (String[]) returnList.toArray(new String[returnList.size()]);
  +    }
  +
  +    /**
  +     * Main application method for the iPlanet Application Server ejbc utility.
  +     * If the application is run with no commandline arguments, a usage
  +     * statement is printed for the user.
  +     *
  +     * @param args The commandline arguments passed to the application.
  +     */
  +    public static void main(String[] args) {
  +        File        stdDescriptor;
  +        File        iasDescriptor;
  +        File        destDirectory = null;
  +        String      classpath     = null;
  +        SAXParser   parser        = null;
  +        boolean     debug         = false;
  +        boolean     retainSource  = false;
  +        IPlanetEjbc ejbc;
  +
  +        if ((args.length < 2) || (args.length > 8)) {
  +            usage();
  +            return;
  +        }
  +
  +        stdDescriptor = new File(args[args.length - 2]);
  +        iasDescriptor = new File(args[args.length - 1]);
  +
  +        for (int i = 0; i < args.length - 2; i++) {
  +            if (args[i].equals("-classpath")) {
  +                classpath = args[++i];
  +            } else if (args[i].equals("-d")) {
  +                destDirectory = new File(args[++i]);
  +            } else if (args[i].equals("-debug")) {
  +                debug = true;
  +            } else if (args[i].equals("-keepsource")) {
  +                retainSource = true;
  +            } else {
  +                usage();
  +                return;
  +            }
  +        }
  +
  +        /* If the -classpath flag isn't specified, use the system classpath */
  +        if (classpath == null) {
  +            Properties props = System.getProperties();
  +            classpath = props.getProperty("java.class.path");
  +        }
  +
  +        /*
  +         * If the -d flag isn't specified, use the working directory as the
  +         * destination directory
  +         */
  +        if (destDirectory == null) {
  +            Properties props = System.getProperties();
  +            destDirectory = new File(props.getProperty("user.dir"));
  +        }
  +
  +        /* Construct a SAXParser used to process the descriptors */
  +        SAXParserFactory parserFactory = SAXParserFactory.newInstance();
  +        parserFactory.setValidating(true);
  +        try {
  +            parser = parserFactory.newSAXParser();
  +        } catch (Exception e) {
  +            // SAXException or ParserConfigurationException may be thrown
  +            System.out.println("An exception was generated while trying to ");
  +            System.out.println("create a new SAXParser.");
  +            e.printStackTrace();
  +            return;
  +        }
  +
  +        /* Build and populate an instance of the ejbc utility */
  +        ejbc = new IPlanetEjbc(stdDescriptor, iasDescriptor, destDirectory,
  +                                classpath, parser);
  +        ejbc.setDebugOutput(debug);
  +        ejbc.setRetainSource(retainSource);
  +
  +        /* Execute the ejbc utility -- stubs/skeletons are rebuilt, if needed */
  +        try {
  +            ejbc.execute();
  +        } catch (IOException e) {
  +            System.out.println("An IOException has occurred while reading the "
  +                    + "XML descriptors (" + e.getMessage() + ").");
  +            return;
  +        } catch (SAXException e) {
  +            System.out.println("A SAXException has occurred while reading the "
  +                    + "XML descriptors (" + e.getMessage() + ").");
  +            return;
  +        } catch (IPlanetEjbc.EjbcException e) {
  +            System.out.println("An error has occurred while executing the ejbc "
  +                    + "utility (" + e.getMessage() + ").");
  +            return;
  +        }
  +    }
  +
  +    /**
  +     * Print a usage statement.
  +     */
  +    private static void usage() {
  +        System.out.println("java org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc \\");
  +        System.out.println("  [OPTIONS] [EJB 1.1 descriptor] [iAS EJB descriptor]");
  +        System.out.println("");
  +        System.out.println("Where OPTIONS are:");
  +        System.out.println("  -debug -- for additional debugging output");
  +        System.out.println("  -keepsource -- to retain Java source files generated");
  +        System.out.println("  -classpath [classpath] -- classpath used for compilation");
  +        System.out.println("  -d [destination directory] -- directory for compiled classes");
  +        System.out.println("");
  +        System.out.println("If a classpath is not specified, the system classpath");
  +        System.out.println("will be used.  If a destination directory is not specified,");
  +        System.out.println("the current working directory will be used (classes will");
  +        System.out.println("still be placed in subfolders which correspond to their");
  +        System.out.println("package name).");
  +        System.out.println("");
  +        System.out.println("The EJB home interface, remote interface, and implementation");
  +        System.out.println("class must be found in the destination directory.  In");
  +        System.out.println("addition, the destination will look for the stubs and skeletons");
  +        System.out.println("in the destination directory to ensure they are up to date.");
  +    }
  +
  +    /**
  +     * Compiles the stub and skeletons for the specified EJBs, if they need to
  +     * be updated.
  +     *
  +     * @throws EjbcException If the ejbc utility cannot be correctly configured
  +     *                       or if one or more of the EJB "source" classes
  +     *                       cannot be found in the destination directory
        * @throws IOException   If the parser encounters a problem reading the XML
  -	 *                       file 
  -	 * @throws SAXException  If the parser encounters a problem processing the
  -	 *                       XML descriptor (it may wrap another exception)
  +     *                       file
  +     * @throws SAXException  If the parser encounters a problem processing the
  +     *                       XML descriptor (it may wrap another exception)
        */
  -	public void execute() throws EjbcException, IOException, SAXException {
  +    public void execute() throws EjbcException, IOException, SAXException {
  +
  +        checkConfiguration();   // Throws EjbcException if unsuccessful
   
  -		checkConfiguration();	// Throws EjbcException if unsuccessful
  +        EjbInfo[] ejbs = getEjbs(); // Returns list of EJBs for processing
   
  -		EjbInfo[] ejbs = getEjbs();	// Returns list of EJBs for processing
  +        for (int i = 0; i < ejbs.length ; i++) {
  +            log("EJBInfo...");
  +            log(ejbs[i].toString());
  +        }
   
  -		for (int i = 0; i < ejbs.length ; i++) {
  -			log("EJBInfo...");
  -			log(ejbs[i].toString());
  -		}
  -		
  -		for (int i=0; i < ejbs.length; i++) {
  -			EjbInfo ejb = ejbs[i];
  +        for (int i=0; i < ejbs.length; i++) {
  +            EjbInfo ejb = ejbs[i];
   
  -			ejb.checkConfiguration(destDirectory);  // Throws EjbcException
  +            ejb.checkConfiguration(destDirectory);  // Throws EjbcException
   
  -			if (ejb.mustBeRecompiled(destDirectory)) {
  -				log(ejb.getName() + " must be recompiled using ejbc.");
  +            if (ejb.mustBeRecompiled(destDirectory)) {
  +                log(ejb.getName() + " must be recompiled using ejbc.");
   
  -				String[] arguments = buildArgumentList(ejb);
  -				callEjbc(arguments);
  +                String[] arguments = buildArgumentList(ejb);
  +                callEjbc(arguments);
   
  -			} else {
  -				log(ejb.getName() + " is up to date.");
  -			}
  -		}
  -	}
  +            } else {
  +                log(ejb.getName() + " is up to date.");
  +            }
  +        }
  +    }
   
  -	/**
  +    /**
        * Executes the iPlanet Application Server ejbc command-line utility.
  -	 *
  -	 * @param arguments Command line arguments to be passed to the ejbc utility.
  +     *
  +     * @param arguments Command line arguments to be passed to the ejbc utility.
        */
  -	private void callEjbc(String[] arguments) {
  -		
  -		/* Concatenate all of the command line arguments into a single String */
  -		StringBuffer args = new StringBuffer();
  -		for (int i = 0; i < arguments.length; i++) {
  -			args.append(arguments[i]).append(" ");
  -		}
  -
  -		/* If an iAS home directory is specified, prepend it to the commmand */
  -		String command;
  -		if (iasHomeDir == null) {
  -			command = "";
  -		} else {
  -			command = iasHomeDir.toString() + File.separator + "bin" 
  -														+ File.separator;
  -		}
  -		command += "ejbc ";
  -		
  -		log(command + args);
  -
  -		/* 
  -		 * Use the Runtime object to execute an external command.  Use the
  -		 * RedirectOutput inner class to direct the standard and error output
  -		 * from the command to the JRE's standard output
  -		 */
  -		try {
  -			Process p = Runtime.getRuntime().exec(command + args);
  -			RedirectOutput output = new RedirectOutput(p.getInputStream());
  -			RedirectOutput error  = new RedirectOutput(p.getErrorStream());
  -			output.start();
  -			error.start();
  -			p.waitFor();  
  -			p.destroy();
  -		} catch (IOException e) {
  -			log("An IOException has occurred while trying to execute ejbc.");
  -			e.printStackTrace();
  -		} catch (InterruptedException e) {
  -			// Do nothing
  -		}
  -	}
  +    private void callEjbc(String[] arguments) {
  +
  +        /* Concatenate all of the command line arguments into a single String */
  +        StringBuffer args = new StringBuffer();
  +        for (int i = 0; i < arguments.length; i++) {
  +            args.append(arguments[i]).append(" ");
  +        }
  +
  +        /* If an iAS home directory is specified, prepend it to the commmand */
  +        String command;
  +        if (iasHomeDir == null) {
  +            command = "";
  +        } else {
  +            command = iasHomeDir.toString() + File.separator + "bin"
  +                                                        + File.separator;
  +        }
  +        command += "ejbc ";
  +
  +        log(command + args);
  +
  +        /*
  +         * Use the Runtime object to execute an external command.  Use the
  +         * RedirectOutput inner class to direct the standard and error output
  +         * from the command to the JRE's standard output
  +         */
  +        try {
  +            Process p = Runtime.getRuntime().exec(command + args);
  +            RedirectOutput output = new RedirectOutput(p.getInputStream());
  +            RedirectOutput error  = new RedirectOutput(p.getErrorStream());
  +            output.start();
  +            error.start();
  +            p.waitFor();
  +            p.destroy();
  +        } catch (IOException e) {
  +            log("An IOException has occurred while trying to execute ejbc.");
  +            e.printStackTrace();
  +        } catch (InterruptedException e) {
  +            // Do nothing
  +        }
  +    }
   
       /**
        * Verifies that the user selections are valid.
  -	 *
  -	 * @throws EjbcException If the user selections are invalid.
  +     *
  +     * @throws EjbcException If the user selections are invalid.
        */
  -	protected void checkConfiguration() throws EjbcException {		
  +    protected void checkConfiguration() throws EjbcException {
  +
  +        String msg = "";
   
  -		String msg = "";
  +        if (stdDescriptor == null) {
  +            msg += "A standard XML descriptor file must be specified.  ";
  +        }
  +        if (iasDescriptor == null) {
  +            msg += "An iAS-specific XML descriptor file must be specified.  ";
  +        }
  +        if (classpath == null) {
  +            msg += "A classpath must be specified.    ";
  +        }
  +        if (parser == null) {
  +            msg += "An XML parser must be specified.    ";
  +        }
  +
  +        if (destDirectory == null) {
  +            msg += "A destination directory must be specified.  ";
  +        } else if (!destDirectory.exists()) {
  +            msg += "The destination directory specified does not exist.  ";
  +        } else if (!destDirectory.isDirectory()) {
  +            msg += "The destination specified is not a directory.  ";
  +        }
   
  -		if (stdDescriptor == null) {
  -			msg += "A standard XML descriptor file must be specified.  ";
  -		}
  -		if (iasDescriptor == null) {
  -			msg += "An iAS-specific XML descriptor file must be specified.  ";
  -		}
  -		if (classpath == null) {
  -			msg += "A classpath must be specified.    ";
  -		}
  -		if (parser == null) {
  -			msg += "An XML parser must be specified.    ";
  -		}
  -
  -		if (destDirectory == null) {
  -			msg += "A destination directory must be specified.  ";
  -		} else if (!destDirectory.exists()) {
  -			msg += "The destination directory specified does not exist.  ";
  -		} else if (!destDirectory.isDirectory()) {
  -			msg += "The destination specified is not a directory.  ";
  -		}
  -
  -		if (msg.length() > 0) {
  -			throw new EjbcException(msg);
  -		}
  -	}
  +        if (msg.length() > 0) {
  +            throw new EjbcException(msg);
  +        }
  +    }
   
       /**
        * Parses the EJB descriptors and returns a list of EJBs which may need to
  -	 * be compiled.
  -	 * 
  -	 * @return               An array of objects which describe the EJBs to be 
  -	 *                       processed.
  +     * be compiled.
  +     *
  +     * @return               An array of objects which describe the EJBs to be
  +     *                       processed.
        * @throws IOException   If the parser encounters a problem reading the XML
  -	 *                       files
  -	 * @throws SAXException  If the parser encounters a problem processing the
  -	 *                       XML descriptor (it may wrap another exception)
  -	 */
  -	private EjbInfo[] getEjbs() throws IOException, SAXException {
  -		EjbInfo[] ejbs = null;
  -
  -		/*
  -		 * The EJB information is gathered from the standard XML EJB descriptor
  -		 * and the iAS-specific XML EJB descriptor using a SAX parser.
  -		 */
  -
  -		parser.parse(stdDescriptor, handler);
  -		parser.parse(iasDescriptor, handler);
  -		ejbs = handler.getEjbs();
  +     *                       files
  +     * @throws SAXException  If the parser encounters a problem processing the
  +     *                       XML descriptor (it may wrap another exception)
  +     */
  +    private EjbInfo[] getEjbs() throws IOException, SAXException {
  +        EjbInfo[] ejbs = null;
   
  -		return ejbs;
  -	}
  +        /*
  +         * The EJB information is gathered from the standard XML EJB descriptor
  +         * and the iAS-specific XML EJB descriptor using a SAX parser.
  +         */
  +
  +        parser.parse(stdDescriptor, handler);
  +        parser.parse(iasDescriptor, handler);
  +        ejbs = handler.getEjbs();
   
  +        return ejbs;
  +    }
  +
       /**
        * Based on this object's instance variables as well as the EJB to be
  -	 * processed, the correct flags and parameters are set for the ejbc 
  -	 * command-line utility.
  -	 * @param ejb The EJB for which stubs and skeletons will be compiled.
  -	 * @return    An array of Strings which are the command-line parameters for
  -	 *            for the ejbc utility.
  -	 */
  +     * processed, the correct flags and parameters are set for the ejbc
  +     * command-line utility.
  +     * @param ejb The EJB for which stubs and skeletons will be compiled.
  +     * @return    An array of Strings which are the command-line parameters for
  +     *            for the ejbc utility.
  +     */
       private String[] buildArgumentList(EjbInfo ejb) {
   
  -		List arguments = new ArrayList();
  +        List arguments = new ArrayList();
   
  -		/* OPTIONAL COMMAND LINE PARAMETERS */
  +        /* OPTIONAL COMMAND LINE PARAMETERS */
   
  -		if (debugOutput) {
  -			arguments.add("-debug"); 
  -		}
  +        if (debugOutput) {
  +            arguments.add("-debug");
  +        }
   
  -		/* No beantype flag is needed for an entity bean */
  -		if (ejb.getBeantype().equals(STATELESS_SESSION)) {
  -			arguments.add("-sl");
  -		} else if (ejb.getBeantype().equals(STATEFUL_SESSION)) {
  -			arguments.add("-sf");
  -		}
  +        /* No beantype flag is needed for an entity bean */
  +        if (ejb.getBeantype().equals(STATELESS_SESSION)) {
  +            arguments.add("-sl");
  +        } else if (ejb.getBeantype().equals(STATEFUL_SESSION)) {
  +            arguments.add("-sf");
  +        }
   
  -		if (ejb.getIiop()) {
  -			arguments.add("-iiop");
  -		}
  +        if (ejb.getIiop()) {
  +            arguments.add("-iiop");
  +        }
   
  -		if (ejb.getCmp()) {
  -			arguments.add("-cmp");
  -		}
  +        if (ejb.getCmp()) {
  +            arguments.add("-cmp");
  +        }
   
  -		if (retainSource) {
  -			arguments.add("-gs");
  -		}
  +        if (retainSource) {
  +            arguments.add("-gs");
  +        }
   
  -		if (ejb.getHasession()) {
  -			arguments.add("-fo");
  -		}
  +        if (ejb.getHasession()) {
  +            arguments.add("-fo");
  +        }
   
  -		/* REQUIRED COMMAND LINE PARAMETERS */
  +        /* REQUIRED COMMAND LINE PARAMETERS */
   
  -		arguments.add("-classpath");
  -		arguments.add(classpath);
  +        arguments.add("-classpath");
  +        arguments.add(classpath);
   
  -		arguments.add("-d");
  -		arguments.add(destDirectory.toString());
  +        arguments.add("-d");
  +        arguments.add(destDirectory.toString());
   
  -		arguments.add(ejb.getHome().getQualifiedClassName());
  -		arguments.add(ejb.getRemote().getQualifiedClassName());
  -		arguments.add(ejb.getImplementation().getQualifiedClassName());
  +        arguments.add(ejb.getHome().getQualifiedClassName());
  +        arguments.add(ejb.getRemote().getQualifiedClassName());
  +        arguments.add(ejb.getImplementation().getQualifiedClassName());
   
  -		/* Convert the List into an Array and return it */
  -		return (String[])arguments.toArray(new String[arguments.size()]);
  -	}
  +        /* Convert the List into an Array and return it */
  +        return (String[])arguments.toArray(new String[arguments.size()]);
  +    }
   
       /**
        * Convenience method used to print messages to the user if debugging
  -	 * messages are enabled.
  -	 *
  -	 * @param msg The String to print to standard output.
  -	 */
  -	private void log(String msg) {
  -		if (debugOutput) {
  -			System.out.println(msg);
  -		}
  -	}
  -
  -
  -	/* Inner classes follow */
  -
  -
  -	/**
  -	 * This inner class is used to signal any problems during the execution of
  -	 * the ejbc compiler.
  -	 *
  -	 * @author Greg Nelson 
  -	 *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  -	 */
  -	public class EjbcException extends Exception {
  -
  -		/**
  -		 * Constructs an exception with the given descriptive message.
  -		 *
  -		 * @param msg Description of the exception which has occurred.
  -		 */
  -		public EjbcException(String msg) {
  -			super(msg);
  -		}
  -	}  // End of EjbcException inner class
  -
  -
  -	/**
  -	 * This inner class is an XML document handler that can be used to parse EJB
  -	 * descriptors (both the standard EJB descriptor as well as the iAS-specific
  -	 * descriptor that stores additional values for iAS).  Once the descriptors 
  -	 * have been processed, the list of EJBs found can be obtained by calling 
  -	 * the <code>getEjbs()</code> method.
  -	 *
  -	 * @see    EjbInfo
  -	 * @author Greg Nelson 
  -	 *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  -	 */
  +     * messages are enabled.
  +     *
  +     * @param msg The String to print to standard output.
  +     */
  +    private void log(String msg) {
  +        if (debugOutput) {
  +            System.out.println(msg);
  +        }
  +    }
  +
  +
  +    /* Inner classes follow */
  +
  +
  +    /**
  +     * This inner class is used to signal any problems during the execution of
  +     * the ejbc compiler.
  +     *
  +     * @author Greg Nelson
  +     *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  +     */
  +    public class EjbcException extends Exception {
  +
  +        /**
  +         * Constructs an exception with the given descriptive message.
  +         *
  +         * @param msg Description of the exception which has occurred.
  +         */
  +        public EjbcException(String msg) {
  +            super(msg);
  +        }
  +    }  // End of EjbcException inner class
  +
  +
  +    /**
  +     * This inner class is an XML document handler that can be used to parse EJB
  +     * descriptors (both the standard EJB descriptor as well as the iAS-specific
  +     * descriptor that stores additional values for iAS).  Once the descriptors
  +     * have been processed, the list of EJBs found can be obtained by calling
  +     * the <code>getEjbs()</code> method.
  +     *
  +     * @see    EjbInfo
  +     * @author Greg Nelson
  +     *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  +     */
       private class EjbcHandler extends HandlerBase {
   
  -		/* 
  -		 * Two Maps are used to track local DTDs that will be used in case the
  -		 * remote copies of these DTDs cannot be accessed.  The key for the Map
  -		 * is the DTDs public ID and the value is the local location for the DTD
  -		 */
  -		private Map       resourceDtds = new HashMap();
  -		private Map       fileDtds = new HashMap();
  +        /*
  +         * Two Maps are used to track local DTDs that will be used in case the
  +         * remote copies of these DTDs cannot be accessed.  The key for the Map
  +         * is the DTDs public ID and the value is the local location for the DTD
  +         */
  +        private Map       resourceDtds = new HashMap();
  +        private Map       fileDtds = new HashMap();
   
  -        private Map       ejbs = new HashMap();	  // List of EJBs found in XML
  -        private EjbInfo   currentEjb;			  // One item within the Map
  +        private Map       ejbs = new HashMap();      // List of EJBs found in XML
  +        private EjbInfo   currentEjb;             // One item within the Map
           private boolean   iasDescriptor = false;  // Is doc iAS or EJB descriptor
   
  -        private String    currentLoc = "";		  // Tracks current element
  -		private String    currentText;            // Tracks current text data
  -        private String    ejbType;				  // "session" or "entity"
  -
  -		/**
  -		 * Constructs a new instance of the handler and registers local copies
  -		 * of the standard EJB 1.1 descriptor DTD as well as iAS's EJB
  -		 * descriptor DTD.
  -		 */
  -		public EjbcHandler() {
  -			final String PUBLICID_EJB11 =
  -				"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN";
  -			final String PUBLICID_IPLANET_EJB_60 =
  -				"-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN";
  -
  -			
  -			final String DEFAULT_IAS60_EJB11_DTD_LOCATION = 
  -				"ejb-jar_1_1.dtd";
  -			final String DEFAULT_IAS60_DTD_LOCATION = 
  -				"IASEjb_jar_1_0.dtd";
  -
  -			registerDTD(PUBLICID_EJB11, DEFAULT_IAS60_EJB11_DTD_LOCATION);
  -			registerDTD(PUBLICID_IPLANET_EJB_60, DEFAULT_IAS60_DTD_LOCATION);
  -		}
  -
  -		/**
  -		 * Returns the list of EJB objects found during the processing of the 
  -		 * standard EJB 1.1 descriptor and iAS-specific EJB descriptor.
  -		 *
  -		 * @return An array of EJBs which were found during the descriptor
  -		 *         parsing.
  -		 */
  -		public EjbInfo[] getEjbs() {
  -			return (EjbInfo[])ejbs.values().toArray(new EjbInfo[ejbs.size()]);
  -		}
  -
  -		/**
  -		 * Returns the value of the display-name element found in the standard
  -		 * EJB 1.1 descriptor.
  -		 *
  -		 * @return String display-name value.
  -		 */
  -		public String getDisplayName() {
  -			return displayName;
  -		}
  -
  -		/**
  -		 * Registers a local DTD that will be used when parsing an EJB 
  -		 * descriptor.  When the DTD's public identifier is found in an XML
  -		 * document, the parser will reference the local DTD rather than the
  -		 * remote DTD.  This enables XML documents to be processed even when the
  -		 * public DTD isn't available.
  -		 *
  -		 * @param publicID The DTD's public identifier.
  -		 * @param location The location of the local DTD copy -- the location
  -		 *                 may either be a resource found on the classpath or a
  -		 *                 local file.
  -		 */
  -		public void registerDTD(String publicID, String location) {
  -			log("Registering: " + location);
  -			if ((publicID == null) || (location == null)) {
  -				return;
  -			}
  -
  -			if (ClassLoader.getSystemResource(location) != null) {
  -				log("Found resource: " + location);
  -				resourceDtds.put(publicID, location);
  -			} else {
  -				File dtdFile = new File(location);
  -				if (dtdFile.exists() && dtdFile.isFile()) {
  -					log("Found file: " + location);
  -					fileDtds.put(publicID, location);
  -				}
  -			}
  -		}
  -
  -		/**
  -		 * Resolves an external entity found during XML processing.  If a public
  -		 * ID is found that has been registered with the handler, an <code>
  -		 * InputSource</code> will be returned which refers to the local copy.
  -		 * If the public ID hasn't been registered or if an error occurs, the
  -		 * superclass implementation is used.
  -		 *
  -		 * @param publicId The DTD's public identifier.
  -		 * @param systemId The location of the DTD, as found in the XML document.
  -		 */
  -		public InputSource resolveEntity(String publicId, String systemId)
  -				throws SAXException {
  -			InputStream inputStream = null;
  -
  -
  -			try {
  -
  -				/* Search the resource Map and (if not found) file Map */
  -
  -				String location = (String)resourceDtds.get(publicId);
  -				if (location != null) {
  -					inputStream 
  -						= ClassLoader.getSystemResource(location).openStream();
  -				} else {
  -					location = (String)fileDtds.get(publicId);
  -					if (location != null) {
  -						inputStream = new FileInputStream(location);
  -					}
  -				}
  -			} catch (IOException e) {
  -				return super.resolveEntity(publicId, systemId);
  -			}
  -
  -			if (inputStream == null) {
  -				return super.resolveEntity(publicId, systemId);
  -			} else {
  -				return new InputSource(inputStream);
  -			}
  -		}
  -
  -		/**
  -		 * Receive notification that the start of an XML element has been found.
  -		 *
  -		 * @param name String name of the element found.
  -		 * @param atts AttributeList of the attributes included with the element
  -		 *             (if any).
  -		 * @throws SAXException If the parser cannot process the document.
  -		 */
  -        public void startElement(String name, AttributeList atts) 
  +        private String    currentLoc = "";        // Tracks current element
  +        private String    currentText;            // Tracks current text data
  +        private String    ejbType;                // "session" or "entity"
  +
  +        /**
  +         * Constructs a new instance of the handler and registers local copies
  +         * of the standard EJB 1.1 descriptor DTD as well as iAS's EJB
  +         * descriptor DTD.
  +         */
  +        public EjbcHandler() {
  +            final String PUBLICID_EJB11 =
  +                "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN";
  +            final String PUBLICID_IPLANET_EJB_60 =
  +                "-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN";
  +
  +
  +            final String DEFAULT_IAS60_EJB11_DTD_LOCATION =
  +                "ejb-jar_1_1.dtd";
  +            final String DEFAULT_IAS60_DTD_LOCATION =
  +                "IASEjb_jar_1_0.dtd";
  +
  +            registerDTD(PUBLICID_EJB11, DEFAULT_IAS60_EJB11_DTD_LOCATION);
  +            registerDTD(PUBLICID_IPLANET_EJB_60, DEFAULT_IAS60_DTD_LOCATION);
  +        }
  +
  +        /**
  +         * Returns the list of EJB objects found during the processing of the
  +         * standard EJB 1.1 descriptor and iAS-specific EJB descriptor.
  +         *
  +         * @return An array of EJBs which were found during the descriptor
  +         *         parsing.
  +         */
  +        public EjbInfo[] getEjbs() {
  +            return (EjbInfo[])ejbs.values().toArray(new EjbInfo[ejbs.size()]);
  +        }
  +
  +        /**
  +         * Returns the value of the display-name element found in the standard
  +         * EJB 1.1 descriptor.
  +         *
  +         * @return String display-name value.
  +         */
  +        public String getDisplayName() {
  +            return displayName;
  +        }
  +
  +        /**
  +         * Registers a local DTD that will be used when parsing an EJB
  +         * descriptor.  When the DTD's public identifier is found in an XML
  +         * document, the parser will reference the local DTD rather than the
  +         * remote DTD.  This enables XML documents to be processed even when the
  +         * public DTD isn't available.
  +         *
  +         * @param publicID The DTD's public identifier.
  +         * @param location The location of the local DTD copy -- the location
  +         *                 may either be a resource found on the classpath or a
  +         *                 local file.
  +         */
  +        public void registerDTD(String publicID, String location) {
  +            log("Registering: " + location);
  +            if ((publicID == null) || (location == null)) {
  +                return;
  +            }
  +
  +            if (ClassLoader.getSystemResource(location) != null) {
  +                log("Found resource: " + location);
  +                resourceDtds.put(publicID, location);
  +            } else {
  +                File dtdFile = new File(location);
  +                if (dtdFile.exists() && dtdFile.isFile()) {
  +                    log("Found file: " + location);
  +                    fileDtds.put(publicID, location);
  +                }
  +            }
  +        }
  +
  +        /**
  +         * Resolves an external entity found during XML processing.  If a public
  +         * ID is found that has been registered with the handler, an <code>
  +         * InputSource</code> will be returned which refers to the local copy.
  +         * If the public ID hasn't been registered or if an error occurs, the
  +         * superclass implementation is used.
  +         *
  +         * @param publicId The DTD's public identifier.
  +         * @param systemId The location of the DTD, as found in the XML document.
  +         */
  +        public InputSource resolveEntity(String publicId, String systemId)
  +                throws SAXException {
  +            InputStream inputStream = null;
  +
  +
  +            try {
  +
  +                /* Search the resource Map and (if not found) file Map */
  +
  +                String location = (String)resourceDtds.get(publicId);
  +                if (location != null) {
  +                    inputStream
  +                        = ClassLoader.getSystemResource(location).openStream();
  +                } else {
  +                    location = (String)fileDtds.get(publicId);
  +                    if (location != null) {
  +                        inputStream = new FileInputStream(location);
  +                    }
  +                }
  +            } catch (IOException e) {
  +                return super.resolveEntity(publicId, systemId);
  +            }
  +
  +            if (inputStream == null) {
  +                return super.resolveEntity(publicId, systemId);
  +            } else {
  +                return new InputSource(inputStream);
  +            }
  +        }
  +
  +        /**
  +         * Receive notification that the start of an XML element has been found.
  +         *
  +         * @param name String name of the element found.
  +         * @param atts AttributeList of the attributes included with the element
  +         *             (if any).
  +         * @throws SAXException If the parser cannot process the document.
  +         */
  +        public void startElement(String name, AttributeList atts)
                   throws SAXException {
   
  -			/*
  -			 * I need to "push" the element onto the String (currentLoc) which 
  -			 * always represents the current location in the XML document.
  -			 */
  -			currentLoc += "\\" + name;
  +            /*
  +             * I need to "push" the element onto the String (currentLoc) which
  +             * always represents the current location in the XML document.
  +             */
  +            currentLoc += "\\" + name;
   
  -			/* A new element has started, so reset the text being captured */
  -			currentText = "";
  +            /* A new element has started, so reset the text being captured */
  +            currentText = "";
   
               if (currentLoc.equals("\\ejb-jar")) {
                   iasDescriptor = false;
  @@ -801,47 +801,47 @@
               if ((name.equals("session")) || (name.equals("entity"))) {
                   ejbType = name;
               }
  -        }    
  +        }
   
  -		/**
  -		 * Receive notification that character data has been found in the XML
  -		 * document
  -		 *
  -		 * @param ch Array of characters which have been found in the document.
  -		 * @param start Starting index of the data found in the document.
  -		 * @param len The number of characters found in the document.
  -		 * @throws SAXException If the parser cannot process the document.
  -		 */
  -        public void characters(char[] ch, int start, int len) 
  -				throws SAXException {
  +        /**
  +         * Receive notification that character data has been found in the XML
  +         * document
  +         *
  +         * @param ch Array of characters which have been found in the document.
  +         * @param start Starting index of the data found in the document.
  +         * @param len The number of characters found in the document.
  +         * @throws SAXException If the parser cannot process the document.
  +         */
  +        public void characters(char[] ch, int start, int len)
  +                throws SAXException {
   
               currentText += new String(ch).substring(start, start + len);
           }
   
  -		/**
  -		 * Receive notification that the end of an XML element has been found.
  -		 *
  -		 * @param name String name of the element.
  -		 * @throws SAXException If the parser cannot process the document.
  -		 */
  +        /**
  +         * Receive notification that the end of an XML element has been found.
  +         *
  +         * @param name String name of the element.
  +         * @throws SAXException If the parser cannot process the document.
  +         */
           public void endElement(String name) throws SAXException {
  -			
  -			/*
  -			 * If this is a standard EJB 1.1 descriptor, we are looking for one
  -			 * set of data, while if this is an iAS-specific descriptor, we're
  -			 * looking for different set of data.  Hand the processing off to
  -			 * the appropriate method.
  -			 */
  +
  +            /*
  +             * If this is a standard EJB 1.1 descriptor, we are looking for one
  +             * set of data, while if this is an iAS-specific descriptor, we're
  +             * looking for different set of data.  Hand the processing off to
  +             * the appropriate method.
  +             */
               if (iasDescriptor) {
                   iasCharacters(currentText);
               } else {
                   stdCharacters(currentText);
               }
   
  -			/*
  -			 * I need to "pop" the element off the String (currentLoc) which 
  -			 * always represents my current location in the XML document.
  -			 */
  +            /*
  +             * I need to "pop" the element off the String (currentLoc) which
  +             * always represents my current location in the XML document.
  +             */
   
               int nameLength = name.length() + 1; // Add one for the "\"
               int locLength  = currentLoc.length();
  @@ -849,20 +849,20 @@
               currentLoc = currentLoc.substring(0, locLength - nameLength);
           }
   
  -		/**
  -		 * Receive notification that character data has been found in a standard
  -		 * EJB 1.1 descriptor.  We're interested in retrieving the home 
  -		 * interface, remote interface, implementation class, the type of bean,
  -		 * and if the bean uses CMP.
  -		 *
  -		 * @param value String data found in the XML document.
  -		 */
  +        /**
  +         * Receive notification that character data has been found in a standard
  +         * EJB 1.1 descriptor.  We're interested in retrieving the home
  +         * interface, remote interface, implementation class, the type of bean,
  +         * and if the bean uses CMP.
  +         *
  +         * @param value String data found in the XML document.
  +         */
           private void stdCharacters(String value) {
   
  -			if (currentLoc.equals("\\ejb-jar\\display-name")) {
  -				displayName = value;
  -				return;
  -			}
  +            if (currentLoc.equals("\\ejb-jar\\display-name")) {
  +                displayName = value;
  +                return;
  +            }
   
               String base = "\\ejb-jar\\enterprise-beans\\" + ejbType;
   
  @@ -885,16 +885,16 @@
               }
           }
   
  -		/**
  -		 * Receive notification that character data has been found in an
  -		 * iAS-specific descriptor.  We're interested in retrieving data 
  -		 * indicating whether the bean must support RMI/IIOP access, whether
  -		 * the bean must provide highly available stubs and skeletons (in the
  -		 * case of stateful session beans), and if this bean uses additional
  -		 * CMP XML descriptors (in the case of entity beans with CMP).
  -		 * 
  -		 * @param value String data found in the XML document.
  -		 */
  +        /**
  +         * Receive notification that character data has been found in an
  +         * iAS-specific descriptor.  We're interested in retrieving data
  +         * indicating whether the bean must support RMI/IIOP access, whether
  +         * the bean must provide highly available stubs and skeletons (in the
  +         * case of stateful session beans), and if this bean uses additional
  +         * CMP XML descriptors (in the case of entity beans with CMP).
  +         *
  +         * @param value String data found in the XML document.
  +         */
           private void iasCharacters(String value) {
               String base = "\\ias-ejb-jar\\enterprise-beans\\" + ejbType;
   
  @@ -909,72 +909,72 @@
               } else if (currentLoc.equals(base + "\\failover-required")) {
                   currentEjb.setHasession(value);
               } else if (currentLoc.equals(base + "\\persistence-manager"
  -											  + "\\properties-file-location")) {
  -				currentEjb.addCmpDescriptor(value);
  -			}
  +                                              + "\\properties-file-location")) {
  +                currentEjb.addCmpDescriptor(value);
  +            }
           }
       }  // End of EjbcHandler inner class
   
   
  -	/**
  -	 * This inner class represents an EJB that will be compiled using ejbc.
  -	 *
  -	 * @author Greg Nelson 
  -	 *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  -	 */
  +    /**
  +     * This inner class represents an EJB that will be compiled using ejbc.
  +     *
  +     * @author Greg Nelson
  +     *         <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  +     */
       private class EjbInfo {
  -        private String     name;			  // EJB's display name
  -        private Classname  home;			  // EJB's home interface name
  -        private Classname  remote;			  // EJB's remote interface name
  -        private Classname  implementation;	  // EJB's implementation class
  +        private String     name;              // EJB's display name
  +        private Classname  home;              // EJB's home interface name
  +        private Classname  remote;            // EJB's remote interface name
  +        private Classname  implementation;      // EJB's implementation class
           private String  beantype = "entity";  // or "stateful" or "stateless"
  -        private boolean cmp       = false;	  // Does this EJB support CMP?
  -        private boolean iiop      = false;	  // Does this EJB support IIOP?
  -        private boolean hasession = false;	  // Does this EJB require failover?
  -		private List cmpDescriptors = new ArrayList();  // CMP descriptor list
  -            
  -		/**
  -		 * Construct a new EJBInfo object with the given name.
  -		 *
  -		 * @param name The display name for the EJB.
  -		 */
  -		public EjbInfo(String name) {
  +        private boolean cmp       = false;      // Does this EJB support CMP?
  +        private boolean iiop      = false;      // Does this EJB support IIOP?
  +        private boolean hasession = false;      // Does this EJB require failover?
  +        private List cmpDescriptors = new ArrayList();  // CMP descriptor list
  +
  +        /**
  +         * Construct a new EJBInfo object with the given name.
  +         *
  +         * @param name The display name for the EJB.
  +         */
  +        public EjbInfo(String name) {
               this.name = name;
           }
   
  -		/**
  -		 * Returns the display name of the EJB.  If a display name has not been
  -		 * set, it returns the EJB implementation classname (if the
  -		 * implementation class is not set, it returns "[unnamed]").
  -		 *
  -		 * @return The display name for the EJB.
  -		 */
  +        /**
  +         * Returns the display name of the EJB.  If a display name has not been
  +         * set, it returns the EJB implementation classname (if the
  +         * implementation class is not set, it returns "[unnamed]").
  +         *
  +         * @return The display name for the EJB.
  +         */
           public String getName() {
  -			if (name == null) {
  -				if (implementation == null) {
  -					return "[unnamed]";
  -				} else {
  -					return implementation.getClassName();
  -				}
  -			}
  +            if (name == null) {
  +                if (implementation == null) {
  +                    return "[unnamed]";
  +                } else {
  +                    return implementation.getClassName();
  +                }
  +            }
               return name;
           }
   
  -		/*
  -		 * Below are getter's and setter's for each of the instance variables.
  -		 * Note that (in addition to supporting setters with the same type as
  -		 * the instance variable) a setter is provided with takes a String
  -		 * argument -- this are provided so the XML document handler can set
  -		 * the EJB values using the Strings it parses.
  -		 */
  +        /*
  +         * Below are getter's and setter's for each of the instance variables.
  +         * Note that (in addition to supporting setters with the same type as
  +         * the instance variable) a setter is provided with takes a String
  +         * argument -- this are provided so the XML document handler can set
  +         * the EJB values using the Strings it parses.
  +         */
   
           public void setHome(String home) {
               setHome(new Classname(home));
           }
   
  -		public void setHome(Classname home) {
  -			this.home = home;
  -		}
  +        public void setHome(Classname home) {
  +            this.home = home;
  +        }
   
           public Classname getHome() {
               return home;
  @@ -984,9 +984,9 @@
               setRemote(new Classname(remote));
           }
   
  -		public void setRemote(Classname remote) {
  -			this.remote = remote;
  -		}
  +        public void setRemote(Classname remote) {
  +            this.remote = remote;
  +        }
   
           public Classname getRemote() {
               return remote;
  @@ -996,9 +996,9 @@
               setImplementation(new Classname(implementation));
           }
   
  -		public void setImplementation(Classname implementation) {
  -			this.implementation = implementation;
  -		}
  +        public void setImplementation(Classname implementation) {
  +            this.implementation = implementation;
  +        }
   
           public Classname getImplementation() {
               return implementation;
  @@ -1047,443 +1047,442 @@
           public boolean getHasession() {
               return hasession;
           }
  +
  +        public void addCmpDescriptor(String descriptor) {
  +            cmpDescriptors.add(descriptor);
  +        }
   
  -		public void addCmpDescriptor(String descriptor) {
  -			cmpDescriptors.add(descriptor);
  -		}
  -
  -		public List getCmpDescriptors() {
  -			return cmpDescriptors;
  -		}
  -
  -		/**
  -		 * Verifies that the EJB is valid--if it is invalid, an exception is
  -		 * thrown
  -		 *
  -		 * 
  -		 * @param buildDir The directory where the EJB remote interface, home
  -		 *                 interface, and implementation class must be found.
  -		 * @throws EjbcException If the EJB is invalid.
  -		 */
  -		private void checkConfiguration(File buildDir) throws EjbcException  {
  -
  -			/* Check that the specified instance variables are valid */
  -			if (home == null) {
  -				throw new EjbcException("A home interface was not found "
  -							+ "for the " + name + " EJB.");
  -			}
  -			if (remote == null) {
  -				throw new EjbcException("A remote interface was not found "
  -							+ "for the " + name + " EJB.");
  -			}
  -			if (implementation == null) {
  -				throw new EjbcException("An EJB implementation class was not "
  -							+ "found for the " + name + " EJB.");
  -			}
  -
  -			if ((!beantype.equals(ENTITY_BEAN)) 
  -						&& (!beantype.equals(STATELESS_SESSION)) 
  -						&& (!beantype.equals(STATEFUL_SESSION))) {
  -				throw new EjbcException("The beantype found (" + beantype + ") "
  -							+ "isn't valid in the " + name + " EJB.");
  -			}
  -
  -			if (cmp && (!beantype.equals(ENTITY_BEAN))) {
  -				System.out.println("CMP stubs and skeletons may not be generated"
  -					+ " for a Session Bean -- the \"cmp\" attribute will be"
  -					+ " ignoredfor the " + name + " EJB.");
  -			}
  -
  -			if (hasession && (!beantype.equals(STATEFUL_SESSION))) {
  -				System.out.println("Highly available stubs and skeletons may "
  -					+ "only be generated for a Stateful Session Bean -- the "
  -					+ "\"hasession\" attribute will be ignored for the " 
  -					+ name + " EJB.");
  -			}
  -
  -			/* Check that the EJB "source" classes all exist */
  -			if (!remote.getClassFile(buildDir).exists()) {
  -				throw new EjbcException("The remote interface "
  -							+ remote.getQualifiedClassName() + " could not be "
  -							+ "found.");
  -			}
  -			if (!home.getClassFile(buildDir).exists()) {
  -				throw new EjbcException("The home interface "
  -							+ home.getQualifiedClassName() + " could not be "
  -							+ "found.");
  -			}
  -			if (!implementation.getClassFile(buildDir).exists()) {
  -				throw new EjbcException("The EJB implementation class "
  -							+ implementation.getQualifiedClassName() + " could "
  -							+ "not be found.");
  -			}
  -		}
  -
  -		/**
  -		 * Determines if the ejbc utility needs to be run or not.  If the stubs 
  -		 * and skeletons can all be found in the destination directory AND all 
  -		 * of their timestamps are more recent than the EJB source classes 
  -		 * (home, remote, and implementation classes), the method returns 
  -		 * <code>false</code>.  Otherwise, the method returns <code>true</code>.
  -		 *
  -		 * @param destDir The directory where the EJB source classes, stubs and 
  -		 *                skeletons are located.
  -		 * @return A boolean indicating whether or not the ejbc utility needs to
  -		 *         be run to bring the stubs and skeletons up to date.
  -		 */
  -		public boolean mustBeRecompiled(File destDir) {
  -
  -			long sourceModified = sourceClassesModified(destDir);
  -
  -			long destModified = destClassesModified(destDir);
  -
  -			return (destModified < sourceModified);
  -		}
  -
  -		/**
  -		 * Examines each of the EJB source classes (home, remote, and 
  -		 * implementation) and returns the modification timestamp for the 
  -		 * "oldest" class.
  -		 *
  -		 * @param classpath The classpath to be used to find the source EJB
  -		 *                  classes.  If <code>null</code>, the system classpath
  -		 *                  is used.
  -		 * @return The modification timestamp for the "oldest" EJB source class.
  -		 * @throws BuildException If one of the EJB source classes cannot be
  -		 *                        found on the classpath.
  -		 */
  -		private long sourceClassesModified(File buildDir) {
  -			long latestModified; // The timestamp of the "newest" class
  -			long modified;       // Timestamp for a given class
  -			File remoteFile;     // File for the remote interface class
  -			File homeFile;       // File for the home interface class
  -			File implFile;       // File for the EJB implementation class
  -
  -			/* Check the timestamp on the remote interface */
  -			remoteFile = remote.getClassFile(buildDir);
  -			modified = remoteFile.lastModified();
  -			if (modified == -1) {
  -				System.out.println("The class " 
  -								+ remote.getQualifiedClassName() + " couldn't "
  -								+ "be found on the classpath");
  -				return -1;
  -			}
  -			latestModified = modified;
  -			
  -			/* Check the timestamp on the home interface */
  -			homeFile = home.getClassFile(buildDir);
  -			modified = homeFile.lastModified();
  -			if (modified == -1) {
  -				System.out.println("The class " 
  -								+ home.getQualifiedClassName() + " couldn't be "
  -								+ "found on the classpath");
  -				return -1;
  -			}
  -			latestModified = Math.max(latestModified, modified);
  -			
  -			/* Check the timestamp on the EJB implementation class.
  -			 *
  -			 * Note that if ONLY the implementation class has changed, it's not
  -			 * necessary to rebuild the EJB stubs and skeletons.  For this
  -			 * reason, we ensure the file exists (using lastModified above), but
  -			 * we DON'T compare it's timestamp with the timestamps of the home
  -			 * and remote interfaces (because it's irrelevant in determining if
  -			 * ejbc must be run)
  -			 */
  -			implFile = implementation.getClassFile(buildDir);
  -			modified = implFile.lastModified();
  -			if (modified == -1) {
  -				System.out.println("The class " 
  -								+ implementation.getQualifiedClassName() 
  -								+ " couldn't be found on the classpath");
  -				return -1;
  -			}
  -
  -			String pathToFile = remote.getQualifiedClassName();
  -			pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  -			ejbFiles.put(pathToFile, remoteFile);
  -
  -			pathToFile = home.getQualifiedClassName();
  -			pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  -			ejbFiles.put(pathToFile, homeFile);
  -
  -			pathToFile = implementation.getQualifiedClassName();
  -			pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  -			ejbFiles.put(pathToFile, implFile);
  -			
  -			return latestModified;
  -		}
  -
  -		/**
  -		 * Examines each of the EJB stubs and skeletons in the destination
  -		 * directory and returns the modification timestamp for the "oldest" 
  -		 * class. If one of the stubs or skeletons cannot be found, <code>-1
  -		 * </code> is returned.
  -		 *
  -		 * @param dest The directory in which the EJB stubs and skeletons are
  -		 *             stored.
  -		 * @return The modification timestamp for the "oldest" EJB stub or
  -		 *         skeleton.  If one of the classes cannot be found, <code>-1
  -		 *         </code> is returned.  
  -		 * @throws BuildException If the canonical path of the destination
  -		 *                        directory cannot be found.
  -		 */
  -		private long destClassesModified(File destDir) {
  -			String[] classnames = classesToGenerate(); // List of all stubs & skels
  -			long destClassesModified = new Date().getTime(); // Earliest mod time
  -			boolean allClassesFound  = true;           // Has each been found?
  -
  -			/*
  -			 * Loop through each stub/skeleton class that must be generated, and
  -			 * determine (if all exist) which file has the most recent timestamp
  -			 */
  -			for (int i=0; i < classnames.length; i++) {
  -
  -				String pathToClass = 
  -						classnames[i].replace('.', File.separatorChar) + ".class";
  -				File classFile = new File(destDir, pathToClass);
  -
  -				/* 
  -				 * Add each stub/skeleton class to the list of EJB files.  Note
  -				 * that each class is added even if it doesn't exist now.
  -				 */
  -				ejbFiles.put(pathToClass, classFile);
  -
  -				allClassesFound = allClassesFound && classFile.exists();
  -
  -				if (allClassesFound) {
  -					long fileMod = classFile.lastModified();
  -
  -					/* Keep track of the oldest modification timestamp */
  -					destClassesModified = Math.min(destClassesModified, fileMod);
  -				}
  -			}
  -
  -			return (allClassesFound) ? destClassesModified : -1;
  -		}
  -
  -		/**
  -		 * Builds an array of class names which represent the stubs and 
  -		 * skeletons which need to be generated for a given EJB.  The class 
  -		 * names are fully qualified.  Nine classes are generated for all EJBs 
  -		 * while an additional six classes are generated for beans requiring 
  -		 * RMI/IIOP access.
  -		 *
  -		 * @return An array of Strings representing the fully-qualified class 
  -		 *         names for the stubs and skeletons to be generated.
  -		 */
  -		private String[] classesToGenerate() {
  -			String[] classnames = (iiop) ? new String[15] : new String[9];
  -
  -			final String remotePkg     = remote.getPackageName() + ".";
  -			final String remoteClass   = remote.getClassName();
  -			final String homePkg       = home.getPackageName() + ".";
  -			final String homeClass     = home.getClassName();
  -			final String implPkg       = implementation.getPackageName() + ".";
  -			final String implFullClass = implementation.getQualifiedWithUnderscores();
  -			int index = 0;
  -
  -			String fullPath;
  -
  -			classnames[index++] = implPkg + "ejb_fac_" + implFullClass;
  -			classnames[index++] = implPkg + "ejb_home_" + implFullClass;
  -			classnames[index++] = implPkg + "ejb_skel_" + implFullClass;
  -			classnames[index++] = remotePkg + "ejb_kcp_skel_" + remoteClass;
  -			classnames[index++] = homePkg + "ejb_kcp_skel_" + homeClass;
  -			classnames[index++] = remotePkg + "ejb_kcp_stub_" + remoteClass;
  -			classnames[index++] = homePkg + "ejb_kcp_stub_" + homeClass;
  -			classnames[index++] = remotePkg + "ejb_stub_" + remoteClass;
  -			classnames[index++] = homePkg + "ejb_stub_" + homeClass;
  -
  -			if (!iiop) {
  -				return classnames;
  -			}
  -
  -			classnames[index++] = remotePkg + "_" + remoteClass + "_Stub";
  -			classnames[index++] = homePkg + "_" + homeClass + "_Stub";
  -			classnames[index++] = remotePkg + "_ejb_RmiCorbaBridge_" 
  -														+ remoteClass + "_Tie";
  -			classnames[index++] = homePkg + "_ejb_RmiCorbaBridge_" + homeClass 
  -														+ "_Tie";
  -			classnames[index++] = remotePkg + "ejb_RmiCorbaBridge_" 
  -														+ remoteClass;
  -			classnames[index++] = homePkg + "ejb_RmiCorbaBridge_" + homeClass;
  -
  -			return classnames;
  -		}
  -
  -		/**
  -		 * Convenience method which creates a String representation of all the
  -		 * instance variables of an EjbInfo object.
  -		 *
  -		 * @return A String representing the EjbInfo instance.
  -		 */
  -		public String toString() {
  -			String s = "EJB name: " + name
  -						+ "\n\r              home:      " + home 
  -						+ "\n\r              remote:    " + remote 
  -						+ "\n\r              impl:      " + implementation 
  -						+ "\n\r              beantype:  " + beantype 
  -						+ "\n\r              cmp:       " + cmp 
  -						+ "\n\r              iiop:      " + iiop 
  -						+ "\n\r              hasession: " + hasession;
  -
  -			Iterator i = cmpDescriptors.iterator();
  -			while (i.hasNext()) {
  -				s += "\n\r              CMP Descriptor: " + i.next();
  -			}
  -
  -			return s;
  -		}
  -
  -	} // End of EjbInfo inner class
  -
  -	/**
  -	 * Convenience class used to represent the fully qualified name of a Java 
  -	 * class.  It provides an easy way to retrieve components of the class name 
  -	 * in a format that is convenient for building iAS stubs and skeletons.
  -	 *
  -	 * @author Greg Nelson <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  -	 */
  -	private class Classname {
  -		private String qualifiedName;  // Fully qualified name of the Java class
  -		private String packageName;    // Name of the package for this class
  -		private String className;      // Name of the class without the package
  -
  -		/**
  -		 * This constructor builds an object which represents the name of a Java 
  -		 * class.
  -		 *
  -		 * @param qualifiedName String representing the fully qualified class
  -		 *                      name of the Java class.
  -		 */
  -		public Classname(String qualifiedName) {
  -			if (qualifiedName == null) {
  -				return;
  -			}
  -
  -			this.qualifiedName = qualifiedName;
  -
  -			int index = qualifiedName.lastIndexOf('.');
  -			if (index == -1) {
  -				className = qualifiedName;
  -				packageName = "";
  -			} else {
  -				packageName = qualifiedName.substring(0, index);
  -				className   = qualifiedName.substring(index + 1);
  -			}
  -		}
  -
  -		/**
  -		 * Gets the fully qualified name of the Java class.
  -		 *
  -		 * @return String representing the fully qualified class name.
  -		 */
  -		public String getQualifiedClassName() {
  -			return qualifiedName;
  -		}
  -
  -		/**
  -		 * Gets the package name for the Java class.
  -		 *
  -		 * @return String representing the package name for the class.
  -		 */
  -		public String getPackageName() {
  -			return packageName;
  -		}
  -
  -		/**
  -		 * Gets the Java class name without the package structure.
  -		 *
  -		 * @return String representing the name for the class.
  -		 */
  -		public String getClassName() {
  -			return className;
  -		}
  -
  -		/**
  -		 * Gets the fully qualified name of the Java class with underscores 
  -		 * separating the components of the class name rather than periods.  
  -		 * This format is used in naming some of the stub and skeleton classes 
  -		 * for the iPlanet Application Server.  
  -		 *
  -		 * @return String representing the fully qualified class name using 
  -		 *         underscores instead of periods.
  -		 */
  -		public String getQualifiedWithUnderscores() {
  -			return qualifiedName.replace('.', '_');
  -		}
  -
  -		/**
  -		 * Returns a File which references the class relative to the specified
  -		 * directory.  Note that the class file may or may not exist.
  -		 *
  -		 * @param  directory A File referencing the base directory containing
  -		 *                   class files.
  -		 * @return File referencing this class.
  -		 */
  -		public File getClassFile(File directory) {
  -			String pathToFile = qualifiedName.replace('.', File.separatorChar) 
  -											+ ".class";
  -			return new File(directory, pathToFile);
  -		}
  -
  -		/**
  -		 * String representation of this class name.  It returns the fully
  -		 * qualified class name.
  -		 *
  -		 * @return String representing the fully qualified class name.
  -		 */
  -		public String toString() {
  -			return getQualifiedClassName();
  -		}
  -	}  // End of Classname inner class
  -
  -
  -	/**
  -	 * Thread class used to redirect output from an <code>InputStream</code> to 
  -	 * the JRE standard output.  This class may be used to redirect output from
  -	 * an external process to the standard output.
  -	 *
  -	 * @author Greg Nelson <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  -	 */
  -	private class RedirectOutput extends Thread {
  -		InputStream stream;  // Stream to read and redirect to standard output
  -
  -		/**
  -		 * Constructs a new instance that will redirect output from the
  -		 * specified stream to the standard output.
  -		 *
  -		 * @param stream InputStream which will be read and redirected to the
  -		 *               standard output.
  -		 */
  -		public RedirectOutput(InputStream stream) {
  -			this.stream = stream;
  -		}
  -
  -		/**
  -		 * Reads text from the input stream and redirects it to standard output
  -		 * using a separate thread.
  -		 */
  -		public void run() {
  -			BufferedReader reader = new BufferedReader(
  -											new InputStreamReader(stream));
  -			String text;
  -			try {
  -				while ((text = reader.readLine()) != null) {
  -					System.out.println(text);
  -				}
  -			} catch (IOException e) {
  -				e.printStackTrace();
  -			} finally {
  -				try {
  -					reader.close();
  -				} catch (IOException e) {
  -					// Do nothing
  -				}
  -			}
  -		}
  -	}  // End of RedirectOutput inner class
  +        public List getCmpDescriptors() {
  +            return cmpDescriptors;
  +        }
  +
  +        /**
  +         * Verifies that the EJB is valid--if it is invalid, an exception is
  +         * thrown
  +         *
  +         *
  +         * @param buildDir The directory where the EJB remote interface, home
  +         *                 interface, and implementation class must be found.
  +         * @throws EjbcException If the EJB is invalid.
  +         */
  +        private void checkConfiguration(File buildDir) throws EjbcException  {
  +
  +            /* Check that the specified instance variables are valid */
  +            if (home == null) {
  +                throw new EjbcException("A home interface was not found "
  +                            + "for the " + name + " EJB.");
  +            }
  +            if (remote == null) {
  +                throw new EjbcException("A remote interface was not found "
  +                            + "for the " + name + " EJB.");
  +            }
  +            if (implementation == null) {
  +                throw new EjbcException("An EJB implementation class was not "
  +                            + "found for the " + name + " EJB.");
  +            }
  +
  +            if ((!beantype.equals(ENTITY_BEAN))
  +                        && (!beantype.equals(STATELESS_SESSION))
  +                        && (!beantype.equals(STATEFUL_SESSION))) {
  +                throw new EjbcException("The beantype found (" + beantype + ") "
  +                            + "isn't valid in the " + name + " EJB.");
  +            }
  +
  +            if (cmp && (!beantype.equals(ENTITY_BEAN))) {
  +                System.out.println("CMP stubs and skeletons may not be generated"
  +                    + " for a Session Bean -- the \"cmp\" attribute will be"
  +                    + " ignoredfor the " + name + " EJB.");
  +            }
  +
  +            if (hasession && (!beantype.equals(STATEFUL_SESSION))) {
  +                System.out.println("Highly available stubs and skeletons may "
  +                    + "only be generated for a Stateful Session Bean -- the "
  +                    + "\"hasession\" attribute will be ignored for the "
  +                    + name + " EJB.");
  +            }
  +
  +            /* Check that the EJB "source" classes all exist */
  +            if (!remote.getClassFile(buildDir).exists()) {
  +                throw new EjbcException("The remote interface "
  +                            + remote.getQualifiedClassName() + " could not be "
  +                            + "found.");
  +            }
  +            if (!home.getClassFile(buildDir).exists()) {
  +                throw new EjbcException("The home interface "
  +                            + home.getQualifiedClassName() + " could not be "
  +                            + "found.");
  +            }
  +            if (!implementation.getClassFile(buildDir).exists()) {
  +                throw new EjbcException("The EJB implementation class "
  +                            + implementation.getQualifiedClassName() + " could "
  +                            + "not be found.");
  +            }
  +        }
  +
  +        /**
  +         * Determines if the ejbc utility needs to be run or not.  If the stubs
  +         * and skeletons can all be found in the destination directory AND all
  +         * of their timestamps are more recent than the EJB source classes
  +         * (home, remote, and implementation classes), the method returns
  +         * <code>false</code>.  Otherwise, the method returns <code>true</code>.
  +         *
  +         * @param destDir The directory where the EJB source classes, stubs and
  +         *                skeletons are located.
  +         * @return A boolean indicating whether or not the ejbc utility needs to
  +         *         be run to bring the stubs and skeletons up to date.
  +         */
  +        public boolean mustBeRecompiled(File destDir) {
  +
  +            long sourceModified = sourceClassesModified(destDir);
  +
  +            long destModified = destClassesModified(destDir);
  +
  +            return (destModified < sourceModified);
  +        }
  +
  +        /**
  +         * Examines each of the EJB source classes (home, remote, and
  +         * implementation) and returns the modification timestamp for the
  +         * "oldest" class.
  +         *
  +         * @param classpath The classpath to be used to find the source EJB
  +         *                  classes.  If <code>null</code>, the system classpath
  +         *                  is used.
  +         * @return The modification timestamp for the "oldest" EJB source class.
  +         * @throws BuildException If one of the EJB source classes cannot be
  +         *                        found on the classpath.
  +         */
  +        private long sourceClassesModified(File buildDir) {
  +            long latestModified; // The timestamp of the "newest" class
  +            long modified;       // Timestamp for a given class
  +            File remoteFile;     // File for the remote interface class
  +            File homeFile;       // File for the home interface class
  +            File implFile;       // File for the EJB implementation class
  +
  +            /* Check the timestamp on the remote interface */
  +            remoteFile = remote.getClassFile(buildDir);
  +            modified = remoteFile.lastModified();
  +            if (modified == -1) {
  +                System.out.println("The class "
  +                                + remote.getQualifiedClassName() + " couldn't "
  +                                + "be found on the classpath");
  +                return -1;
  +            }
  +            latestModified = modified;
  +
  +            /* Check the timestamp on the home interface */
  +            homeFile = home.getClassFile(buildDir);
  +            modified = homeFile.lastModified();
  +            if (modified == -1) {
  +                System.out.println("The class "
  +                                + home.getQualifiedClassName() + " couldn't be "
  +                                + "found on the classpath");
  +                return -1;
  +            }
  +            latestModified = Math.max(latestModified, modified);
  +
  +            /* Check the timestamp on the EJB implementation class.
  +             *
  +             * Note that if ONLY the implementation class has changed, it's not
  +             * necessary to rebuild the EJB stubs and skeletons.  For this
  +             * reason, we ensure the file exists (using lastModified above), but
  +             * we DON'T compare it's timestamp with the timestamps of the home
  +             * and remote interfaces (because it's irrelevant in determining if
  +             * ejbc must be run)
  +             */
  +            implFile = implementation.getClassFile(buildDir);
  +            modified = implFile.lastModified();
  +            if (modified == -1) {
  +                System.out.println("The class "
  +                                + implementation.getQualifiedClassName()
  +                                + " couldn't be found on the classpath");
  +                return -1;
  +            }
  +
  +            String pathToFile = remote.getQualifiedClassName();
  +            pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  +            ejbFiles.put(pathToFile, remoteFile);
  +
  +            pathToFile = home.getQualifiedClassName();
  +            pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  +            ejbFiles.put(pathToFile, homeFile);
  +
  +            pathToFile = implementation.getQualifiedClassName();
  +            pathToFile = pathToFile.replace('.', File.separatorChar) + ".class";
  +            ejbFiles.put(pathToFile, implFile);
  +
  +            return latestModified;
  +        }
  +
  +        /**
  +         * Examines each of the EJB stubs and skeletons in the destination
  +         * directory and returns the modification timestamp for the "oldest"
  +         * class. If one of the stubs or skeletons cannot be found, <code>-1
  +         * </code> is returned.
  +         *
  +         * @param dest The directory in which the EJB stubs and skeletons are
  +         *             stored.
  +         * @return The modification timestamp for the "oldest" EJB stub or
  +         *         skeleton.  If one of the classes cannot be found, <code>-1
  +         *         </code> is returned.
  +         * @throws BuildException If the canonical path of the destination
  +         *                        directory cannot be found.
  +         */
  +        private long destClassesModified(File destDir) {
  +            String[] classnames = classesToGenerate(); // List of all stubs & skels
  +            long destClassesModified = new Date().getTime(); // Earliest mod time
  +            boolean allClassesFound  = true;           // Has each been found?
  +
  +            /*
  +             * Loop through each stub/skeleton class that must be generated, and
  +             * determine (if all exist) which file has the most recent timestamp
  +             */
  +            for (int i=0; i < classnames.length; i++) {
  +
  +                String pathToClass =
  +                        classnames[i].replace('.', File.separatorChar) + ".class";
  +                File classFile = new File(destDir, pathToClass);
  +
  +                /*
  +                 * Add each stub/skeleton class to the list of EJB files.  Note
  +                 * that each class is added even if it doesn't exist now.
  +                 */
  +                ejbFiles.put(pathToClass, classFile);
  +
  +                allClassesFound = allClassesFound && classFile.exists();
  +
  +                if (allClassesFound) {
  +                    long fileMod = classFile.lastModified();
  +
  +                    /* Keep track of the oldest modification timestamp */
  +                    destClassesModified = Math.min(destClassesModified, fileMod);
  +                }
  +            }
  +
  +            return (allClassesFound) ? destClassesModified : -1;
  +        }
  +
  +        /**
  +         * Builds an array of class names which represent the stubs and
  +         * skeletons which need to be generated for a given EJB.  The class
  +         * names are fully qualified.  Nine classes are generated for all EJBs
  +         * while an additional six classes are generated for beans requiring
  +         * RMI/IIOP access.
  +         *
  +         * @return An array of Strings representing the fully-qualified class
  +         *         names for the stubs and skeletons to be generated.
  +         */
  +        private String[] classesToGenerate() {
  +            String[] classnames = (iiop) ? new String[15] : new String[9];
  +
  +            final String remotePkg     = remote.getPackageName() + ".";
  +            final String remoteClass   = remote.getClassName();
  +            final String homePkg       = home.getPackageName() + ".";
  +            final String homeClass     = home.getClassName();
  +            final String implPkg       = implementation.getPackageName() + ".";
  +            final String implFullClass = implementation.getQualifiedWithUnderscores();
  +            int index = 0;
  +
  +            String fullPath;
  +
  +            classnames[index++] = implPkg + "ejb_fac_" + implFullClass;
  +            classnames[index++] = implPkg + "ejb_home_" + implFullClass;
  +            classnames[index++] = implPkg + "ejb_skel_" + implFullClass;
  +            classnames[index++] = remotePkg + "ejb_kcp_skel_" + remoteClass;
  +            classnames[index++] = homePkg + "ejb_kcp_skel_" + homeClass;
  +            classnames[index++] = remotePkg + "ejb_kcp_stub_" + remoteClass;
  +            classnames[index++] = homePkg + "ejb_kcp_stub_" + homeClass;
  +            classnames[index++] = remotePkg + "ejb_stub_" + remoteClass;
  +            classnames[index++] = homePkg + "ejb_stub_" + homeClass;
  +
  +            if (!iiop) {
  +                return classnames;
  +            }
  +
  +            classnames[index++] = remotePkg + "_" + remoteClass + "_Stub";
  +            classnames[index++] = homePkg + "_" + homeClass + "_Stub";
  +            classnames[index++] = remotePkg + "_ejb_RmiCorbaBridge_"
  +                                                        + remoteClass + "_Tie";
  +            classnames[index++] = homePkg + "_ejb_RmiCorbaBridge_" + homeClass
  +                                                        + "_Tie";
  +            classnames[index++] = remotePkg + "ejb_RmiCorbaBridge_"
  +                                                        + remoteClass;
  +            classnames[index++] = homePkg + "ejb_RmiCorbaBridge_" + homeClass;
  +
  +            return classnames;
  +        }
  +
  +        /**
  +         * Convenience method which creates a String representation of all the
  +         * instance variables of an EjbInfo object.
  +         *
  +         * @return A String representing the EjbInfo instance.
  +         */
  +        public String toString() {
  +            String s = "EJB name: " + name
  +                        + "\n\r              home:      " + home
  +                        + "\n\r              remote:    " + remote
  +                        + "\n\r              impl:      " + implementation
  +                        + "\n\r              beantype:  " + beantype
  +                        + "\n\r              cmp:       " + cmp
  +                        + "\n\r              iiop:      " + iiop
  +                        + "\n\r              hasession: " + hasession;
  +
  +            Iterator i = cmpDescriptors.iterator();
  +            while (i.hasNext()) {
  +                s += "\n\r              CMP Descriptor: " + i.next();
  +            }
  +
  +            return s;
  +        }
  +
  +    } // End of EjbInfo inner class
  +
  +    /**
  +     * Convenience class used to represent the fully qualified name of a Java
  +     * class.  It provides an easy way to retrieve components of the class name
  +     * in a format that is convenient for building iAS stubs and skeletons.
  +     *
  +     * @author Greg Nelson <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  +     */
  +    private class Classname {
  +        private String qualifiedName;  // Fully qualified name of the Java class
  +        private String packageName;    // Name of the package for this class
  +        private String className;      // Name of the class without the package
  +
  +        /**
  +         * This constructor builds an object which represents the name of a Java
  +         * class.
  +         *
  +         * @param qualifiedName String representing the fully qualified class
  +         *                      name of the Java class.
  +         */
  +        public Classname(String qualifiedName) {
  +            if (qualifiedName == null) {
  +                return;
  +            }
  +
  +            this.qualifiedName = qualifiedName;
  +
  +            int index = qualifiedName.lastIndexOf('.');
  +            if (index == -1) {
  +                className = qualifiedName;
  +                packageName = "";
  +            } else {
  +                packageName = qualifiedName.substring(0, index);
  +                className   = qualifiedName.substring(index + 1);
  +            }
  +        }
  +
  +        /**
  +         * Gets the fully qualified name of the Java class.
  +         *
  +         * @return String representing the fully qualified class name.
  +         */
  +        public String getQualifiedClassName() {
  +            return qualifiedName;
  +        }
  +
  +        /**
  +         * Gets the package name for the Java class.
  +         *
  +         * @return String representing the package name for the class.
  +         */
  +        public String getPackageName() {
  +            return packageName;
  +        }
  +
  +        /**
  +         * Gets the Java class name without the package structure.
  +         *
  +         * @return String representing the name for the class.
  +         */
  +        public String getClassName() {
  +            return className;
  +        }
  +
  +        /**
  +         * Gets the fully qualified name of the Java class with underscores
  +         * separating the components of the class name rather than periods.
  +         * This format is used in naming some of the stub and skeleton classes
  +         * for the iPlanet Application Server.
  +         *
  +         * @return String representing the fully qualified class name using
  +         *         underscores instead of periods.
  +         */
  +        public String getQualifiedWithUnderscores() {
  +            return qualifiedName.replace('.', '_');
  +        }
  +
  +        /**
  +         * Returns a File which references the class relative to the specified
  +         * directory.  Note that the class file may or may not exist.
  +         *
  +         * @param  directory A File referencing the base directory containing
  +         *                   class files.
  +         * @return File referencing this class.
  +         */
  +        public File getClassFile(File directory) {
  +            String pathToFile = qualifiedName.replace('.', File.separatorChar)
  +                                            + ".class";
  +            return new File(directory, pathToFile);
  +        }
  +
  +        /**
  +         * String representation of this class name.  It returns the fully
  +         * qualified class name.
  +         *
  +         * @return String representing the fully qualified class name.
  +         */
  +        public String toString() {
  +            return getQualifiedClassName();
  +        }
  +    }  // End of Classname inner class
  +
  +
  +    /**
  +     * Thread class used to redirect output from an <code>InputStream</code> to
  +     * the JRE standard output.  This class may be used to redirect output from
  +     * an external process to the standard output.
  +     *
  +     * @author Greg Nelson <a href="mailto:greg@netscape.com">greg@netscape.com</a>
  +     */
  +    private class RedirectOutput extends Thread {
  +        InputStream stream;  // Stream to read and redirect to standard output
  +
  +        /**
  +         * Constructs a new instance that will redirect output from the
  +         * specified stream to the standard output.
  +         *
  +         * @param stream InputStream which will be read and redirected to the
  +         *               standard output.
  +         */
  +        public RedirectOutput(InputStream stream) {
  +            this.stream = stream;
  +        }
  +
  +        /**
  +         * Reads text from the input stream and redirects it to standard output
  +         * using a separate thread.
  +         */
  +        public void run() {
  +            BufferedReader reader = new BufferedReader(
  +                                            new InputStreamReader(stream));
  +            String text;
  +            try {
  +                while ((text = reader.readLine()) != null) {
  +                    System.out.println(text);
  +                }
  +            } catch (IOException e) {
  +                e.printStackTrace();
  +            } finally {
  +                try {
  +                    reader.close();
  +                } catch (IOException e) {
  +                    // Do nothing
  +                }
  +            }
  +        }
  +    }  // End of RedirectOutput inner class
   
  -}        
  -        
  \ No newline at end of file
  +}
  
  
  
  1.2       +166 -166  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
  
  Index: IPlanetEjbcTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IPlanetEjbcTask.java	2001/05/01 10:31:48	1.1
  +++ IPlanetEjbcTask.java	2001/11/27 18:04:52	1.2
  @@ -67,34 +67,34 @@
   import org.apache.tools.ant.BuildException;
   
   /**
  - * Task to compile EJB stubs and skeletons for the iPlanet Application Server. 
  + * Task to compile EJB stubs and skeletons for the iPlanet Application Server.
    * The EJBs to be processed are specified by the EJB 1.1 standard XML
  - * descriptor, and additional attributes are obtained from the iPlanet Application 
  - * Server-specific XML descriptor.  Since the XML descriptors can include 
  - * multiple EJBs, this is a convenient way of specifying many EJBs in a single 
  + * descriptor, and additional attributes are obtained from the iPlanet Application
  + * Server-specific XML descriptor.  Since the XML descriptors can include
  + * multiple EJBs, this is a convenient way of specifying many EJBs in a single
    * Ant task.  The following attributes are allowed:
    *   <ul>
    *     <li><i>ejbdescriptor</i> -- Standard EJB 1.1 XML descriptor (typically
  - *                                 titled "ejb-jar.xml").  This attribute is 
  + *                                 titled "ejb-jar.xml").  This attribute is
    *                                 required.
    *     <li><i>iasdescriptor</i> -- EJB XML descriptor for iPlanet Application
  - *                                 Server (typically titled "ias-ejb-jar.xml).  
  + *                                 Server (typically titled "ias-ejb-jar.xml).
    *                                 This attribute is required.
  - *     <li><i>dest</i> -- The is the base directory where the RMI stubs and 
  + *     <li><i>dest</i> -- The is the base directory where the RMI stubs and
    *                        skeletons are written.  In addition, the class files
    *                        for each bean (home interface, remote interface, and
    *                        EJB implementation) must be found in this directory.
    *                        This attribute is required.
    *     <li><i>classpath</i> -- The classpath used when generating EJB stubs and
  - *                             skeletons.  This is an optional attribute (if 
  - *                             omitted, the classpath specified when Ant was 
  - *                             started will be used).  Nested "classpath" 
  + *                             skeletons.  This is an optional attribute (if
  + *                             omitted, the classpath specified when Ant was
  + *                             started will be used).  Nested "classpath"
    *                             elements may also be used.
  - *     <li><i>keepgenerated</i> -- Indicates whether or not the Java source 
  - *                                 files which are generated by ejbc will be 
  - *                                 saved or automatically deleted.  If "yes", 
  - *                                 the source files will be retained.  This is 
  - *                                 an optional attribute (if omitted, it 
  + *     <li><i>keepgenerated</i> -- Indicates whether or not the Java source
  + *                                 files which are generated by ejbc will be
  + *                                 saved or automatically deleted.  If "yes",
  + *                                 the source files will be retained.  This is
  + *                                 an optional attribute (if omitted, it
    *                                 defaults to "no").
    *     <li><i>debug</i> -- Indicates whether or not the ejbc utility should
    *                         log additional debugging statements to the standard
  @@ -102,18 +102,18 @@
    *                         will be generated (if omitted, it defaults to "no").
    *     <li><i>iashome</i> -- May be used to specify the "home" directory for
    *                           this iPlanet Application Server installation.  This
  - *                           is used to find the ejbc utility if it isn't 
  - *                           included in the user's system path.  This is an 
  - *                           optional attribute (if specified, it should refer 
  + *                           is used to find the ejbc utility if it isn't
  + *                           included in the user's system path.  This is an
  + *                           optional attribute (if specified, it should refer
    *                           to the <code>[install-location]/iplanet/ias6/ias
  - *                           </code> directory).  If omitted, the ejbc utility 
  + *                           </code> directory).  If omitted, the ejbc utility
    *                           must be on the user's system path.
    *   </ul>
    * <p>
    * For each EJB specified, this task will locate the three classes that comprise
    * the EJB.  If these class files cannot be located in the <code>dest</code>
  - * directory, the task will fail.  The task will also attempt to locate the EJB 
  - * stubs and skeletons in this directory.  If found, the timestamps on the 
  + * directory, the task will fail.  The task will also attempt to locate the EJB
  + * stubs and skeletons in this directory.  If found, the timestamps on the
    * stubs and skeletons will be checked to ensure they are up to date.  Only if
    * these files cannot be found or if they are out of date will ejbc be called
    * to generate new stubs and skeletons.
  @@ -123,42 +123,42 @@
    */
   public class IPlanetEjbcTask extends Task {
   
  -	/* Attributes set by the Ant build file */
  -	private File    ejbdescriptor;
  -	private File    iasdescriptor;
  -	private File    dest;
  -	private Path    classpath;
  -	private boolean keepgenerated = false;
  -	private boolean debug         = false;
  -	private File    iashome;
  +    /* Attributes set by the Ant build file */
  +    private File    ejbdescriptor;
  +    private File    iasdescriptor;
  +    private File    dest;
  +    private Path    classpath;
  +    private boolean keepgenerated = false;
  +    private boolean debug         = false;
  +    private File    iashome;
   
       /**
        * Sets the location of the standard XML EJB descriptor.  Typically, this
  -	 * file is named "ejb-jar.xml".
  -	 *
  -	 * @param ejbdescriptor The name and location of the EJB descriptor.
  -     */
  -	public void setEjbdescriptor(File ejbdescriptor) {
  -		this.ejbdescriptor = ejbdescriptor;
  -	}
  -
  -    /**
  -     * Sets the location of the iAS-specific XML EJB descriptor.  Typically, 
  -	 * this file is named "ias-ejb-jar.xml".
  -	 *
  -	 * @param iasdescriptor The name and location of the iAS-specific EJB 
  -	 *                      descriptor.
  -     */
  -	public void setIasdescriptor (File iasdescriptor) {
  -		this.iasdescriptor = iasdescriptor;
  -	}
  +     * file is named "ejb-jar.xml".
  +     *
  +     * @param ejbdescriptor The name and location of the EJB descriptor.
  +     */
  +    public void setEjbdescriptor(File ejbdescriptor) {
  +        this.ejbdescriptor = ejbdescriptor;
  +    }
   
       /**
  +     * Sets the location of the iAS-specific XML EJB descriptor.  Typically,
  +     * this file is named "ias-ejb-jar.xml".
  +     *
  +     * @param iasdescriptor The name and location of the iAS-specific EJB
  +     *                      descriptor.
  +     */
  +    public void setIasdescriptor (File iasdescriptor) {
  +        this.iasdescriptor = iasdescriptor;
  +    }
  +
  +    /**
        * Sets the destination directory where the EJB "source" classes must exist
  -	 * and where the stubs and skeletons will be written.  The destination 
  -	 * directory must exist before this task is executed.
  -	 *
  -	 * @param dest The directory where the compiled classes will be written.
  +     * and where the stubs and skeletons will be written.  The destination
  +     * directory must exist before this task is executed.
  +     *
  +     * @param dest The directory where the compiled classes will be written.
        */
       public void setDest(File dest) {
           this.dest = dest;
  @@ -166,8 +166,8 @@
   
       /**
        * Sets the classpath to be used when compiling the EJB stubs and skeletons.
  -	 *
  -	 * @param classpath The classpath to be used.
  +     *
  +     * @param classpath The classpath to be used.
        */
       public void setClasspath(Path classpath) {
           if (this.classpath == null) {
  @@ -188,107 +188,107 @@
       }
   
       /**
  -     * Sets whether or not the Java source files which are generated by the 
  -	 * ejbc process should be retained or automatically deleted.
  -	 *
  -	 * @param keepgenerated A boolean indicating if the Java source files for
  -	 *                      the stubs and skeletons should be retained.
  -     */
  -	public void setKeepgenerated(boolean keepgenerated) {
  -		this.keepgenerated = keepgenerated;
  -	}
  +     * Sets whether or not the Java source files which are generated by the
  +     * ejbc process should be retained or automatically deleted.
  +     *
  +     * @param keepgenerated A boolean indicating if the Java source files for
  +     *                      the stubs and skeletons should be retained.
  +     */
  +    public void setKeepgenerated(boolean keepgenerated) {
  +        this.keepgenerated = keepgenerated;
  +    }
   
       /**
        * Sets whether or not debugging output will be generated when ejbc is
  -	 * executed.
  -	 *
  -	 * @param debug A boolean indicating if debugging output should be generated
  -     */
  -	public void setDebug(boolean debug) {
  -		this.debug = debug;
  -	}
  -	
  +     * executed.
  +     *
  +     * @param debug A boolean indicating if debugging output should be generated
  +     */
  +    public void setDebug(boolean debug) {
  +        this.debug = debug;
  +    }
  +
       /**
        * Setter method used to store the "home" directory of the user's iAS
  -	 * installation.  The directory specified should typically be
  -	 * <code>[install-location]/iplanet/ias6/ias</code>.
  -	 *
  +     * installation.  The directory specified should typically be
  +     * <code>[install-location]/iplanet/ias6/ias</code>.
  +     *
        * @param iashome The home directory for the user's iAS installation.
        */
  -	public void setIashome(File iashome) {
  -		this.iashome = iashome;
  -	}
  +    public void setIashome(File iashome) {
  +        this.iashome = iashome;
  +    }
   
       /**
        * Does the work.
        */
       public void execute() throws BuildException {
  -		checkConfiguration();
  +        checkConfiguration();
  +
  +        executeEjbc(getParser());
  +    }
   
  -		executeEjbc(getParser());
  -	}
  -	
       /**
        * Verifies that the user selections are valid.
  -	 *
  -	 * @throws BuildException If the user selections are invalid.
  +     *
  +     * @throws BuildException If the user selections are invalid.
        */
  -	private void checkConfiguration() throws BuildException {
  +    private void checkConfiguration() throws BuildException {
  +
  +        if (ejbdescriptor == null) {
  +            String msg = "The standard EJB descriptor must be specified using "
  +                            + "the \"ejbdescriptor\" attribute.";
  +            throw new BuildException(msg, location);
  +        }
  +        if ((!ejbdescriptor.exists()) || (!ejbdescriptor.isFile())) {
  +            String msg = "The standard EJB descriptor (" + ejbdescriptor
  +                            + ") was not found or isn't a file.";
  +            throw new BuildException(msg, location);
  +        }
   
  -		if (ejbdescriptor == null) {
  -			String msg = "The standard EJB descriptor must be specified using "
  -							+ "the \"ejbdescriptor\" attribute.";
  -			throw new BuildException(msg, location);
  -		}
  -		if ((!ejbdescriptor.exists()) || (!ejbdescriptor.isFile())) {
  -			String msg = "The standard EJB descriptor (" + ejbdescriptor 
  -							+ ") was not found or isn't a file.";
  -			throw new BuildException(msg, location);
  -		}
  -
  -		if (iasdescriptor == null) {
  -			String msg = "The iAS-speific XML descriptor must be specified using"
  -							+ " the \"iasdescriptor\" attribute.";
  -			throw new BuildException(msg, location);
  -		}
  -		if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile())) {
  -			String msg = "The iAS-specific XML descriptor (" + iasdescriptor 
  -							+ ") was not found or isn't a file.";
  -			throw new BuildException(msg, location);
  -		}
  -
  -		if (dest == null) {
  -			String msg = "The destination directory must be specified using "
  -							+ "the \"dest\" attribute.";
  -			throw new BuildException(msg, location);
  -		}
  -		if ((!dest.exists()) || (!dest.isDirectory())) {
  -			String msg = "The destination directory (" + dest + ") was not "
  -							+ "found or isn't a directory.";
  -			throw new BuildException(msg, location);
  -		}
  -
  -		if ((iashome != null) && (!iashome.isDirectory())) {
  -			String msg = "If \"iashome\" is specified, it must be a valid "
  -							+ "directory (it was set to " + iashome + ").";
  -			throw new BuildException(msg, getLocation());
  -		}
  -	}
  +        if (iasdescriptor == null) {
  +            String msg = "The iAS-speific XML descriptor must be specified using"
  +                            + " the \"iasdescriptor\" attribute.";
  +            throw new BuildException(msg, location);
  +        }
  +        if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile())) {
  +            String msg = "The iAS-specific XML descriptor (" + iasdescriptor
  +                            + ") was not found or isn't a file.";
  +            throw new BuildException(msg, location);
  +        }
  +
  +        if (dest == null) {
  +            String msg = "The destination directory must be specified using "
  +                            + "the \"dest\" attribute.";
  +            throw new BuildException(msg, location);
  +        }
  +        if ((!dest.exists()) || (!dest.isDirectory())) {
  +            String msg = "The destination directory (" + dest + ") was not "
  +                            + "found or isn't a directory.";
  +            throw new BuildException(msg, location);
  +        }
   
  +        if ((iashome != null) && (!iashome.isDirectory())) {
  +            String msg = "If \"iashome\" is specified, it must be a valid "
  +                            + "directory (it was set to " + iashome + ").";
  +            throw new BuildException(msg, getLocation());
  +        }
  +    }
  +
       /**
        * Returns a SAXParser that may be used to process the XML descriptors.
  -	 *
  -	 * @return Parser which may be used to process the EJB descriptors.
  -	 * @throws BuildException If the parser cannot be created or configured.
  +     *
  +     * @return Parser which may be used to process the EJB descriptors.
  +     * @throws BuildException If the parser cannot be created or configured.
        */
  -	private SAXParser getParser() throws BuildException {
  +    private SAXParser getParser() throws BuildException {
   
  -		SAXParser saxParser = null;
  -		try {
  +        SAXParser saxParser = null;
  +        try {
               SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
               saxParserFactory.setValidating(true);
               saxParser = saxParserFactory.newSAXParser();
  -		} catch (SAXException e) {
  +        } catch (SAXException e) {
               String msg = "Unable to create a SAXParser: " + e.getMessage();
               throw new BuildException(msg, e, location);
           }
  @@ -297,57 +297,57 @@
               throw new BuildException(msg, e, location);
           }
   
  -		return saxParser;
  -	}
  +        return saxParser;
  +    }
   
       /**
        * Executes the EJBc utility using the SAXParser provided.
  -	 *
  -	 * @param saxParser SAXParser that may be used to process the EJB
  -	 *                  descriptors
  -	 * @throws BuildException If there is an error reading or parsing the XML 
  -	 *                        descriptors 
  -     */
  -	private void executeEjbc(SAXParser saxParser) throws BuildException {
  -		IPlanetEjbc ejbc = new IPlanetEjbc(ejbdescriptor,
  -											iasdescriptor,
  -											dest,
  -											getClasspath().toString(),
  -											saxParser);
  -		ejbc.setRetainSource(keepgenerated);
  -		ejbc.setDebugOutput(debug);
  -		if (iashome != null) {
  -			ejbc.setIasHomeDir(iashome);
  -		}
  -
  -		try {
  -			ejbc.execute();
  -		} catch (IOException e) {
  +     *
  +     * @param saxParser SAXParser that may be used to process the EJB
  +     *                  descriptors
  +     * @throws BuildException If there is an error reading or parsing the XML
  +     *                        descriptors
  +     */
  +    private void executeEjbc(SAXParser saxParser) throws BuildException {
  +        IPlanetEjbc ejbc = new IPlanetEjbc(ejbdescriptor,
  +                                            iasdescriptor,
  +                                            dest,
  +                                            getClasspath().toString(),
  +                                            saxParser);
  +        ejbc.setRetainSource(keepgenerated);
  +        ejbc.setDebugOutput(debug);
  +        if (iashome != null) {
  +            ejbc.setIasHomeDir(iashome);
  +        }
  +
  +        try {
  +            ejbc.execute();
  +        } catch (IOException e) {
               String msg = "An IOException occurred while trying to read the XML "
  -							+ "descriptor file: " + e.getMessage();
  +                            + "descriptor file: " + e.getMessage();
               throw new BuildException(msg, e, location);
           } catch (SAXException e) {
               String msg = "A SAXException occurred while trying to read the XML "
  -							+ "descriptor file: " + e.getMessage();
  +                            + "descriptor file: " + e.getMessage();
               throw new BuildException(msg, e, location);
           } catch (IPlanetEjbc.EjbcException e) {
               String msg = "An exception occurred while trying to run the ejbc "
  -							+ "utility: " + e.getMessage();
  +                            + "utility: " + e.getMessage();
               throw new BuildException(msg, e, location);
           }
  -	}
  +    }
   
       /**
        * Returns the CLASSPATH to be used when calling EJBc.  If no user CLASSPATH
  -	 * is specified, the System classpath is returned instead.
  -	 *
  -	 * @return Path The classpath to be used for EJBc.
  -	 */
  -	private Path getClasspath() {
  -		if (classpath == null) {
  -			classpath = Path.systemClasspath;
  -		}
  +     * is specified, the System classpath is returned instead.
  +     *
  +     * @return Path The classpath to be used for EJBc.
  +     */
  +    private Path getClasspath() {
  +        if (classpath == null) {
  +            classpath = Path.systemClasspath;
  +        }
   
  -		return classpath;
  -	}
  +        return classpath;
  +    }
   }
  
  
  
  1.4       +14 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntTool.java
  
  Index: VAJAntTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntTool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VAJAntTool.java	2001/10/28 21:30:20	1.3
  +++ VAJAntTool.java	2001/11/27 18:04:52	1.4
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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 
  + *    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"
  @@ -73,20 +73,20 @@
   public class VAJAntTool {
       private final static String TOOL_DATA_KEY = "AntTool";
   
  -	
  +
       /**
        * Loads the BuildInfo for the specified VAJ project from the
        * tool data for this project.
        * If there is no build info stored for that project, a new
        * default BuildInfo is returned
  -     * 
  +     *
        * @return BuildInfo buildInfo build info for the specified project
        * @param projectName String project name
        */
       public static VAJBuildInfo loadBuildData(String projectName) {
           VAJBuildInfo result = null;
           try {
  -            Project project = 
  +            Project project =
                   VAJLocalUtil.getWorkspace().loadedProjectNamed( projectName );
               if ( project.testToolRepositoryData(TOOL_DATA_KEY) ) {
                   ToolData td = project.getToolRepositoryData(TOOL_DATA_KEY);
  @@ -97,7 +97,7 @@
               }
               result.setVAJProjectName( projectName );
           } catch (Throwable t) {
  -            throw new BuildException("BuildInfo for Project " 
  +            throw new BuildException("BuildInfo for Project "
                                        + projectName + " could not be loaded" + t);
           }
           return result;
  @@ -108,7 +108,7 @@
        * Starts the application.
        *
        * @param args an array of command-line arguments. VAJ puts the
  -     *             VAJ project name into args[1] when starting the 
  +     *             VAJ project name into args[1] when starting the
        *             tool from the project context menu
        */
       public static void main(java.lang.String[] args) {
  @@ -117,11 +117,11 @@
               if ( args.length >= 2 && args[1] instanceof String ) {
                   String projectName = (String)args[1];
                   info = loadBuildData( projectName );
  -            } 
  +            }
               else {
                   info = new VAJBuildInfo();
               }
  -	
  +
               VAJAntToolGUI mainFrame = new VAJAntToolGUI( info );
               mainFrame.show();
           } catch ( Throwable t ) {
  @@ -141,10 +141,10 @@
           String data = info.asDataString();
           try {
               ToolData td = new ToolData( TOOL_DATA_KEY, data );
  -            VAJLocalUtil.getWorkspace().loadedProjectNamed( 
  +            VAJLocalUtil.getWorkspace().loadedProjectNamed(
                                                              info.getVAJProjectName() ).setToolRepositoryData( td );
           } catch (Throwable t) {
  -            throw new BuildException("BuildInfo for Project " 
  +            throw new BuildException("BuildInfo for Project "
                                        + info.getVAJProjectName() + " could not be saved", t);
           }
       }
  
  
  
  1.3       +39 -39    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
  
  Index: VAJAntToolGUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJAntToolGUI.java	2001/10/25 12:37:31	1.2
  +++ VAJAntToolGUI.java	2001/11/27 18:04:52	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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 
  + *    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"
  @@ -95,14 +95,14 @@
   import org.apache.tools.ant.Project;
   
   /**
  - * This is a simple grafical user interface to provide the information needed 
  + * This is a simple grafical user interface to provide the information needed
    * by ANT and to start the build-process within IBM VisualAge for Java.
    * <p>
  - * I was using AWT to make it independent from the JDK-version. Please don't 
  - * ask me for a Swing-version:I am very familiar with Swing and I really think 
  + * I was using AWT to make it independent from the JDK-version. Please don't
  + * ask me for a Swing-version:I am very familiar with Swing and I really think
    * that it's not necessary for such a simple gui!
    * <p>
  - * It is completely developed in VAJ using the visual composition editor. 
  + * It is completely developed in VAJ using the visual composition editor.
    * About 90% of the code is generated by VAJ,
    * but in fact I did a lot of <i>code-beautification</i> ;-).
    * <p>
  @@ -111,7 +111,7 @@
    */
   public class VAJAntToolGUI extends Frame {
       /**
  -     * Members 
  +     * Members
        */
       private VAJBuildLogger logger = new VAJBuildLogger();
       private String lineSeparator = "\r\n";
  @@ -138,7 +138,7 @@
       // Project name
       private Label iProjectLabel = null;
       private Label iProjectText = null;
  -    // XML-file 
  +    // XML-file
       private Label iBuildFileLabel = null;
       private TextField iBuildFileTextField = null;
       private boolean iConnPtoP2Aligning = false;
  @@ -151,7 +151,7 @@
       private List iTargetList = null;
       // Command-buttons
       private Button iBuildButton = null;
  -    private Button iReloadButton = null;	
  +    private Button iReloadButton = null;
       private Button iCloseButton = null;
       /**
        * log-Window
  @@ -180,7 +180,7 @@
       private Button iAboutOkButton = null;
   
       /**
  -     * This internal BuildLogger, to be honest, is just a BuildListener. 
  +     * This internal BuildLogger, to be honest, is just a BuildListener.
        * It does nearly the same as the DefaultLogger, but uses the Loggin-Window for output.
        */
       private class VAJBuildLogger implements BuildListener {
  @@ -203,7 +203,7 @@
               getStopButton().setEnabled(false);
               getBuildButton().setEnabled(true);
               getBuildButton().requestFocus();
  -			
  +
               Throwable error = event.getException();
   
               if (error == null) {
  @@ -235,7 +235,7 @@
                   error.printStackTrace(System.err);
               }
           }
  -		
  +
           /**
            *  Fired before any targets are started.
            */
  @@ -300,7 +300,7 @@
           public void taskStarted(BuildEvent event) {
           }
       }
  -	
  +
       /**
        * Eventhandler to handle all AWT-events
        */
  @@ -320,7 +320,7 @@
                           getBuildFileTextField().setText(getFileDialog().getDirectory() + getFileDialog().getFile());
                       }
                   }
  -                // dispose and exit application 
  +                // dispose and exit application
                   if (e.getSource() == VAJAntToolGUI.this.getCloseButton()) {
                       dispose();
                       System.exit(0);
  @@ -344,21 +344,21 @@
                       }
                   }
                   // MenuItems
  -                if (e.getSource() == VAJAntToolGUI.this.getSaveMenuItem()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getSaveMenuItem())
                       saveBuildInfo();
  -                if (e.getSource() == VAJAntToolGUI.this.getAboutMenuItem()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getAboutMenuItem())
                       getAboutDialog().show();
  -                if (e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem())
                       getMessageFrame().show();
                   /* #### About dialog #### */
  -                if (e.getSource() == VAJAntToolGUI.this.getAboutOkButton()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getAboutOkButton())
                       getAboutDialog().dispose();
                   /* #### Log frame #### */
                   if (e.getSource() == VAJAntToolGUI.this.getMessageOkButton())
                       getMessageFrame().dispose();
  -                if (e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton())
                       getMessageTextArea().setText("");
  -                if (e.getSource() == VAJAntToolGUI.this.getMessageOkButton()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getMessageOkButton())
                       getMessageFrame().dispose();
               }
               catch (Throwable exc) {
  @@ -371,36 +371,36 @@
            */
           public void itemStateChanged(ItemEvent e) {
               try {
  -                if (e.getSource() == VAJAntToolGUI.this.getTargetList()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getTargetList())
                       getBuildButton().setEnabled(true);
  -                if (e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice())
                       getBuildInfo().setOutputMessageLevel(getMessageOutputLevelChoice().getSelectedIndex());
  -                if (e.getSource() == VAJAntToolGUI.this.getTargetList()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getTargetList())
                       getBuildInfo().setTarget(getTargetList().getSelectedItem());
               }
               catch (Throwable exc) {
                   handleException(exc);
               }
           }
  -		
  +
           /**
            * PropertyChangeListener method
            */
           public void propertyChange(java.beans.PropertyChangeEvent evt) {
  -            if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && (evt.getPropertyName().equals("projectName"))) 
  +            if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && (evt.getPropertyName().equals("projectName")))
                   connectProjectNameToLabel();
  -            if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && (evt.getPropertyName().equals("buildFileName"))) 
  +            if (evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && (evt.getPropertyName().equals("buildFileName")))
                   connectBuildFileNameToTextField();
           }
  -		
  +
           /**
            * TextListener method
            */
           public void textValueChanged(TextEvent e) {
  -            if (e.getSource() == VAJAntToolGUI.this.getBuildFileTextField()) 
  +            if (e.getSource() == VAJAntToolGUI.this.getBuildFileTextField())
                   connectTextFieldToBuildFileName();
           }
  -		
  +
           /**
            * WindowListener methods
            */
  @@ -410,9 +410,9 @@
                       dispose();
                       System.exit(0);
                   }
  -                if (e.getSource() == VAJAntToolGUI.this.getAboutDialog()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getAboutDialog())
                       getAboutDialog().dispose();
  -                if (e.getSource() == VAJAntToolGUI.this.getMessageFrame()) 
  +                if (e.getSource() == VAJAntToolGUI.this.getMessageFrame())
                       getMessageFrame().dispose();
               }
               catch (Throwable exc) {
  @@ -426,7 +426,7 @@
           public void windowIconified(WindowEvent e) {};
           public void windowOpened(WindowEvent e) {};
       }
  -	
  +
       /**
        * AntMake default-constructor.
        */
  @@ -438,7 +438,7 @@
        * AntMake constructor called by VAJAntTool integration.
        * @param buildInfo VAJBuildInfo
        */
  -	 
  +
       public VAJAntToolGUI(VAJBuildInfo newBuildInfo) {
           super();
           setBuildInfo(newBuildInfo);
  @@ -503,12 +503,12 @@
        * external build of a .jar-file
        */
       private void executeTarget() {
  -        try	{
  +        try {
               getMessageFrame().show();
               getBuildInfo().executeProject(logger);
           }
           catch (Throwable exc) {
  -            logger.logException( exc );			
  +            logger.logException( exc );
           }
           return;
       }
  @@ -1293,7 +1293,7 @@
   
           getMessageTextArea().append(lineSeparator + lineSeparator + trace);
           getMessageFrame().show();
  -		
  +
       }
       /**
        * Initializes connections
  
  
  
  1.4       +26 -27    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java
  
  Index: VAJBuildInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VAJBuildInfo.java	2001/10/28 21:30:21	1.3
  +++ VAJBuildInfo.java	2001/11/27 18:04:52	1.4
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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 
  + *    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"
  @@ -54,7 +54,7 @@
   
   package org.apache.tools.ant.taskdefs.optional.ide;
   
  - 
  +
   import java.util.Vector;
   import java.util.Enumeration;
   import java.util.StringTokenizer;
  @@ -80,7 +80,7 @@
    *   execute target)
    * - manages a seperate thread for Ant project execution
    *   this allows interrupting a running build from a GUI
  - *    
  + *
    * @author Wolf Siberski, TUI Infotec GmbH
    */
   
  @@ -102,7 +102,7 @@
       private class InterruptedChecker implements BuildListener {
           // the real listener
           BuildListener wrappedListener;
  -		
  +
           /**
            * Can only be constructed as wrapper around a real listener
            * @param listener the real listener
  @@ -182,11 +182,10 @@
               checkInterrupted();
           }
       }
  -	
  -	
  +
       // name of the VA project this BuildInfo belongs to
       private String vajProjectName = "";
  -	
  +
       // name of the Ant build file
       private String buildFileName = "";
   
  @@ -208,30 +207,30 @@
       // Support for bound properties
       protected transient PropertyChangeSupport propertyChange;
   
  -    // thread for Ant build execution 
  +    // thread for Ant build execution
       private Thread buildThread;
   
       // the listener used to log output.
       private BuildListener projectLogger;
  +
   
  -		
       /**
  -     * The addPropertyChangeListener method was generated to support the 
  +     * The addPropertyChangeListener method was generated to support the
        * propertyChange field.
        */
       public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
           getPropertyChange().addPropertyChangeListener(listener);
       }
  -	
  +
       /**
        * Returns the BuildInfo information as String. The BuildInfo can
        * be rebuilt from that String by calling parse().
        * @return java.lang.String
        */
       public String asDataString() {
  -        String result = getOutputMessageLevel() + "|" + getBuildFileName() 
  +        String result = getOutputMessageLevel() + "|" + getBuildFileName()
               + "|" + getTarget();
  -        for ( Enumeration e = getProjectTargets().elements(); 
  +        for ( Enumeration e = getProjectTargets().elements();
                 e.hasMoreElements(); ) {
               result = result + "|" + e.nextElement();
           }
  @@ -286,14 +285,14 @@
           }
           return project;
       }
  -	
  +
       /**
        * return a list of all targets in the current buildfile
        */
       public Vector getProjectTargets() {
           return projectTargets;
       }
  -	
  +
       /**
        * Accessor for the propertyChange field.
        */
  @@ -373,13 +372,13 @@
       }
   
       /**
  -     * The removePropertyChangeListener method was generated 
  +     * The removePropertyChangeListener method was generated
        * to support the propertyChange field.
        */
       public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
           getPropertyChange().removePropertyChangeListener(listener);
       }
  -	
  +
       /**
        * Sets the build file name
        * @param buildFileName build file name
  @@ -390,7 +389,7 @@
           setProjectInitialized(false);
           firePropertyChange("buildFileName", oldValue, buildFileName);
       }
  -	
  +
       /**
        * Sets the log level (value must be one of the constants in Project)
        * @param outputMessageLevel log level.
  @@ -398,7 +397,7 @@
       public void setOutputMessageLevel(int newOutputMessageLevel) {
           int oldValue = outputMessageLevel;
           outputMessageLevel = newOutputMessageLevel;
  -        firePropertyChange("outputMessageLevel", 
  +        firePropertyChange("outputMessageLevel",
                              new Integer(oldValue), new Integer(outputMessageLevel));
       }
   
  @@ -410,7 +409,7 @@
           int level = Integer.parseInt( outputMessageLevel );
           setOutputMessageLevel( level );
       }
  -	
  +
       /**
        * sets the initialized flag
        */
  @@ -461,7 +460,7 @@
   
   
       /**
  -     * cancels a build. 
  +     * cancels a build.
        */
       public void cancelBuild() {
           buildThread.interrupt();
  @@ -484,7 +483,7 @@
           } catch (Error err) {
               error = err;
               throw err;
  -        } 
  +        }
       }
   
       /**
  @@ -501,7 +500,7 @@
                   if (!isProjectInitialized()) {
                       initProject();
                   }
  -		
  +
                   project.addBuildListener( ic );
                   project.executeTarget(target);
   
  
  
  
  1.6       +133 -133  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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- VAJExport.java	2001/10/25 12:37:31	1.5
  +++ VAJExport.java	2001/11/27 18:04:52	1.6
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -51,7 +51,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  - 
  +
   package org.apache.tools.ant.taskdefs.optional.ide;
   
   
  @@ -61,21 +61,21 @@
   import org.apache.tools.ant.types.PatternSet;
   
   /**
  - * Export packages from the Visual Age for Java workspace. 
  - * The packages are specified similar to all other MatchingTasks. 
  - * Since the VA Workspace is not file based, this task is simulating 
  + * Export packages from the Visual Age for Java workspace.
  + * The packages are specified similar to all other MatchingTasks.
  + * Since the VA Workspace is not file based, this task is simulating
    * a directory hierarchy for the workspace:
  - * The 'root' contains all project 'dir's, and the projects contain 
  + * The 'root' contains all project 'dir's, and the projects contain
    * their respective package 'dir's.
  - * Example:  
  - * <blockquote> 
  + * Example:
  + * <blockquote>
    * &lt;vajexport destdir="C:/builddir/source">
    * &nbsp;&lt;include name="/MyVAProject/org/foo/subsystem1/**" />
    * &nbsp;&lt;exclude name="/MyVAProject/org/foo/subsystem1/test/**"/>
    * &lt;/vajexport>
    * </blockquote>
    * exports all packages in the project MyVAProject which start with
  - * 'org.foo.subsystem1' except of these starting with 
  + * 'org.foo.subsystem1' except of these starting with
    * 'org.foo.subsystem1.test'.
    *
    * There are flags to choose which items to export:
  @@ -89,124 +89,124 @@
    */
   
   public class VAJExport extends VAJTask {
  -		//set set... method comments for description
  -	protected File destDir;
  -	protected boolean exportSources = true;
  -	protected boolean exportResources = true;
  -	protected boolean exportClasses = false;
  -	protected boolean exportDebugInfo = false;
  -	protected boolean useDefaultExcludes = true;
  -	protected boolean overwrite = 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!");
  -		}
  -
  -		// delegate the export to the VAJUtil object.
  -		getUtil().exportPackages(destDir,
  -			patternSet.getIncludePatterns(getProject()),
  -			patternSet.getExcludePatterns(getProject()),
  -		    exportClasses, exportDebugInfo, 
  -		    exportResources, exportSources,  
  -		    useDefaultExcludes, overwrite);
  -	}
  -
  -	/**
  -	 * 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 selected
  -	 * items should be exported
  -	 */
  -	public void setDestdir(File destDir) {
  -		this.destDir = destDir;
  -	}
  -
  -	/**
  -	 * Sets the set of exclude patterns. Patterns may be separated by a comma
  -	 * or a space. Currently only patterns denoting packages are
  -	 * supported
  -	 *
  -	 * @param excludes the string containing the exclude patterns
  -	 */
  -	public void setExcludes(String excludes) {
  -		patternSet.setExcludes(excludes);
  -	}
  -
  -	/**
  -	 * if exportClasses is set, class files are exported
  -	 */
  -	public void setExportClasses(boolean doExport) {
  -		exportClasses = doExport;
  -	}
  -
  -	/**
  -	 * if exportDebugInfo is set, the exported class files contain
  -	 * debug info
  -	 */
  -	public void setExportDebugInfo(boolean doExport) {
  -		exportDebugInfo = doExport;
  -	}
  -
  -	/**
  -	 * if exportResources is set, resource file will be exported
  -	 */
  -	public void setExportResources(boolean doExport) {
  -		exportResources = doExport;
  -	}
  -
  -	/**
  -	 * if exportSources is set, java files will be exported
  -	 */
  -	public void setExportSources(boolean doExport) {
  -		exportSources = doExport;
  -	}
  -
  -	/**
  -	 * Sets the set of include patterns. Patterns may be separated by a comma
  -	 * or a space.Currently only patterns denoting packages are
  -	 * supported
  -	 *
  -	 * @param includes the string containing the include patterns
  -	 */
  -	public void setIncludes(String includes) {
  -		patternSet.setIncludes(includes);
  -	}
  -
  -	/**
  -	 * if Overwrite is set, files will be overwritten during export
  -	 */
  -	public void setOverwrite(boolean doOverwrite) {
  -		overwrite = doOverwrite;
  -	}
  -	
  +    //set set... method comments for description
  +    protected File destDir;
  +    protected boolean exportSources = true;
  +    protected boolean exportResources = true;
  +    protected boolean exportClasses = false;
  +    protected boolean exportDebugInfo = false;
  +    protected boolean useDefaultExcludes = true;
  +    protected boolean overwrite = 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!");
  +        }
  +
  +        // delegate the export to the VAJUtil object.
  +        getUtil().exportPackages(destDir,
  +            patternSet.getIncludePatterns(getProject()),
  +            patternSet.getExcludePatterns(getProject()),
  +            exportClasses, exportDebugInfo,
  +            exportResources, exportSources,
  +            useDefaultExcludes, overwrite);
  +    }
  +
  +    /**
  +     * 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 selected
  +     * items should be exported
  +     */
  +    public void setDestdir(File destDir) {
  +        this.destDir = destDir;
  +    }
  +
  +    /**
  +     * Sets the set of exclude patterns. Patterns may be separated by a comma
  +     * or a space. Currently only patterns denoting packages are
  +     * supported
  +     *
  +     * @param excludes the string containing the exclude patterns
  +     */
  +    public void setExcludes(String excludes) {
  +        patternSet.setExcludes(excludes);
  +    }
  +
  +    /**
  +     * if exportClasses is set, class files are exported
  +     */
  +    public void setExportClasses(boolean doExport) {
  +        exportClasses = doExport;
  +    }
  +
  +    /**
  +     * if exportDebugInfo is set, the exported class files contain
  +     * debug info
  +     */
  +    public void setExportDebugInfo(boolean doExport) {
  +        exportDebugInfo = doExport;
  +    }
  +
  +    /**
  +     * if exportResources is set, resource file will be exported
  +     */
  +    public void setExportResources(boolean doExport) {
  +        exportResources = doExport;
  +    }
  +
  +    /**
  +     * if exportSources is set, java files will be exported
  +     */
  +    public void setExportSources(boolean doExport) {
  +        exportSources = doExport;
  +    }
  +
  +    /**
  +     * Sets the set of include patterns. Patterns may be separated by a comma
  +     * or a space.Currently only patterns denoting packages are
  +     * supported
  +     *
  +     * @param includes the string containing the include patterns
  +     */
  +    public void setIncludes(String includes) {
  +        patternSet.setIncludes(includes);
  +    }
  +
  +    /**
  +     * if Overwrite is set, files will be overwritten during export
  +     */
  +    public void setOverwrite(boolean doOverwrite) {
  +        overwrite = doOverwrite;
  +    }
  +
   }
  
  
  
  1.10      +121 -121  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VAJImport.java	2001/10/28 21:30:21	1.9
  +++ VAJImport.java	2001/11/27 18:04:52	1.10
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -64,11 +64,11 @@
   import java.lang.reflect.Field;
   
   /**
  - * Import source, class files, and resources to the Visual Age for Java 
  + * Import source, class files, and resources to the Visual Age for Java
    * workspace using FileSets.
    * <p>
  - * Example:  
  - * <pre> 
  + * Example:
  + * <pre>
    * &lt;vajimport project="MyVAProject"&gt;
    *   &lt;fileset dir="src"&gt;
    *     &lt;include name="org/foo/subsystem1/**" /&gt;
  @@ -77,7 +77,7 @@
    * &lt;/vajexport&gt;
    * </pre>
    * import all source and resource files from the "src" directory
  - * which start with 'org.foo.subsystem1', except of these starting with 
  + * which start with 'org.foo.subsystem1', except of these starting with
    * 'org.foo.subsystem1.test' into the project MyVAProject.
    * </p>
    * <p>If MyVAProject isn't loaded into the Workspace, a new edition is
  @@ -117,116 +117,116 @@
    * @author: Glenn McAllister, inspired by a similar task written by Peter Kelley
    */
   public class VAJImport extends VAJTask {
  -	protected Vector filesets = new Vector();
  -	protected boolean importSources = true;
  -	protected boolean importResources = true;
  -	protected boolean importClasses = false;
  -	protected String importProject = null;
  -	protected boolean useDefaultExcludes = true;
  -
  -
  -	/**
  -	 * 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;
  -	}
  -
  -	/**
  -	 * 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;
  -	}
  -
  -	/**
  -	 * 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!");
  -		}
  -
  -		for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
  -			importFileset((FileSet) e.nextElement());
  -		}
  -	}
  -
  -	/**
  -	 * 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;
  -		}
  -
  -		String[] includes = null;
  -		String[] excludes = null;
  -
  -		// Hack to get includes and excludes. We could also use getIncludedFiles,
  -		// but that would result in very long HTTP-requests.
  -		// Therefore we want to send the patterns only to the remote tool server
  -		// and let him figure out the files.
  -		try {
  -			Class directoryScanner = ds.getClass();
  -		
  -			Field includesField = directoryScanner.getDeclaredField("includes");
  -			includesField.setAccessible(true);
  -			includes = (String[]) includesField.get(ds);
  -	
  -			Field excludesField = directoryScanner.getDeclaredField("excludes");
  -			excludesField.setAccessible(true);
  -			excludes = (String[]) excludesField.get(ds);
  -		} catch (NoSuchFieldException nsfe) {
  -			throw new BuildException(
  -				"DirectoryScanner.includes or .excludes missing" + nsfe.getMessage());
  -		} catch (IllegalAccessException iae) {
  -			throw new BuildException(
  -				"Access to DirectoryScanner.includes or .excludes not allowed");
  -		}
  -
  -		getUtil().importFiles( importProject, ds.getBasedir(), 
  -				includes, excludes, 
  -				importClasses, importResources, importSources, 
  -				useDefaultExcludes);
  -	}
  +    protected Vector filesets = new Vector();
  +    protected boolean importSources = true;
  +    protected boolean importResources = true;
  +    protected boolean importClasses = false;
  +    protected String importProject = null;
  +    protected boolean useDefaultExcludes = true;
  +
  +
  +    /**
  +     * 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;
  +    }
  +
  +    /**
  +     * 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;
  +    }
  +
  +    /**
  +     * 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!");
  +        }
  +
  +        for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
  +            importFileset((FileSet) e.nextElement());
  +        }
  +    }
  +
  +    /**
  +     * 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;
  +        }
  +
  +        String[] includes = null;
  +        String[] excludes = null;
  +
  +        // Hack to get includes and excludes. We could also use getIncludedFiles,
  +        // but that would result in very long HTTP-requests.
  +        // Therefore we want to send the patterns only to the remote tool server
  +        // and let him figure out the files.
  +        try {
  +            Class directoryScanner = ds.getClass();
  +
  +            Field includesField = directoryScanner.getDeclaredField("includes");
  +            includesField.setAccessible(true);
  +            includes = (String[]) includesField.get(ds);
  +
  +            Field excludesField = directoryScanner.getDeclaredField("excludes");
  +            excludesField.setAccessible(true);
  +            excludes = (String[]) excludesField.get(ds);
  +        } catch (NoSuchFieldException nsfe) {
  +            throw new BuildException(
  +                "DirectoryScanner.includes or .excludes missing" + nsfe.getMessage());
  +        } catch (IllegalAccessException iae) {
  +            throw new BuildException(
  +                "Access to DirectoryScanner.includes or .excludes not allowed");
  +        }
  +
  +        getUtil().importFiles( importProject, ds.getBasedir(),
  +                includes, excludes,
  +                importClasses, importResources, importSources,
  +                useDefaultExcludes);
  +    }
   }
  
  
  
  1.2       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImportServlet.java
  
  Index: VAJImportServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImportServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJImportServlet.java	2001/10/25 12:37:31	1.1
  +++ VAJImportServlet.java	2001/11/27 18:04:52	1.2
  @@ -59,7 +59,7 @@
   
   /**
    * A Remote Access to Tools Servlet to import a Project
  - * from files into the Repository. The following 
  + * from files into the Repository. The following
    * table describes the servlet parameters.
    *
    * <table>
  @@ -95,8 +95,8 @@
                         getBooleanParam(RESOURCES_PARAM, true),
                         getBooleanParam(SOURCES_PARAM, true),
                         false // no default excludes, because they
  -		      // are already added on client side
  -                      //			getBooleanParam(DEFAULT_EXCLUDES_PARAM, true)
  +              // are already added on client side
  +                      //            getBooleanParam(DEFAULT_EXCLUDES_PARAM, true)
                         );
       }
   }
  
  
  
  1.5       +46 -46    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
  
  Index: VAJLocalUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VAJLocalUtil.java	2001/11/15 22:26:51	1.4
  +++ VAJLocalUtil.java	2001/11/27 18:04:52	1.5
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -81,7 +81,7 @@
   abstract class VAJLocalUtil implements VAJUtil{
       // singleton containing the VAJ workspace
       private static Workspace workspace;
  -		
  +
       /**
        * Wraps IvjException into a BuildException
        *
  @@ -100,7 +100,7 @@
           }
           return new BuildException(errMsg, e);
       }
  -		
  +
       /**
        * returns the current VAJ workspace.
        * @return com.ibm.ivj.util.base.Workspace
  @@ -111,7 +111,7 @@
               if (workspace == null) {
                   throw new BuildException(
                                            "Unable to connect to Workspace! "
  -                                         + "Make sure you are running in VisualAge for Java."); 
  +                                         + "Make sure you are running in VisualAge for Java.");
               }
           }
   
  @@ -122,7 +122,7 @@
       //-----------------------------------------------------------
       // export
       //-----------------------------------------------------------
  -	
  +
       /**
        * export packages
        */
  @@ -131,7 +131,7 @@
                                  String[] includePatterns, String[] excludePatterns,
                                  boolean exportClasses, boolean exportDebugInfo,
                                  boolean exportResources, boolean exportSources,
  -                               boolean useDefaultExcludes,	boolean overwrite) {
  +                               boolean useDefaultExcludes,    boolean overwrite) {
           if (includePatterns == null || includePatterns.length == 0) {
               log( "You must specify at least one include attribute. "
                    + "Not exporting", MSG_ERR);
  @@ -147,7 +147,7 @@
   
                   Package[] packages = scanner.getIncludedPackages();
   
  -                log( "Exporting " + packages.length + " package(s) to " 
  +                log( "Exporting " + packages.length + " package(s) to "
                        + dest, MSG_INFO);
                   for (int i = 0; i < packages.length; i++) {
                       log("    " + packages[i].getName(), MSG_VERBOSE);
  @@ -174,7 +174,7 @@
       //-----------------------------------------------------------
       // load
       //-----------------------------------------------------------
  -	
  +
       /**
        * Load specified projects.
        */
  @@ -188,26 +188,26 @@
                   log("No Projects match the name " + d.getName(), MSG_WARN);
               }
           }
  -		
  -        log( "Loading " + expandedDescs.size() 
  +
  +        log( "Loading " + expandedDescs.size()
                + " project(s) into workspace", MSG_INFO);
  -	
  -        for (Enumeration e = expandedDescs.elements(); 
  +
  +        for (Enumeration e = expandedDescs.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", MSG_VERBOSE ); 
  +                log( "Loading '" + d.getName() + "', Version '" + d.getVersion()
  +                     + "', into Workspace", MSG_VERBOSE );
                   pe.loadIntoWorkspace();
               } catch (IvjException ex) {
  -                throw createBuildException( "Project '" + d.getName() 
  -                                            + "' could not be loaded.", ex ); 
  +                throw createBuildException( "Project '" + d.getName()
  +                                            + "' could not be loaded.", ex );
               }
           }
       }
  -		
  +
       /**
        * returns a list of project names matching the given pattern
        */
  @@ -237,17 +237,17 @@
       private Vector getExpandedDescriptions(Vector projectDescs) {
           Vector expandedDescs = new Vector(projectDescs.size());
           try {
  -            String[] projectNames = 
  +            String[] projectNames =
                   getWorkspace().getRepository().getProjectNames();
               for (int i = 0; i < projectNames.length; i++) {
  -                for (Enumeration e = projectDescs.elements(); 
  +                for (Enumeration e = projectDescs.elements();
                        e.hasMoreElements();) {
                       VAJProjectDescription d = (VAJProjectDescription) e.nextElement();
                       String pattern = d.getName();
                       if (VAJWorkspaceScanner.match(pattern, projectNames[i])) {
                           d.setProjectFound();
                           expandedDescs.addElement(new VAJProjectDescription(
  -                                                                           projectNames[i], d.getVersion())); 
  +                                                                           projectNames[i], d.getVersion()));
                           break;
                       }
                   }
  @@ -283,8 +283,8 @@
                   }
               }
               if (pe == null) {
  -                throw new BuildException( "Version " + versionName 
  -                                          + " of Project " + name + " doesn't exist" ); 
  +                throw new BuildException( "Version " + versionName
  +                                          + " of Project " + name + " doesn't exist" );
               }
               return pe;
   
  @@ -299,18 +299,18 @@
       //-----------------------------------------------------------
       // import
       //-----------------------------------------------------------
  -	
  +
   
       /**
        * Do the import.
        */
       public void importFiles(
  -                            String importProject, File srcDir, 
  -                            String[] includePatterns, String[] excludePatterns, 
  -                            boolean importClasses, boolean importResources, 
  -                            boolean importSources, boolean useDefaultExcludes) 
  +                            String importProject, File srcDir,
  +                            String[] includePatterns, String[] excludePatterns,
  +                            boolean importClasses, boolean importResources,
  +                            boolean importSources, boolean useDefaultExcludes)
           throws BuildException {
  -			
  +
           if (importProject == null || "".equals(importProject)) {
               throw new BuildException("The VisualAge for Java project "
                                        + "name is required!");
  @@ -332,20 +332,20 @@
           Vector sources = new Vector();
           Vector resources = new Vector();
   
  -        scanForImport( srcDir, ds.getIncludedFiles(), classes, sources, resources); 
  +        scanForImport( srcDir, ds.getIncludedFiles(), classes, sources, resources);
   
           StringBuffer summaryLog = new StringBuffer("Importing ");
           addFilesToImport( importSpec, importClasses, classes, "Class", summaryLog );
           addFilesToImport( importSpec, importSources, sources, "Java", summaryLog );
           addFilesToImport( importSpec, importResources, resources, "Resource", summaryLog );
           importSpec.setResourcePath(srcDir.getAbsolutePath());
  -		
  +
           summaryLog.append( " into the project '" );
           summaryLog.append( importProject );
           summaryLog.append( "'." );
   
           log(summaryLog.toString(), MSG_INFO);
  -				
  +
           try {
               Type[] importedTypes = getWorkspace().importData(importSpec);
               if (importedTypes == null) {
  @@ -354,9 +354,9 @@
               else {
                   log( importedTypes.length + " types imported", MSG_DEBUG);
                   for( int i = 0; i < importedTypes.length; i++ ) {
  -                    log( importedTypes[i].getPackage().getName() 
  -                         + "." + importedTypes[i].getName() 
  -                         + " into " + importedTypes[i].getProject().getName(), 
  +                    log( importedTypes[i].getPackage().getName()
  +                         + "." + importedTypes[i].getName()
  +                         + " into " + importedTypes[i].getProject().getName(),
                            MSG_DEBUG);
                   }
               }
  @@ -387,10 +387,10 @@
                   found = getWorkspace().createProject(importProject, true);
               } catch (IvjException e) {
                   throw createBuildException( "Error while creating Project "
  -                                            + importProject + ": ", e ); 
  +                                            + importProject + ": ", e );
               }
           }
  -		
  +
           return found;
       }
   
  @@ -399,10 +399,10 @@
        * Sort the files into classes, sources, and resources.
        */
       private void scanForImport(
  -                               File dir, 
  -                               String[] files, 
  -                               Vector classes, 
  -                               Vector sources, 
  +                               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();
  @@ -438,11 +438,11 @@
               String[] fileArr = new String[files.size()];
               files.copyInto(fileArr);
               try {
  -                // here it is assumed that fileType is one of the 
  +                // here it is assumed that fileType is one of the
                   // following strings: // "Java", "Class", "Resource"
                   String methodName = "set"+fileType+"Files";
                   Class[] methodParams = new Class[]{fileArr.getClass()};
  -                java.lang.reflect.Method method = 
  +                java.lang.reflect.Method method =
                       spec.getClass().getDeclaredMethod( methodName, methodParams);
                   method.invoke(spec, new Object[]{fileArr});
               } catch( Exception e ) {
  
  
  
  1.2       +11 -11    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java
  
  Index: VAJProjectDescription.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJProjectDescription.java	2001/10/25 12:37:31	1.1
  +++ VAJProjectDescription.java	2001/11/27 18:04:52	1.2
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -67,31 +67,31 @@
   
       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");
  
  
  
  1.3       +21 -21    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java
  
  Index: VAJRemoteUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJRemoteUtil.java	2001/10/28 21:30:21	1.2
  +++ VAJRemoteUtil.java	2001/11/27 18:04:52	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -90,7 +90,7 @@
       /**
        * export the array of Packages
        */
  -    public void exportPackages(File destDir, 
  +    public void exportPackages(File destDir,
                                  String[] includePatterns, String[] excludePatterns,
                                  boolean exportClasses, boolean exportDebugInfo, boolean exportResources,
                                  boolean exportSources, boolean useDefaultExcludes, boolean overwrite ) {
  @@ -112,13 +112,13 @@
        * Do the import.
        */
       public void importFiles(
  -                            String importProject, File srcDir, 
  -                            String[] includePatterns, String[] excludePatterns, 
  -                            boolean importClasses, boolean importResources, 
  +                            String importProject, File srcDir,
  +                            String[] includePatterns, String[] excludePatterns,
  +                            boolean importClasses, boolean importResources,
                               boolean importSources, boolean useDefaultExcludes) {
           try {
               String request = "http://" + remoteServer + "/servlet/vajimport?"
  -                + VAJImportServlet.PROJECT_NAME_PARAM + "=" 
  +                + VAJImportServlet.PROJECT_NAME_PARAM + "="
                   + importProject + "&"
                   + assembleImportExportParams( srcDir,
                                                 includePatterns, excludePatterns,
  @@ -128,7 +128,7 @@
           } catch (Exception ex) {
               throw new BuildException(ex);
           }
  -			
  +
       }
   
       /**
  @@ -137,11 +137,11 @@
        */
       private String assembleImportExportParams(
                                                 File dir,
  -                                              String[] includePatterns, String[] excludePatterns, 
  -                                              boolean includeClasses, boolean includeResources, 
  +                                              String[] includePatterns, String[] excludePatterns,
  +                                              boolean includeClasses, boolean includeResources,
                                                 boolean includeSources, boolean useDefaultExcludes) {
           String result =
  -            VAJToolsServlet.DIR_PARAM + "=" 
  +            VAJToolsServlet.DIR_PARAM + "="
               + dir.getAbsolutePath().replace('\\', '/') + "&"
               + VAJToolsServlet.CLASSES_PARAM + "=" + includeClasses + "&"
               + VAJToolsServlet.RESOURCES_PARAM + "=" + includeResources + "&"
  @@ -156,14 +156,14 @@
           }
           if ( excludePatterns != null ) {
               for ( int i = 0; i < excludePatterns.length; i++ ){
  -                result = result + "&" + VAJExportServlet.EXCLUDE_PARAM + "=" 
  +                result = result + "&" + VAJExportServlet.EXCLUDE_PARAM + "="
                       + excludePatterns[i].replace(' ', '+').replace('\\', '/');
               }
           }
   
           return result;
       }
  -			
  +
       /**
        * Load specified projects.
        */
  @@ -173,8 +173,8 @@
               String delimiter = "";
               for ( Enumeration e = projectDescriptions.elements(); e.hasMoreElements(); ){
                   VAJProjectDescription pd = (VAJProjectDescription)e.nextElement();
  -                request = request 
  -                    + delimiter + VAJLoadServlet.PROJECT_NAME_PARAM 
  +                request = request
  +                    + delimiter + VAJLoadServlet.PROJECT_NAME_PARAM
                       + "=" + pd.getName().replace(' ', '+')
                       + "&" + VAJLoadServlet.VERSION_PARAM
                       + "=" + pd.getVersion().replace(' ', '+');
  @@ -201,10 +201,10 @@
           boolean requestFailed = false;
           try {
               log("Request: " + request, MSG_DEBUG);
  -	
  +
               //must be HTTP connection
               URL requestUrl = new URL( request );
  -            HttpURLConnection connection = 
  +            HttpURLConnection connection =
                   (HttpURLConnection) requestUrl.openConnection();
   
               InputStream is = null;
  @@ -238,7 +238,7 @@
                   log( line.substring(2), level );
                   line = br.readLine();
               }
  -		
  +
           } catch (IOException ex) {
               log("Error sending tool request to VAJ" + ex, MSG_ERR);
               throw new BuildException("Couldn't execute " + request );
  
  
  
  1.2       +9 -9      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
  
  Index: VAJTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJTask.java	2001/10/25 12:37:31	1.1
  +++ VAJTask.java	2001/11/27 18:04:52	1.2
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -57,12 +57,12 @@
   /**
    * Super class for all VAJ tasks. Contains common
    * attributes (remoteServer) and util methods
  - * 
  + *
    * @author: Wolf Siberski
    */
   import org.apache.tools.ant.Task;
  +
   
  - 
   public class VAJTask extends Task {
       /**
        * Adaption of VAJLocalUtil to Task context.
  @@ -79,7 +79,7 @@
       // holds the appropriate VAJUtil implementation
       private VAJUtil util = null;
   
  -	
  +
       /**
        * returns the VAJUtil implementation
        */
  @@ -93,7 +93,7 @@
           }
           return util;
       }
  -	
  +
       /**
        * Set remote server attribute
        */
  
  
  
  1.3       +12 -12    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java
  
  Index: VAJToolsServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJToolsServlet.java	2001/10/28 21:30:21	1.2
  +++ VAJToolsServlet.java	2001/11/27 18:04:52	1.3
  @@ -69,7 +69,7 @@
   
   /**
    * Abstract base class to provide common services for the
  - * VAJ tool API servlets 
  + * VAJ tool API servlets
    *
    * @author Wolf Siberski, based on servlets written by Glenn McAllister
    */
  @@ -88,7 +88,7 @@
                           if ( nlPos == -1 ) {
                               nlPos = msg.length();
                           }
  -                        response.getWriter().println( Integer.toString(level) 
  +                        response.getWriter().println( Integer.toString(level)
                                                         + " " + msg.substring( i, nlPos ));
                           i = nlPos + 1;
                       }
  @@ -99,7 +99,7 @@
               }
           }
       }
  -	
  +
       // constants for servlet param names
       public final static String DIR_PARAM = "dir";
       public final static String INCLUDE_PARAM = "include";
  @@ -124,17 +124,17 @@
       /**
        * Execute the request by calling the appropriate
        * VAJ tool API methods. This method must be implemented
  -     * by the concrete servlets 
  +     * by the concrete servlets
        */
       protected abstract void executeRequest();
  -	
  +
       /**
        * Respond to a HTTP request. This method initializes
  -     * the servlet and handles errors. 
  -     * The real work is done in the abstract method executeRequest() 
  +     * the servlet and handles errors.
  +     * The real work is done in the abstract method executeRequest()
        */
       public void doGet(HttpServletRequest req, HttpServletResponse res)
  -	throws ServletException, IOException {
  +        throws ServletException, IOException {
           try {
               response = res;
               request = req;
  @@ -148,14 +148,14 @@
                       StringWriter sw = new StringWriter();
                       e.printStackTrace(new PrintWriter(sw));
                       String trace = new String( sw.getBuffer() );
  -                    util.log("Program error in " + this.getClass().getName() 
  +                    util.log("Program error in " + this.getClass().getName()
                                + ":\n" + trace, VAJUtil.MSG_ERR);
                   }
               } catch( Throwable t ) {
                   t.printStackTrace();
               } finally {
                   if ( ! (e instanceof BuildException) )
  -                    {	
  +                    {
                           throw new ServletException( e.getMessage() );
                       }
               }
  @@ -171,7 +171,7 @@
               util = new VAJLocalServletUtil();
           }
       }
  -	
  +
       /**
        * Get the VAJUtil implementation
        */
  @@ -224,5 +224,5 @@
       protected boolean toBoolean(String string) {
           String lower = string.toLowerCase();
           return (lower.equals("yes") || lower.equals("true") || lower.equals("ok"));
  -    }	
  +    }
   }
  
  
  
  1.6       +40 -40    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- VAJUtil.java	2001/10/25 12:37:31	1.5
  +++ VAJUtil.java	2001/11/27 18:04:52	1.6
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -9,7 +9,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -17,15 +17,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    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", "Ant", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    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"
  @@ -64,39 +64,39 @@
    * @author Wolf Siberski, TUI Infotec GmbH
    */
   interface VAJUtil {
  -		// log levels
  -	public static final int MSG_DEBUG = 4;
  -	public static final int MSG_ERR = 0;
  -	public static final int MSG_INFO = 2;
  -	public static final int MSG_VERBOSE = 3;
  -	public static final int MSG_WARN = 1;
  -
  -	/**
  -	 * export the array of Packages
  -	 */
  -	void exportPackages(
  -		File dest, 
  -		String[] includePatterns, String[] excludePatterns,
  -		boolean exportClasses, boolean exportDebugInfo, 
  -		boolean exportResources, boolean exportSources, 
  -		boolean useDefaultExcludes, boolean overwrite);
  -
  -	/**
  -	 * Do the import.
  -	 */
  -	void importFiles(
  -		String importProject, File srcDir, 
  -		String[] includePatterns, String[] excludePatterns, 
  -		boolean importClasses, boolean importResources, 
  -		boolean importSources, boolean useDefaultExcludes);
  -
  -	/**
  -	 * Load specified projects.
  -	 */
  -	void loadProjects(Vector projectDescriptions);
  -
  -	/**
  -	 * Logs a message with the specified log level.
  -	 */
  -	void log(String msg, int level);
  +    // log levels
  +    public static final int MSG_DEBUG = 4;
  +    public static final int MSG_ERR = 0;
  +    public static final int MSG_INFO = 2;
  +    public static final int MSG_VERBOSE = 3;
  +    public static final int MSG_WARN = 1;
  +
  +    /**
  +     * export the array of Packages
  +     */
  +    void exportPackages(
  +        File dest,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean exportClasses, boolean exportDebugInfo,
  +        boolean exportResources, boolean exportSources,
  +        boolean useDefaultExcludes, boolean overwrite);
  +
  +    /**
  +     * Do the import.
  +     */
  +    void importFiles(
  +        String importProject, File srcDir,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean importClasses, boolean importResources,
  +        boolean importSources, boolean useDefaultExcludes);
  +
  +    /**
  +     * Load specified projects.
  +     */
  +    void loadProjects(Vector projectDescriptions);
  +
  +    /**
  +     * Logs a message with the specified log level.
  +     */
  +    void log(String msg, int level);
   }
  
  
  
  1.5       +19 -19    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VAJWorkspaceScanner.java	2001/10/25 12:37:31	1.4
  +++ VAJWorkspaceScanner.java	2001/11/27 18:04:52	1.5
  @@ -79,7 +79,7 @@
    *   <li>VisualAge*\**</li>
    * </ul>
    * <p>
  - * This class works like DirectoryScanner. 
  + * This class works like DirectoryScanner.
    *
    * @see org.apache.tools.ant.DirectoryScanner
    *
  @@ -88,19 +88,19 @@
   class VAJWorkspaceScanner extends DirectoryScanner {
   
       // Patterns that should be excluded by default.
  -    private final static String[] DEFAULTEXCLUDES = 
  +    private final static String[] DEFAULTEXCLUDES =
       {
  -        "IBM*/**", 
  -        "Java class libraries/**", 
  -        "Sun class libraries*/**", 
  -        "JSP Page Compile Generated Code/**", 
  -        "VisualAge*/**", 
  -    }; 
  +        "IBM*/**",
  +        "Java class libraries/**",
  +        "Sun class libraries*/**",
  +        "JSP Page Compile Generated Code/**",
  +        "VisualAge*/**",
  +    };
   
  -    // The packages that where found and matched at least 
  +    // 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.
        */
  @@ -114,11 +114,11 @@
           for (int i = 0; i < DEFAULTEXCLUDES.length; i++) {
               newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].
                   replace( '/', File.separatorChar ).
  -                replace( '\\', File.separatorChar ); 
  +                replace( '\\', File.separatorChar );
           }
           excludes = newExcludes;
       }
  -		
  +
       /**
        * Finds all Projects specified in include patterns.
        *
  @@ -133,11 +133,11 @@
           for (int i = 0; i < projects.length; i++) {
               Project project = projects[i];
               for (int j = 0; j < includes.length && !allProjectsMatch; j++) {
  -                StringTokenizer tok = 
  +                StringTokenizer tok =
                       new StringTokenizer(includes[j], File.separator);
                   String projectNamePattern = tok.nextToken();
                   if (projectNamePattern.equals("**")) {
  -                    // if an include pattern starts with '**', 
  +                    // if an include pattern starts with '**',
                       // all projects match
                       allProjectsMatch = true;
                   } else
  @@ -157,7 +157,7 @@
   
           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.
  @@ -172,7 +172,7 @@
           }
           return packages;
       }
  -		
  +
       /**
        * Matches a string against a pattern. The pattern contains two special
        * characters:
  @@ -212,7 +212,7 @@
               scanProject(project);
           }
       }
  -		
  +
       /**
        * Scans a project for packages that match at least one include
        * pattern, and don't match any exclude patterns.
  @@ -227,10 +227,10 @@
                       // replace '.' by file seperator because the patterns are
                       // using file seperator syntax (and we can use the match
                       // methods this way).
  -                    String name = 
  +                    String name =
                           project.getName()
                           + File.separator
  -                        + item.getName().replace('.', File.separatorChar); 
  +                        + item.getName().replace('.', File.separatorChar);
                       if (isIncluded(name) && !isExcluded(name)) {
                           packagesIncluded.addElement(item);
                       }
  
  
  
  1.4       +22 -22    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
  
  Index: JDependTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JDependTask.java	2001/10/28 21:30:21	1.3
  +++ JDependTask.java	2001/11/27 18:04:53	1.4
  @@ -153,7 +153,7 @@
        * @see #setFork(boolean)
        */
       public void setJvm(String value) {
  -		_jvm = value;
  +        _jvm = value;
   
       }
   
  @@ -230,20 +230,20 @@
   
       public void setFormat(FormatAttribute ea)
       {
  -		format = ea.getValue();
  -	}
  +        format = ea.getValue();
  +    }
   
  -	public static class FormatAttribute extends EnumeratedAttribute
  -	{
  -		private String [] formats = new String[]{"xml","text"};
  -
  -		public String[] getValues()
  -		{
  -			return formats;
  -		}
  -	}
  +    public static class FormatAttribute extends EnumeratedAttribute
  +    {
  +        private String [] formats = new String[]{"xml","text"};
   
  +        public String[] getValues()
  +        {
  +            return formats;
  +        }
  +    }
   
  +
       /**
        * No problems with this test.
        */
  @@ -255,16 +255,16 @@
   
       public void execute() throws BuildException {
   
  -		CommandlineJava commandline = new CommandlineJava();
  +        CommandlineJava commandline = new CommandlineJava();
   
  -		if("text".equals(format))
  -			commandline.setClassname("jdepend.textui.JDepend");
  -		else
  -		if("xml".equals(format))
  -			commandline.setClassname("jdepend.xmlui.JDepend");
  +        if("text".equals(format))
  +            commandline.setClassname("jdepend.textui.JDepend");
  +        else
  +        if("xml".equals(format))
  +            commandline.setClassname("jdepend.xmlui.JDepend");
   
  -		if(_jvm!=null)
  -			commandline.setVm(_jvm);
  +        if(_jvm!=null)
  +            commandline.setVm(_jvm);
   
           if (getSourcespath() == null)
               throw new BuildException("Missing Sourcepath required argument");
  @@ -311,9 +311,9 @@
           jdepend.textui.JDepend jdepend;
   
           if("xml".equals(format))
  -        	jdepend = new jdepend.xmlui.JDepend();
  +            jdepend = new jdepend.xmlui.JDepend();
           else
  -        	jdepend = new jdepend.textui.JDepend();
  +            jdepend = new jdepend.textui.JDepend();
   
           if (getOutputFile() != null) {
               FileWriter fw;
  
  
  
  1.9       +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java
  
  Index: AggregateTransformer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/AggregateTransformer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AggregateTransformer.java	2001/11/25 19:28:51	1.8
  +++ AggregateTransformer.java	2001/11/27 18:04:53	1.9
  @@ -96,10 +96,10 @@
       public final static String NOFRAMES = "noframes";
   
       public static class Format extends EnumeratedAttribute {
  -		public String[] getValues(){
  -			return new String[]{FRAMES, NOFRAMES};
  -		}
  -	}
  +        public String[] getValues(){
  +            return new String[]{FRAMES, NOFRAMES};
  +        }
  +    }
   
       /** Task */
       protected Task task;
  
  
  
  1.4       +6 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java
  
  Index: BaseTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BaseTest.java	2001/07/13 08:07:55	1.3
  +++ BaseTest.java	2001/11/27 18:04:53	1.4
  @@ -60,7 +60,7 @@
   /**
    * Baseclass for BatchTest and JUnitTest.
    *
  - * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a> 
  + * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a>
    */
   public abstract class BaseTest {
  @@ -116,12 +116,12 @@
        * Sets the destination directory.
        */
       public void setTodir(File destDir) {
  -        this.destDir = destDir; 
  +        this.destDir = destDir;
       }
   
       /**
        * @return the destination directory as an absolute path if it exists
  -     *			otherwise return <tt>null</tt>
  +     *         otherwise return <tt>null</tt>
        */
       public String getTodir(){
           if (destDir != null){
  @@ -133,15 +133,15 @@
       public java.lang.String getFailureProperty() {
           return failureProperty;
       }
  -    
  +
       public void setFailureProperty(String failureProperty) {
           this.failureProperty = failureProperty;
       }
  -    
  +
       public java.lang.String getErrorProperty() {
           return errorProperty;
       }
  -    
  +
       public void setErrorProperty(String errorProperty) {
           this.errorProperty = errorProperty;
       }
  
  
  
  1.7       +28 -28    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
  
  Index: XMLResultAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLResultAggregator.java	2001/10/28 21:30:22	1.6
  +++ XMLResultAggregator.java	2001/11/27 18:04:53	1.7
  @@ -92,31 +92,31 @@
    * @author <a href="mailto:sbailliez@imediation.com">Stephane Bailliez</a>
    */
   public class XMLResultAggregator extends Task implements XMLConstants {
  -    
  +
       /** the list of all filesets, that should contains the xml to aggregate */
       protected Vector filesets = new Vector();
  -    
  +
       /** the name of the result file */
       protected String toFile;
  -    
  +
       /** the directory to write the file to */
       protected File toDir;
  -    
  +
       protected Vector transformers = new Vector();
  -    
  +
       /** the default directory: <tt>.</tt>. It is resolved from the project directory */
       public final static String DEFAULT_DIR = ".";
  -    
  +
       /** the default file name: <tt>TESTS-TestSuites.xml</tt> */
       public final static String DEFAULT_FILENAME = "TESTS-TestSuites.xml";
  -    
  -    
  +
  +
       public AggregateTransformer createReport(){
           AggregateTransformer transformer = new AggregateTransformer(this);
           transformers.addElement(transformer);
           return transformer;
       }
  -    
  +
       /**
        * Set the name of the file aggregating the results. It must be relative
        * from the <tt>todir</tt> attribute. If not set it will use {@link #DEFAULT_FILENAME}
  @@ -126,7 +126,7 @@
       public void setTofile(String value){
           toFile = value;
       }
  -    
  +
       /**
        * Set the destination directory where the results should be written. If not
        * set if will use {@link #DEFAULT_DIR}. When given a relative directory
  @@ -137,7 +137,7 @@
       public void setTodir(File value){
           toDir = value;
       }
  -    
  +
       /**
        * Add a new fileset containing the xml results to aggregate
        * @param    fs      the new fileset of xml results.
  @@ -145,12 +145,12 @@
       public void addFileSet(FileSet fs) {
           filesets.addElement(fs);
       }
  -    
  +
       /**
        * Aggregate all testsuites into a single document and write it to the
        * specified directory and file.
  -     * @throws	BuildException	thrown if there is a serious error while writing
  -     *			the document.
  +     * @throws  BuildException  thrown if there is a serious error while writing
  +     *          the document.
        */
       public void execute() throws BuildException {
           Element rootElement = createDocument();
  @@ -170,7 +170,7 @@
               transformer.transform();
           }
       }
  -    
  +
       /**
        * Get the full destination file where to write the result. It is made of
        * the <tt>todir</tt> and <tt>tofile</tt> attributes.
  @@ -185,7 +185,7 @@
           }
           return new File(toDir, toFile);
       }
  -    
  +
       /**
        * Get all <code>.xml</code> files in the fileset.
        *
  @@ -208,14 +208,14 @@
                   }
               }
           }
  -        
  +
           File[] files = new File[v.size()];
           v.copyInto(files);
           return files;
       }
  -    
  +
       //----- from now, the methods are all related to DOM tree manipulation
  -    
  +
       /**
        * Write the DOM tree to a file.
        * @param doc the XML document to dump to disk.
  @@ -234,12 +234,12 @@
               throw new IOException("Error while writing DOM content");
           }
       }
  -    
  +
       /**
  -     * <p> Create a DOM tree. 
  +     * <p> Create a DOM tree.
        * Has 'testsuites' as firstchild and aggregates all
        * testsuite results that exists in the base directory.
  -     * @return	the root element of DOM tree that aggregates all testsuites.
  +     * @return  the root element of DOM tree that aggregates all testsuites.
        */
       protected Element createDocument() {
           // create the dom tree
  @@ -247,7 +247,7 @@
           Document doc = builder.newDocument();
           Element rootElement = doc.createElement(TESTSUITES);
           doc.appendChild(rootElement);
  -        
  +
           // get all files and add them to the document
           File[] files = getFiles();
           for (int i = 0; i < files.length; i++) {
  @@ -278,7 +278,7 @@
           }
           return rootElement;
       }
  -    
  +
       /**
        * <p> Add a new testsuite node to the document.
        * The main difference is that it
  @@ -294,17 +294,17 @@
       protected void addTestSuite(Element root, Element testsuite){
           String fullclassname = testsuite.getAttribute(ATTR_NAME);
           int pos = fullclassname.lastIndexOf('.');
  -        
  +
           // a missing . might imply no package at all. Don't get fooled.
           String pkgName = (pos == -1) ? "" : fullclassname.substring(0, pos);
           String classname = (pos == -1) ? fullclassname : fullclassname.substring(pos + 1);
           Element copy = (Element)DOMUtil.importNode(root, testsuite);
  -        
  +
           // modify the name attribute and set the package
           copy.setAttribute(ATTR_NAME, classname);
           copy.setAttribute(ATTR_PACKAGE, pkgName);
       }
  -    
  +
       /**
        * Create a new document builder. Will issue an <tt>ExceptionInitializerError</tt>
        * if something is going wrong. It is fatal anyway.
  @@ -318,5 +318,5 @@
               throw new ExceptionInInitializerError(exc);
           }
       }
  -    
  +
   }
  
  
  
  1.4       +46 -46    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetricsStreamHandler.java
  
  Index: MMetricsStreamHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetricsStreamHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MMetricsStreamHandler.java	2001/10/28 21:30:22	1.3
  +++ MMetricsStreamHandler.java	2001/11/27 18:04:53	1.4
  @@ -85,7 +85,7 @@
    * A handy metrics handler. Most of this code was done only with the
    * screenshots on the documentation since the evaluation version as
    * of this writing does not allow to save metrics or to run it via
  - * command line. 
  + * command line.
    * <p>
    * This class can be used to transform a text file or to process the
    * output stream directly.
  @@ -96,23 +96,23 @@
   
       /** CLASS construct, it should be named something like 'MyClass' */
       protected final static String CLASS = "class";
  -    
  +
       /** package construct, it should be look like 'com.mycompany.something' */
       protected final static String PACKAGE = "package";
  -    
  +
       /** FILE construct, it should look like something 'MyClass.java' or 'MyClass.class' */
       protected final static String FILE = "file";
  -    
  +
       /** METHOD construct, it should looke like something 'doSomething(...)' or 'doSomething()' */
       protected final static String METHOD = "method";
  -    
  +
       protected final static String[] ATTRIBUTES = { "name", "vg", "loc",
       "dit", "noa", "nrm", "nlm", "wmc", "rfc", "dac", "fanout", "cbo", "lcom", "nocl"
       };
  -    
  +
       /** reader for stdout */
       protected InputStream metricsOutput;
  -    
  +
       /**
        * this is where the XML output will go, should mostly be a file
        * the caller is responsible for flushing and closing this stream
  @@ -121,7 +121,7 @@
   
       /** metrics handler */
       protected TransformerHandler metricsHandler;
  -    
  +
       /** the task */
       protected Task task;
   
  @@ -130,7 +130,7 @@
        * know if we have to close an element or not.
        */
       protected Stack stack = new Stack();
  -          
  +
       /** initialize this handler */
       MMetricsStreamHandler(Task task, OutputStream xmlOut){
           this.task = task;
  @@ -162,7 +162,7 @@
               metricsHandler.setResult( new StreamResult( new OutputStreamWriter(xmlOutputStream, "UTF-8")) );
               Transformer transformer = metricsHandler.getTransformer();
               transformer.setOutputProperty(OutputKeys.INDENT, "yes");
  -            
  +
               // start the document with a 'metrics' root
               metricsHandler.startDocument();
               AttributesImpl attr = new AttributesImpl();
  @@ -179,7 +179,7 @@
       }
   
       /**
  -     * Pretty dangerous business here. 
  +     * Pretty dangerous business here.
        */
       public void stop() {
           try {
  @@ -197,7 +197,7 @@
               e.printStackTrace();
               throw new IllegalStateException(e.getMessage());
           }
  -    }  
  +    }
   
       /** read each line and process it */
       protected void parseOutput() throws IOException, SAXException {
  @@ -221,12 +221,12 @@
               MetricsElement elem = MetricsElement.parse(line);
               startElement(elem);
           } catch (ParseException e) {
  -        	e.printStackTrace();
  +            e.printStackTrace();
               // invalid lines are sent to the output as information, it might be anything,
              task.log(line, Project.MSG_INFO);
           }
       }
  -    
  +
       /**
        * Start a new construct. Elements are popped until we are on the same
        * parent node, then the element type is guessed and pushed on the
  @@ -249,7 +249,7 @@
                   }
               } catch (EmptyStackException ignored){}
           }
  -        
  +
           // ok, now start the new construct
           String type = getConstructType(elem);
           Attributes attrs = createAttributes(elem);
  @@ -272,7 +272,7 @@
           if ( elem.isCompilationUnit() ){
               return FILE;
           }
  -        
  +
           // same, we're sure it's a method
           if ( elem.isMethod() ){
               return METHOD;
  @@ -282,7 +282,7 @@
           if ( stack.size() == 0 ){
               return PACKAGE;
           }
  -        
  +
           // ok, this is now black magic time, we will guess the type based on
           // the previous type and its indent...
           final ElementEntry previous = (ElementEntry)stack.peek();
  @@ -299,16 +299,16 @@
           if ( prevType.equals(CLASS) && indent >= prevIndent ){
               return CLASS;
           }
  -        
  +
           // we assume the other are package
           return PACKAGE;
  -    }    
  -    
  -    
  +    }
  +
  +
       /**
        * Create all attributes of a MetricsElement skipping those who have an
        * empty string
  -     * @param   elem    
  +     * @param   elem
        */
       protected Attributes createAttributes(MetricsElement elem){
           AttributesImpl impl = new AttributesImpl();
  @@ -325,7 +325,7 @@
           }
           return impl;
       }
  -    
  +
       /**
        * helper class to keep track of elements via its type and indent
        * that's all we need to guess a type.
  @@ -347,36 +347,36 @@
   }
   
   class MetricsElement {
  +
  +    private final static NumberFormat METAMATA_NF;
   
  -	private final static NumberFormat METAMATA_NF;
  -	
  -	private final static NumberFormat NEUTRAL_NF;
  -	static {
  +    private final static NumberFormat NEUTRAL_NF;
  +    static {
           METAMATA_NF = NumberFormat.getInstance();
           METAMATA_NF.setMaximumFractionDigits(1);
           NEUTRAL_NF = NumberFormat.getInstance();
  -		if (NEUTRAL_NF instanceof DecimalFormat) {
  -			((DecimalFormat) NEUTRAL_NF).applyPattern("###0.###;-###0.###");
  -		}
  +        if (NEUTRAL_NF instanceof DecimalFormat) {
  +            ((DecimalFormat) NEUTRAL_NF).applyPattern("###0.###;-###0.###");
  +        }
           NEUTRAL_NF.setMaximumFractionDigits(1);
  -	}
  -    
  +    }
  +
       private int indent;
  -    
  +
       private String construct;
  -    
  +
       private Vector metrics;
  -    
  +
       MetricsElement(int indent, String construct, Vector metrics){
           this.indent = indent;
           this.construct = construct;
           this.metrics = metrics;
       }
  -    
  +
       public int getIndent(){
           return indent;
       }
  -    
  +
       public String getName(){
           return construct;
       }
  @@ -384,38 +384,38 @@
       public Enumeration getMetrics(){
           return metrics.elements();
       }
  -    
  +
       public boolean isCompilationUnit(){
           return ( construct.endsWith(".java") || construct.endsWith(".class") );
       }
  -        
  +
       public boolean isMethod(){
           return ( construct.endsWith("(...)") || construct.endsWith("()") );
       }
  -    
  +
       public static MetricsElement parse(String line) throws ParseException {
           final Vector metrics = new Vector();
           int pos;
  -        
  +
           // i'm using indexOf since I need to know if there are empty strings
           // between tabs and I find it easier than with StringTokenizer
           while ( (pos = line.indexOf('\t')) != -1 ){
               String token = line.substring(0, pos);
               // only parse what coudl be a valid number. ie not constructs nor no value
               /*if (metrics.size() != 0 || token.length() != 0){
  -	            Number num = METAMATA_NF.parse(token); // parse with Metamata NF
  -	            token = NEUTRAL_NF.format(num.doubleValue()); // and format with a neutral NF
  -	        }*/
  +                Number num = METAMATA_NF.parse(token); // parse with Metamata NF
  +                token = NEUTRAL_NF.format(num.doubleValue()); // and format with a neutral NF
  +            }*/
               metrics.addElement( token );
               line = line.substring(pos + 1);
           }
           metrics.addElement( line );
  -        
  +
           // there should be exactly 14 tokens (1 name + 13 metrics), if not, there is a problem !
           if ( metrics.size() != 14 ){
               throw new ParseException("Could not parse the following line as a metrics: -->" + line +"<--", -1);
           }
  -        
  +
           // remove the first token it's made of the indentation string and the
           // construct name, we'll need all this to figure out what type of
           // construct it is since we lost all semantics :(
  
  
  
  1.4       +13 -13    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java
  
  Index: P4Edit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- P4Edit.java	2001/10/28 21:30:22	1.3
  +++ P4Edit.java	2001/11/27 18:04:53	1.4
  @@ -68,18 +68,18 @@
    *
    * ToDo: Should call reopen if file is already open in one of our changelists perhaps?
    */
  - 
  +
    public class P4Edit extends P4Base {
  - 
  -     public String change = null;
  -     
  -     public void setChange(String change) {
  -             this.change = change;
  -	 }
  -	 
  -     public void execute() throws BuildException {
  -         if(change != null ) P4CmdOpts = "-c "+change;
  -	     if(P4View == null) throw new BuildException("No view specified to edit");
  -         execP4Command("-s edit "+P4CmdOpts+" "+P4View, new SimpleP4OutputHandler(this));
  -	 }
  +
  +    public String change = null;
  +
  +    public void setChange(String change) {
  +        this.change = change;
  +    }
  +
  +    public void execute() throws BuildException {
  +        if(change != null ) P4CmdOpts = "-c "+change;
  +        if(P4View == null) throw new BuildException("No view specified to edit");
  +        execP4Command("-s edit "+P4CmdOpts+" "+P4View, new SimpleP4OutputHandler(this));
  +    }
   }
  
  
  
  1.3       +7 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java
  
  Index: P4HandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- P4HandlerAdapter.java	2001/10/28 21:30:22	1.2
  +++ P4HandlerAdapter.java	2001/11/27 18:04:53	1.3
  @@ -78,7 +78,7 @@
       public void start() throws BuildException {
   
       try{
  -        //First write any output to P4 
  +        //First write any output to P4
           if(p4input != null && p4input.length() >0 && os != null) {
                       os.write(p4input.getBytes());
                       os.flush();
  @@ -86,17 +86,17 @@
               }
   
           //Now read any input and process
  -      
  +
           BufferedReader input = new BufferedReader(
                                        new InputStreamReader(
                                          new SequenceInputStream(is,es)));
   
               String line;
  -	    	while((line = input.readLine()) != null) {
  -	    	   process(line);
  -	    	}
  -	    	
  -	    	input.close();
  +            while((line = input.readLine()) != null) {
  +               process(line);
  +            }
  +
  +            input.close();
   
   
           }catch(Exception e) {
  
  
  
  1.6       +49 -49    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
  
  Index: P4Label.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- P4Label.java	2001/11/22 08:46:55	1.5
  +++ P4Label.java	2001/11/27 18:04:53	1.6
  @@ -72,7 +72,7 @@
    *
    *  Label name defaults to AntLabel if none set.
    *
  - * Example Usage: 
  + * Example Usage:
    * <pre>
    *   &lt;P4Label name="MyLabel-${TSTAMP}-${DSTAMP}" desc="Auto Build Label" /&gt;
    * </pre>
  @@ -84,46 +84,46 @@
       protected String name;
       protected String desc;
       protected String lock;
  -    
  +
       public void setName(String name) {
           this.name = name;
       }
  -    
  +
       public void setDesc(String desc) {
           this.desc = desc;
       }
  -   
  - 	public void setLock(String lock)  {
  -    	this.lock = lock;
  - 	}
  -        
  +
  +     public void setLock(String lock)  {
  +        this.lock = lock;
  +     }
  +
       public void execute() throws BuildException {
           log("P4Label exec:",Project.MSG_INFO);
  -        
  +
           if(P4View == null || P4View.length() < 1) {
               log("View not set, assuming //depot/...", Project.MSG_WARN);
               P4View = "//depot/...";
           }
  -        
  +
           if(desc == null || desc.length() < 1) {
               log("Label Description not set, assuming 'AntLabel'", Project.MSG_WARN);
               desc = "AntLabel";
           }
  -        
  -		if(lock != null && !lock.equalsIgnoreCase("locked")) {
  -        	log("lock attribute invalid - ignoring",Project.MSG_WARN);
  -		}
  -        
  +
  +        if(lock != null && !lock.equalsIgnoreCase("locked")) {
  +            log("lock attribute invalid - ignoring",Project.MSG_WARN);
  +        }
  +
           if(name == null || name.length() < 1) {
               SimpleDateFormat formatter = new SimpleDateFormat ("yyyy.MM.dd-hh:mm");
               Date now = new Date();
               name = "AntLabel-"+formatter.format(now);
               log("name not set, assuming '"+name+"'", Project.MSG_WARN);
           }
  -        
  -        
  +
  +
           //We have to create a unlocked label first
  -        String newLabel = 
  +        String newLabel =
               "Label: "+name+"\n"+
               "Description: "+desc+"\n"+
               "Options: unlocked\n"+
  @@ -138,56 +138,56 @@
           handler.setOutput(newLabel);
   
           execP4Command("label -i", handler);
  -        
  +
           execP4Command("labelsync -l "+name, new P4HandlerAdapter() {
               public void process(String line) {
                   log(line, Project.MSG_VERBOSE);
               }
           });
  -        
  -        
  +
  +
           log("Created Label "+name+" ("+desc+")", Project.MSG_INFO);
   
           //Now lock if required
           if (lock != null && lock.equalsIgnoreCase("locked"))  {
  -        
  -        	log("Modifying lock status to 'locked'",Project.MSG_INFO);
  +
  +            log("Modifying lock status to 'locked'",Project.MSG_INFO);
   
  -        	final StringBuffer labelSpec = new StringBuffer();
  -            
  -			//Read back the label spec from perforce, 
  +            final StringBuffer labelSpec = new StringBuffer();
  +
  +            //Read back the label spec from perforce,
               //Replace Options
               //Submit back to Perforce
  -            
  -        	handler = new P4HandlerAdapter()  {
  -           		public void process(String line)  {
  -                	log(line, Project.MSG_VERBOSE);
  -                    
  -					if(util.match("/^Options:/",line)) {
  -   	                	line = "Options: "+lock;
  -					}
  -                    
  +
  +            handler = new P4HandlerAdapter()  {
  +                public void process(String line)  {
  +                    log(line, Project.MSG_VERBOSE);
  +
  +                    if(util.match("/^Options:/",line)) {
  +                        line = "Options: "+lock;
  +                    }
  +
                       labelSpec.append(line+"\n");
  -           		}
  -        	};
  -        
  -        	
  -            
  -			execP4Command("label -o "+name, handler);
  +                }
  +            };
  +
  +
  +
  +            execP4Command("label -o "+name, handler);
               log(labelSpec.toString(),Project.MSG_DEBUG);
   
               log("Now locking label...",Project.MSG_VERBOSE);
  -			handler = new P4HandlerAdapter() {
  -				public void process(String line) {
  -					log(line, Project.MSG_VERBOSE);
  -				}
  -        	};
  +            handler = new P4HandlerAdapter() {
  +                public void process(String line) {
  +                    log(line, Project.MSG_VERBOSE);
  +                }
  +            };
   
               handler.setOutput(labelSpec.toString());
  -			execP4Command("label -i", handler);
  +            execP4Command("label -i", handler);
           }
  -        
  -        
  +
  +
       }
   
   }
  
  
  
  1.4       +19 -17    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
  
  Index: P4Submit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- P4Submit.java	2001/10/28 21:30:22	1.3
  +++ P4Submit.java	2001/11/27 18:04:53	1.4
  @@ -63,8 +63,8 @@
   
   /** P4Submit - submit a numbered changelist to Perforce.
    *
  - * <B>Note:</B> P4Submit cannot (yet) submit the default changelist. 
  - * This shouldn't be a problem with the ANT API as the usual flow is 
  + * <B>Note:</B> P4Submit cannot (yet) submit the default changelist.
  + * This shouldn't be a problem with the ANT API as the usual flow is
    * P4Change to create a new numbered change followed by P4Edit then P4Submit.
    *
    * Example Usage:-<br>
  @@ -75,25 +75,27 @@
    */
   public class P4Submit extends P4Base {
   
  -    //ToDo: If dealing with default cl need to parse out <enter description here>    
  +    //ToDo: If dealing with default cl need to parse out <enter description here>
       public String change;
   
       public void setChange(String change) {
           this.change = change;
  -	}
  +    }
       public void execute() throws BuildException {
           if(change != null) {
  -	        execP4Command("submit -c "+change, new P4HandlerAdapter(){
  -		            public void process(String line) {
  -			            log(line, Project.MSG_VERBOSE);
  -				    }
  -		    });
  -	
  -	    } else {
  -	    //here we'd parse the output from change -o into submit -i 
  -	    //in order to support default change.
  -	    throw new BuildException("No change specified (no support for default change yet....");
  -    	}
  -	}
  -	
  +            execP4Command("submit -c "+change,
  +                new P4HandlerAdapter() {
  +                    public void process(String line) {
  +                        log(line, Project.MSG_VERBOSE);
  +                    }
  +                }
  +            );
  +
  +        } else {
  +            //here we'd parse the output from change -o into submit -i
  +            //in order to support default change.
  +            throw new BuildException("No change specified (no support for default change yet....");
  +        }
  +    }
  +
   }
  
  
  
  1.4       +26 -26    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/SimpleP4OutputHandler.java
  
  Index: SimpleP4OutputHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/SimpleP4OutputHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleP4OutputHandler.java	2001/10/28 21:30:22	1.3
  +++ SimpleP4OutputHandler.java	2001/11/27 18:04:53	1.4
  @@ -63,30 +63,30 @@
   
   public class SimpleP4OutputHandler extends P4HandlerAdapter {
   
  -	P4Base parent;
  -	public SimpleP4OutputHandler(P4Base parent) {
  -		this.parent = parent;
  -	}
  -	
  -	public void process(String line) throws BuildException {
  -		if(parent.util.match("/^exit/",line)) return;
  -
  -		//Throw exception on errors (except up-to-date)
  -		//p4 -s is unpredicatable. For example a server down
  -		//does not return error: markup
  -		//
  -		//Some forms producing commands (p4 -s change -o) do tag the output
  -		//others don't.....
  -		//Others mark errors as info, for example edit a file
  -		//which is already open for edit.....
  -		//Just look for error: - catches most things....
  -
  -		if(parent.util.match("/error:/", line) && !parent.util.match("/up-to-date/", line)) {
  -			throw new BuildException(line);
  -	
  -		} 
  -
  -		parent.log(parent.util.substitute("s/^.*: //",line), Project.MSG_INFO);
  -		
  -	}
  +    P4Base parent;
  +    public SimpleP4OutputHandler(P4Base parent) {
  +        this.parent = parent;
  +    }
  +
  +    public void process(String line) throws BuildException {
  +        if(parent.util.match("/^exit/",line)) return;
  +
  +        //Throw exception on errors (except up-to-date)
  +        //p4 -s is unpredicatable. For example a server down
  +        //does not return error: markup
  +        //
  +        //Some forms producing commands (p4 -s change -o) do tag the output
  +        //others don't.....
  +        //Others mark errors as info, for example edit a file
  +        //which is already open for edit.....
  +        //Just look for error: - catches most things....
  +
  +        if(parent.util.match("/error:/", line) && !parent.util.match("/up-to-date/", line)) {
  +            throw new BuildException(line);
  +
  +        }
  +
  +        parent.log(parent.util.substitute("s/^.*: //",line), Project.MSG_INFO);
  +
  +    }
   }
  
  
  
  1.7       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReport.java
  
  Index: XMLReport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReport.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLReport.java	2001/11/22 08:46:55	1.6
  +++ XMLReport.java	2001/11/27 18:04:53	1.7
  @@ -409,7 +409,7 @@
                   methods.addElement(method);
                   log("keeping " + signature);
               } else {
  -//				log("discarding " + signature);
  +//              log("discarding " + signature);
               }
           }
           return methods;
  
  
  
  1.4       +248 -248  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/bytecode/ClassPathLoader.java
  
  Index: ClassPathLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/bytecode/ClassPathLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassPathLoader.java	2001/11/18 12:25:55	1.3
  +++ ClassPathLoader.java	2001/11/27 18:04:54	1.4
  @@ -75,155 +75,155 @@
    * @author <a href="sbailliez@imediation.com">Stephane Bailliez</a>
    */
   public class ClassPathLoader {
  -	
  -	public final static FileLoader NULL_LOADER = new NullLoader();
  -	
  -	/** the list of files to look for */
  -	protected File[] files;
  -	
  -	/**
  -	 * create a new instance with a given classpath. It must be urls
  -	 * separated by the platform specific path separator.
  -	 * @param classPath the classpath to load all the classes from.
  -	 */
  -	public ClassPathLoader(String classPath){
  -		StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
  -		Vector entries = new Vector();
  -		while (st.hasMoreTokens()){
  -			File file = new File(st.nextToken());
  -			entries.addElement(file);
  -		}
  -		files = new File[entries.size()];
  -		entries.copyInto(files);
  -	}
  -	
  -	/**
  -	 * create a new instance with a given set of urls.
  -	 * @param entries valid file urls (either .jar, .zip or directory)
  -	 */
  -	public ClassPathLoader(String[] entries){
  -		files = new File[entries.length];
  -		for (int i = 0; i < entries.length; i++){
  -			files[i] = new File(entries[i]);
  -		}
  -	}
  -	
  -	/**
  -	 * create a new instance with a given set of urls
  -	 * @param entries file urls to look for classes (.jar, .zip or directory)
  -	 */
  -	public ClassPathLoader(File[] entries){
  -		files = entries;
  -	}
  -	
  -	/** the interface to implement to look up for specific resources */
  -	public interface FileLoader {
  -		/** the file url that is looked for .class files */
  -		public File getFile();
  -		/** return the set of classes found in the file */
  -		public ClassFile[] getClasses() throws IOException;
  -	}
  -	
  -	/**
  -	 * @return the set of <tt>FileLoader</tt> loaders matching the given classpath.
  -	 */
  -	public Enumeration loaders(){
  -		return new LoaderEnumeration();
  -	}
  -	
  -	/**
  -	 * return the whole set of classes in the classpath. Note that this method
  -	 * can be very resource demanding since it must load all bytecode from
  -	 * all classes in all resources in the classpath at a time.
  -	 * To process it in a less resource demanding way, it is maybe better to
  -	 * use the <tt>loaders()</tt> that will return loader one by one.
  -	 *
  -	 * @return the hashtable containing ALL classes that are found in the given
  -	 * classpath. Note that the first entry of a given classname will shadow
  -	 * classes with the same name (as a classloader does)
  -	 */
  -	public Hashtable getClasses() throws IOException {
  -		Hashtable map = new Hashtable();
  -		Enumeration enum = loaders();
  -		while ( enum.hasMoreElements() ){
  -			FileLoader loader = (FileLoader)enum.nextElement();
  -			System.out.println("Processing " + loader.getFile());
  -			long t0 = System.currentTimeMillis();
  -			ClassFile[] classes = loader.getClasses();
  -			long dt = System.currentTimeMillis() - t0;
  -			System.out.println("" + classes.length + " classes loaded in " + dt + "ms");
  -			for (int j = 0; j < classes.length; j++){
  -				String name = classes[j].getFullName();
  -				// do not allow duplicates entries to preserve 'classpath' behavior
  -				// first class in wins
  -				if ( !map.containsKey(name) ){
  -					map.put(name, classes[j]);
  -				}
  -			}
  -		}
  -		return map;
  -	}
  -	
  -	/** the loader enumeration that will return loaders */
  -	protected class LoaderEnumeration implements Enumeration {
  -		protected int index = 0;
  -		public boolean hasMoreElements(){
  -			return index < files.length;
  -		}
  -		public Object nextElement(){
  -			if (index >= files.length){
  -				throw new NoSuchElementException();
  -			}
  -			File file = files[index++];
  -			if ( !file.exists() ){
  -				return new NullLoader(file);
  -			}
  -			if ( file.isDirectory() ){
  -				// it's a directory
  -				return new DirectoryLoader(file);
  -			} else if ( file.getName().endsWith(".zip") || file.getName().endsWith(".jar") ){
  -				// it's a jar/zip file
  -				return new JarLoader(file);
  -			}
  -			return new NullLoader(file);
  -			
  -		}
  -	}
  -	
  -	/**
  -	 * useful methods to read the whole input stream in memory so that
  -	 * it can be accessed faster. Processing rt.jar and tools.jar from JDK 1.3.1
  -	 * brings time from 50s to 7s.
  -	 */
  +
  +    public final static FileLoader NULL_LOADER = new NullLoader();
  +
  +    /** the list of files to look for */
  +    protected File[] files;
  +
  +    /**
  +     * create a new instance with a given classpath. It must be urls
  +     * separated by the platform specific path separator.
  +     * @param classPath the classpath to load all the classes from.
  +     */
  +    public ClassPathLoader(String classPath){
  +        StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
  +        Vector entries = new Vector();
  +        while (st.hasMoreTokens()){
  +            File file = new File(st.nextToken());
  +            entries.addElement(file);
  +        }
  +        files = new File[entries.size()];
  +        entries.copyInto(files);
  +    }
  +
  +    /**
  +     * create a new instance with a given set of urls.
  +     * @param entries valid file urls (either .jar, .zip or directory)
  +     */
  +    public ClassPathLoader(String[] entries){
  +        files = new File[entries.length];
  +        for (int i = 0; i < entries.length; i++){
  +            files[i] = new File(entries[i]);
  +        }
  +    }
  +
  +    /**
  +     * create a new instance with a given set of urls
  +     * @param entries file urls to look for classes (.jar, .zip or directory)
  +     */
  +    public ClassPathLoader(File[] entries){
  +        files = entries;
  +    }
  +
  +    /** the interface to implement to look up for specific resources */
  +    public interface FileLoader {
  +        /** the file url that is looked for .class files */
  +        public File getFile();
  +        /** return the set of classes found in the file */
  +        public ClassFile[] getClasses() throws IOException;
  +    }
  +
  +    /**
  +     * @return the set of <tt>FileLoader</tt> loaders matching the given classpath.
  +     */
  +    public Enumeration loaders(){
  +        return new LoaderEnumeration();
  +    }
  +
  +    /**
  +     * return the whole set of classes in the classpath. Note that this method
  +     * can be very resource demanding since it must load all bytecode from
  +     * all classes in all resources in the classpath at a time.
  +     * To process it in a less resource demanding way, it is maybe better to
  +     * use the <tt>loaders()</tt> that will return loader one by one.
  +     *
  +     * @return the hashtable containing ALL classes that are found in the given
  +     * classpath. Note that the first entry of a given classname will shadow
  +     * classes with the same name (as a classloader does)
  +     */
  +    public Hashtable getClasses() throws IOException {
  +        Hashtable map = new Hashtable();
  +        Enumeration enum = loaders();
  +        while ( enum.hasMoreElements() ){
  +            FileLoader loader = (FileLoader)enum.nextElement();
  +            System.out.println("Processing " + loader.getFile());
  +            long t0 = System.currentTimeMillis();
  +            ClassFile[] classes = loader.getClasses();
  +            long dt = System.currentTimeMillis() - t0;
  +            System.out.println("" + classes.length + " classes loaded in " + dt + "ms");
  +            for (int j = 0; j < classes.length; j++){
  +                String name = classes[j].getFullName();
  +                // do not allow duplicates entries to preserve 'classpath' behavior
  +                // first class in wins
  +                if ( !map.containsKey(name) ){
  +                    map.put(name, classes[j]);
  +                }
  +            }
  +        }
  +        return map;
  +    }
  +
  +    /** the loader enumeration that will return loaders */
  +    protected class LoaderEnumeration implements Enumeration {
  +        protected int index = 0;
  +        public boolean hasMoreElements(){
  +            return index < files.length;
  +        }
  +        public Object nextElement(){
  +            if (index >= files.length){
  +                throw new NoSuchElementException();
  +            }
  +            File file = files[index++];
  +            if ( !file.exists() ){
  +                return new NullLoader(file);
  +            }
  +            if ( file.isDirectory() ){
  +                // it's a directory
  +                return new DirectoryLoader(file);
  +            } else if ( file.getName().endsWith(".zip") || file.getName().endsWith(".jar") ){
  +                // it's a jar/zip file
  +                return new JarLoader(file);
  +            }
  +            return new NullLoader(file);
  +
  +        }
  +    }
  +
  +    /**
  +     * useful methods to read the whole input stream in memory so that
  +     * it can be accessed faster. Processing rt.jar and tools.jar from JDK 1.3.1
  +     * brings time from 50s to 7s.
  +     */
       public static InputStream getCachedStream(InputStream is) throws IOException {
  -		is = new BufferedInputStream(is);
  -		byte[] buffer = new byte[8192];
  -		ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
  -		int n;
  -		baos.reset();
  -		while ((n = is.read(buffer, 0, buffer.length)) != -1) {
  -			baos.write(buffer, 0, n);
  -		}
  -		is.close();
  -		return new ByteArrayInputStream(baos.toByteArray());
  +        is = new BufferedInputStream(is);
  +        byte[] buffer = new byte[8192];
  +        ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
  +        int n;
  +        baos.reset();
  +        while ((n = is.read(buffer, 0, buffer.length)) != -1) {
  +            baos.write(buffer, 0, n);
  +        }
  +        is.close();
  +        return new ByteArrayInputStream(baos.toByteArray());
       }
   }
   
   /** a null loader to return when the file is not valid */
   class NullLoader implements ClassPathLoader.FileLoader {
  -	private File file;
  -	NullLoader(){
  -		this(null);
  -	}
  -	NullLoader(File file){
  -		this.file = file;
  -	}
  -	public File getFile(){
  -		return file;
  -	}
  -	public ClassFile[] getClasses() throws IOException {
  -		return new ClassFile[0];
  -	}
  +    private File file;
  +    NullLoader(){
  +        this(null);
  +    }
  +    NullLoader(File file){
  +        this.file = file;
  +    }
  +    public File getFile(){
  +        return file;
  +    }
  +    public ClassFile[] getClasses() throws IOException {
  +        return new ClassFile[0];
  +    }
   }
   
   /**
  @@ -232,30 +232,30 @@
    * entry.
    */
   class JarLoader implements ClassPathLoader.FileLoader {
  -	private File file;
  -	JarLoader(File file){
  -		this.file = file;
  -	}
  -	public File getFile(){
  -		return file;
  -	}
  -	public ClassFile[] getClasses() throws IOException {
  -		ZipFile zipFile = new ZipFile(file);
  -		Vector v = new Vector();
  -		Enumeration entries = zipFile.entries();
  -		while (entries.hasMoreElements()){
  -			ZipEntry entry = (ZipEntry)entries.nextElement();
  -			if (entry.getName().endsWith(".class")){
  -				InputStream is = ClassPathLoader.getCachedStream(zipFile.getInputStream(entry));
  -				ClassFile classFile = new ClassFile(is);
  -				is.close();
  -				v.addElement(classFile);
  -			}
  -		}
  -		ClassFile[] classes = new ClassFile[v.size()];
  -		v.copyInto(classes);
  -		return classes;
  -	}
  +    private File file;
  +    JarLoader(File file){
  +        this.file = file;
  +    }
  +    public File getFile(){
  +        return file;
  +    }
  +    public ClassFile[] getClasses() throws IOException {
  +        ZipFile zipFile = new ZipFile(file);
  +        Vector v = new Vector();
  +        Enumeration entries = zipFile.entries();
  +        while (entries.hasMoreElements()){
  +            ZipEntry entry = (ZipEntry)entries.nextElement();
  +            if (entry.getName().endsWith(".class")){
  +                InputStream is = ClassPathLoader.getCachedStream(zipFile.getInputStream(entry));
  +                ClassFile classFile = new ClassFile(is);
  +                is.close();
  +                v.addElement(classFile);
  +            }
  +        }
  +        ClassFile[] classes = new ClassFile[v.size()];
  +        v.copyInto(classes);
  +        return classes;
  +    }
   }
   
   /**
  @@ -264,93 +264,93 @@
    * match the directory ?
    */
   class DirectoryLoader implements ClassPathLoader.FileLoader {
  -	private File directory;
  -	
  -	DirectoryLoader(File dir){
  -		directory = dir;
  -	}
  -	public File getFile(){
  -		return directory;
  -	}
  -	public ClassFile[] getClasses() throws IOException {
  -		Vector v = new Vector();
  -		Vector files = listFiles( directory, new ClassFilter(), true);
  -		for (int i = 0; i < files.size(); i++){
  -			File file = (File)files.elementAt(i);
  -			InputStream is = null;
  -			try {
  -				is = ClassPathLoader.getCachedStream(new FileInputStream(file));
  -				ClassFile classFile = new ClassFile(is);
  -				is.close();
  -				is = null;
  -				v.addElement(classFile);
  -			} finally {
  -				if (is != null){
  -					try {
  -						is.close();
  -					} catch (IOException ignored){}
  -				}
  -			}
  -		}
  -		ClassFile[] classes = new ClassFile[v.size()];
  -		v.copyInto(classes);
  -		return classes;
  -	}
  -
  -	/**
  -	 * List files that obeys to a specific filter recursively from a given base
  -	 * directory.
  -	 * @param   directory   the directory where to list the files from.
  -	 * @param   filter      the file filter to apply
  -	 * @param   recurse     tells whether or not the listing is recursive.
  -	 * @return  the list of <tt>File</tt> objects that applies to the given
  -	 *          filter.
  -	 */
  -	public static Vector listFiles(File directory, FilenameFilter filter, boolean recurse){
  -		if (!directory.isDirectory()){
  -			 throw new IllegalArgumentException(directory + " is not a directory");
  -		}
  -		Vector list = new Vector();
  -		listFilesTo(list, directory, filter, recurse);
  -		return list;
  -	}
  -
  -	/**
  -	 * List and add files to a given list. As a convenience it sends back the
  -	 * instance of the list given as a parameter.
  -	 * @param   list    the list of files where the filtered files should be added
  -	 * @param   directory   the directory where to list the files from.
  -	 * @param   filter      the file filter to apply
  -	 * @param   recurse     tells whether or not the listing is recursive.
  -	 * @return  the list instance that was passed as the <tt>list</tt> argument.
  -	 */
  -	private static Vector listFilesTo(Vector list, File directory, FilenameFilter filter, boolean recurse){
  -		String[] files = directory.list(filter);
  -		for (int i = 0; i < files.length; i++){
  -			list.addElement( new File(directory, files[i]) );
  -		}
  -		files = null;   // we don't need it anymore
  -		if (recurse){
  -			String[] subdirs = directory.list( new DirectoryFilter() );
  -			for (int i = 0; i < subdirs.length; i++){
  -				listFilesTo(list, new File(directory, subdirs[i]), filter, recurse);
  -			}
  -		}
  -		return list;
  -	}
  +    private File directory;
   
  +    DirectoryLoader(File dir){
  +        directory = dir;
  +    }
  +    public File getFile(){
  +        return directory;
  +    }
  +    public ClassFile[] getClasses() throws IOException {
  +        Vector v = new Vector();
  +        Vector files = listFiles( directory, new ClassFilter(), true);
  +        for (int i = 0; i < files.size(); i++){
  +            File file = (File)files.elementAt(i);
  +            InputStream is = null;
  +            try {
  +                is = ClassPathLoader.getCachedStream(new FileInputStream(file));
  +                ClassFile classFile = new ClassFile(is);
  +                is.close();
  +                is = null;
  +                v.addElement(classFile);
  +            } finally {
  +                if (is != null){
  +                    try {
  +                        is.close();
  +                    } catch (IOException ignored){}
  +                }
  +            }
  +        }
  +        ClassFile[] classes = new ClassFile[v.size()];
  +        v.copyInto(classes);
  +        return classes;
  +    }
  +
  +    /**
  +     * List files that obeys to a specific filter recursively from a given base
  +     * directory.
  +     * @param   directory   the directory where to list the files from.
  +     * @param   filter      the file filter to apply
  +     * @param   recurse     tells whether or not the listing is recursive.
  +     * @return  the list of <tt>File</tt> objects that applies to the given
  +     *          filter.
  +     */
  +    public static Vector listFiles(File directory, FilenameFilter filter, boolean recurse){
  +        if (!directory.isDirectory()){
  +             throw new IllegalArgumentException(directory + " is not a directory");
  +        }
  +        Vector list = new Vector();
  +        listFilesTo(list, directory, filter, recurse);
  +        return list;
  +    }
  +
  +    /**
  +     * List and add files to a given list. As a convenience it sends back the
  +     * instance of the list given as a parameter.
  +     * @param   list    the list of files where the filtered files should be added
  +     * @param   directory   the directory where to list the files from.
  +     * @param   filter      the file filter to apply
  +     * @param   recurse     tells whether or not the listing is recursive.
  +     * @return  the list instance that was passed as the <tt>list</tt> argument.
  +     */
  +    private static Vector listFilesTo(Vector list, File directory, FilenameFilter filter, boolean recurse){
  +        String[] files = directory.list(filter);
  +        for (int i = 0; i < files.length; i++){
  +            list.addElement( new File(directory, files[i]) );
  +        }
  +        files = null;   // we don't need it anymore
  +        if (recurse){
  +            String[] subdirs = directory.list( new DirectoryFilter() );
  +            for (int i = 0; i < subdirs.length; i++){
  +                listFilesTo(list, new File(directory, subdirs[i]), filter, recurse);
  +            }
  +        }
  +        return list;
  +    }
  +
   }
   
   /** Convenient filter that accepts only directory <tt>File</tt> */
   class DirectoryFilter implements FilenameFilter {
  -	public boolean accept(File directory, String name){
  -		File pathname = new File(directory, name);
  -		return pathname.isDirectory();
  -	}
  +    public boolean accept(File directory, String name){
  +        File pathname = new File(directory, name);
  +        return pathname.isDirectory();
  +    }
   }
   /** convenient filter to accept only .class files */
   class ClassFilter implements FilenameFilter {
  -	public boolean accept(File dir, String name){
  -		return name.endsWith(".class");
  -	}
  +    public boolean accept(File dir, String name){
  +        return name.endsWith(".class");
  +    }
   }
  
  
  
  1.3       +208 -208  jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/bytecode/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/bytecode/Utils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Utils.java	2001/10/28 21:30:23	1.2
  +++ Utils.java	2001/11/27 18:04:54	1.3
  @@ -64,320 +64,320 @@
    * @author <a href="sbailliez@imediation.com">Stephane Bailliez</a>
    */
   public class Utils {
  -	/** public access flag */
  +    /** public access flag */
       public final static short ACC_PUBLIC = 1;
  -	/** private access flag */
  +    /** private access flag */
       public final static short ACC_PRIVATE = 2;
  -	/** protected access flag */
  +    /** protected access flag */
       public final static short ACC_PROTECTED = 4;
  -	/** static access flag */
  +    /** static access flag */
       public final static short ACC_STATIC = 8;
  -	/** final access flag */
  +    /** final access flag */
       public final static short ACC_FINAL = 16;
  -	/** super access flag */
  +    /** super access flag */
       public final static short ACC_SUPER = 32;
  -	/** synchronized access flag */
  +    /** synchronized access flag */
       public final static short ACC_SYNCHRONIZED = 32;
  -	/** volatile access flag */
  +    /** volatile access flag */
       public final static short ACC_VOLATILE = 64;
  -	/** transient access flag */
  +    /** transient access flag */
       public final static short ACC_TRANSIENT = 128;
  -	/** native access flag */
  +    /** native access flag */
       public final static short ACC_NATIVE = 256;
  -	/** interface access flag */
  +    /** interface access flag */
       public final static short ACC_INTERFACE = 512;
  -	/** abstract access flag */
  +    /** abstract access flag */
       public final static short ACC_ABSTRACT = 1024;
  -	/** strict access flag */
  +    /** strict access flag */
       public final static short ACC_STRICT = 2048;
   
  -	/** private constructor */
  -	private Utils(){
  -	}
  -	
  -	/**
  -	 * return an UTF8 value from the pool located a a specific index.
  -	 * @param pool the constant pool to look at
  -	 * @param index index of the UTF8 value in the constant pool
  -	 * @return the value of the string if it exists
  -	 * @throws ClassCastException if the index is not an UTF8 constant.
  -	 */
  -	public static String getUTF8Value(ConstantPool pool, int index){
  -		return ((Utf8CPInfo)pool.getEntry(index)).getValue();
  -	}
  -	
  -	/**
  -	 * parse all parameters from a descritor into fields of java name.
  -	 * @param descriptor of a method.
  -	 * @return the parameter list of a given method descriptor. Each string
  -	 * represent a java object with its fully qualified classname or the
  -	 * primitive name such as int, long, ...
  -	 */
  -	public static String[] getMethodParams(String descriptor){
  -		int i = 0;
  -		if (descriptor.charAt(i) != '('){
  -			throw new IllegalArgumentException("Method descriptor should start with a '('");
  -		}
  -		Vector params = new Vector();
  -		StringBuffer param = new StringBuffer();
  +    /** private constructor */
  +    private Utils(){
  +    }
  +
  +    /**
  +     * return an UTF8 value from the pool located a a specific index.
  +     * @param pool the constant pool to look at
  +     * @param index index of the UTF8 value in the constant pool
  +     * @return the value of the string if it exists
  +     * @throws ClassCastException if the index is not an UTF8 constant.
  +     */
  +    public static String getUTF8Value(ConstantPool pool, int index){
  +        return ((Utf8CPInfo)pool.getEntry(index)).getValue();
  +    }
  +
  +    /**
  +     * parse all parameters from a descritor into fields of java name.
  +     * @param descriptor of a method.
  +     * @return the parameter list of a given method descriptor. Each string
  +     * represent a java object with its fully qualified classname or the
  +     * primitive name such as int, long, ...
  +     */
  +    public static String[] getMethodParams(String descriptor){
  +        int i = 0;
  +        if (descriptor.charAt(i) != '('){
  +            throw new IllegalArgumentException("Method descriptor should start with a '('");
  +        }
  +        Vector params = new Vector();
  +        StringBuffer param = new StringBuffer();
           i++;
           while ( (i = descriptor2java(descriptor, i, param)) < descriptor.length() ){
  -			params.add(param.toString());
  -			param.setLength(0); // reset
  -			if (descriptor.charAt(i) == ')'){
  -				i++;
  -				break;
  -			}
  -		}
  -		String[] array = new String[params.size()];
  -		params.copyInto(array);
  -		return array;
  -	}
  -	
  -	/**
  -	 * return the object type of a return type.
  -	 * @param descriptor
  -	 * @return get the return type objet of a given descriptor
  -	 */
  -	public static String getMethodReturnType(String descriptor){
  -		int pos = descriptor.indexOf(')');
  -		StringBuffer rettype = new StringBuffer();
  -		descriptor2java(descriptor, pos + 1, rettype);
  -		return rettype.toString();
  -    }
  -	
  -	/**
  -	 * Parse a single descriptor symbol and returns it java equivalent.
  -	 * @param descriptor the descriptor symbol.
  -	 * @param i the index to look at the symbol in the descriptor string
  -	 * @param sb the stringbuffer to return the java equivalent of the symbol
  -	 * @return the index after the descriptor symbol
  -	 */
  -	public static int descriptor2java(String descriptor, int i, StringBuffer sb){
  -		// get the dimension
  -		StringBuffer dim = new StringBuffer();
  -		for (;descriptor.charAt(i) == '['; i++){
  -			dim.append("[]");
  -		}
  -		// now get the type
  -		switch (descriptor.charAt(i)){
  -			case 'B': sb.append("byte"); break;
  -			case 'C': sb.append("char"); break;
  -			case 'D': sb.append("double"); break;
  -			case 'F': sb.append("float"); break;
  -			case 'I': sb.append("int"); break;
  -			case 'J': sb.append("long"); break;
  -			case 'S': sb.append("short"); break;
  -			case 'Z': sb.append("boolean"); break;
  -			case 'V': sb.append("void"); break;
  -			case 'L':
  -				// it is a class
  -				int pos = descriptor.indexOf(';', i + 1);
  -				String classname = descriptor.substring(i + 1, pos).replace('/', '.');
  -				sb.append(classname);
  -				i = pos;
  -				break;
  -			default:
  -				//@todo, yeah this happens because I got things like:
  -				// ()Ljava/lang/Object; and it will return and ) will be here
  -				// think about it.
  -				
  -				//ooooops should never happen
  -				//throw new IllegalArgumentException("Invalid descriptor symbol: '" + i + "' in '" + descriptor + "'");
  -		}
  -		sb.append(dim.toString());
  -		return ++i;
  -	}
  -	
  -	/**
  -	 * check for abstract access
  -	 * @param access_flags access flags
  -	 */
  +            params.add(param.toString());
  +            param.setLength(0); // reset
  +            if (descriptor.charAt(i) == ')'){
  +                i++;
  +                break;
  +            }
  +        }
  +        String[] array = new String[params.size()];
  +        params.copyInto(array);
  +        return array;
  +    }
  +
  +    /**
  +     * return the object type of a return type.
  +     * @param descriptor
  +     * @return get the return type objet of a given descriptor
  +     */
  +    public static String getMethodReturnType(String descriptor){
  +        int pos = descriptor.indexOf(')');
  +        StringBuffer rettype = new StringBuffer();
  +        descriptor2java(descriptor, pos + 1, rettype);
  +        return rettype.toString();
  +    }
  +
  +    /**
  +     * Parse a single descriptor symbol and returns it java equivalent.
  +     * @param descriptor the descriptor symbol.
  +     * @param i the index to look at the symbol in the descriptor string
  +     * @param sb the stringbuffer to return the java equivalent of the symbol
  +     * @return the index after the descriptor symbol
  +     */
  +    public static int descriptor2java(String descriptor, int i, StringBuffer sb){
  +        // get the dimension
  +        StringBuffer dim = new StringBuffer();
  +        for (;descriptor.charAt(i) == '['; i++){
  +            dim.append("[]");
  +        }
  +        // now get the type
  +        switch (descriptor.charAt(i)){
  +            case 'B': sb.append("byte"); break;
  +            case 'C': sb.append("char"); break;
  +            case 'D': sb.append("double"); break;
  +            case 'F': sb.append("float"); break;
  +            case 'I': sb.append("int"); break;
  +            case 'J': sb.append("long"); break;
  +            case 'S': sb.append("short"); break;
  +            case 'Z': sb.append("boolean"); break;
  +            case 'V': sb.append("void"); break;
  +            case 'L':
  +                // it is a class
  +                int pos = descriptor.indexOf(';', i + 1);
  +                String classname = descriptor.substring(i + 1, pos).replace('/', '.');
  +                sb.append(classname);
  +                i = pos;
  +                break;
  +            default:
  +                //@todo, yeah this happens because I got things like:
  +                // ()Ljava/lang/Object; and it will return and ) will be here
  +                // think about it.
  +
  +                //ooooops should never happen
  +                //throw new IllegalArgumentException("Invalid descriptor symbol: '" + i + "' in '" + descriptor + "'");
  +        }
  +        sb.append(dim.toString());
  +        return ++i;
  +    }
  +
  +    /**
  +     * check for abstract access
  +     * @param access_flags access flags
  +     */
       public static boolean isAbstract(int access_flags) {
           return (access_flags & ACC_ABSTRACT) != 0;
       }
  -	/**
  -	 * check for public access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for public access
  +     * @param access_flags access flags
  +     */
       public static boolean isPublic(int access_flags) {
           return (access_flags & ACC_PUBLIC) != 0;
       }
  -	/**
  -	 * check for a static access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for a static access
  +     * @param access_flags access flags
  +     */
       public static boolean isStatic(int access_flags) {
           return (access_flags & ACC_STATIC) != 0;
       }
  -	/**
  -	 *  check for native access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     *  check for native access
  +     * @param access_flags access flags
  +     */
       public static boolean isNative(int access_flags) {
           return (access_flags & ACC_NATIVE) != 0;
       }
  -	/**
  -	 * check for class access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for class access
  +     * @param access_flags access flags
  +     */
       public static boolean isClass(int access_flags) {
           return !isInterface(access_flags);
       }
  -	/**
  -	 * check for strict access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for strict access
  +     * @param access_flags access flags
  +     */
       public static boolean isStrict(int access_flags) {
           return (access_flags & ACC_STRICT) != 0;
       }
  -	/**
  -	 * check for interface access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for interface access
  +     * @param access_flags access flags
  +     */
       public static boolean isInterface(int access_flags) {
           return (access_flags & ACC_INTERFACE) != 0;
       }
  -	/**
  -	 * check for private access
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for private access
  +     * @param access_flags access flags
  +     */
       public static boolean isPrivate(int access_flags) {
           return (access_flags & ACC_PRIVATE) != 0;
       }
  -	/**
  -	 * check for transient flag
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for transient flag
  +     * @param access_flags access flags
  +     */
       public static boolean isTransient(int access_flags) {
           return (access_flags & ACC_TRANSIENT) != 0;
       }
  -	/**
  -	 * check for volatile flag
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for volatile flag
  +     * @param access_flags access flags
  +     */
       public static boolean isVolatile(int access_flags){
           return (access_flags & ACC_VOLATILE) != 0;
       }
  -	/**
  -	 * check for super flag
  -	 * @param access_flags access flag
  -	 */
  +    /**
  +     * check for super flag
  +     * @param access_flags access flag
  +     */
       public static boolean isSuper(int access_flags) {
           return (access_flags & ACC_SUPER) != 0;
       }
  -	/**
  -	 * check for protected flag
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for protected flag
  +     * @param access_flags access flags
  +     */
       public static boolean isProtected(int access_flags) {
           return (access_flags & ACC_PROTECTED) != 0;
       }
  -	/**
  -	 * chck for final flag
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * chck for final flag
  +     * @param access_flags access flags
  +     */
       public static boolean isFinal(int access_flags) {
           return (access_flags & ACC_FINAL) != 0;
       }
  -	/**
  -	 * check for synchronized flag
  -	 * @param access_flags access flags
  -	 */
  +    /**
  +     * check for synchronized flag
  +     * @param access_flags access flags
  +     */
       public static boolean isSynchronized(int access_flags) {
           return (access_flags & ACC_SYNCHRONIZED) != 0;
       }
  -	
  -	/**
  -	 * return the method access flag as java modifiers
  -	 * @param access_flags access flags
  -	 * @return the access flags as modifier strings
  -	 */
  +
  +    /**
  +     * return the method access flag as java modifiers
  +     * @param access_flags access flags
  +     * @return the access flags as modifier strings
  +     */
       public static String getMethodAccess(int access_flags) {
           StringBuffer sb = new StringBuffer();
           if(isPublic(access_flags)){
               sb.append("public ");
  -		} else if(isPrivate(access_flags)){
  +        } else if(isPrivate(access_flags)){
               sb.append("private ");
  -		} else if(isProtected(access_flags)){
  +        } else if(isProtected(access_flags)){
               sb.append("protected ");
  -		}
  -		if(isFinal(access_flags)){
  +        }
  +        if(isFinal(access_flags)){
               sb.append("final ");
  -		}
  +        }
           if(isStatic(access_flags)){
               sb.append("static ");
  -		}
  +        }
           if(isSynchronized(access_flags)){
               sb.append("synchronized ");
  -		}
  +        }
           if(isNative(access_flags)){
               sb.append("native ");
  -		}
  +        }
           if(isAbstract(access_flags)){
               sb.append("abstract ");
  -		}
  +        }
           return sb.toString().trim();
       }
   
  -	/**
  -	 * return the field access flag as java modifiers
  -	 * @param access_flags access flags
  -	 * @return the access flags as modifier strings
  -	 */
  +    /**
  +     * return the field access flag as java modifiers
  +     * @param access_flags access flags
  +     * @return the access flags as modifier strings
  +     */
       public static String getFieldAccess(int access_flags) {
           StringBuffer sb = new StringBuffer();
           if(isPublic(access_flags)){
               sb.append("public ");
  -		} else if(isPrivate(access_flags)){
  +        } else if(isPrivate(access_flags)){
               sb.append("private ");
  -		} else if (isProtected(access_flags)){
  +        } else if (isProtected(access_flags)){
               sb.append("protected ");
  -		}
  +        }
           if(isFinal(access_flags)){
               sb.append("final ");
  -		}
  +        }
           if(isStatic(access_flags)){
               sb.append("static ");
  -		}
  +        }
           if(isVolatile(access_flags)){
               sb.append("volatile ");
  -		}
  +        }
           if(isTransient(access_flags)){
               sb.append("transient ");
  -		}
  +        }
           return sb.toString().trim();
       }
   
  -	/**
  -	 * return the class access flag as java modifiers
  -	 * @param access_flags access flags
  -	 * @return the access flags as modifier strings
  -	 */
  +    /**
  +     * return the class access flag as java modifiers
  +     * @param access_flags access flags
  +     * @return the access flags as modifier strings
  +     */
       public static String getClassAccess(int access_flags) {
           StringBuffer sb = new StringBuffer();
           if(isPublic(access_flags)){
               sb.append("public ");
  -		} else if (isProtected(access_flags)){
  -			sb.append("protected ");
  -		} else if (isPrivate(access_flags)){
  -			sb.append("private ");
  -		}
  -		if(isFinal(access_flags)){
  +        } else if (isProtected(access_flags)){
  +            sb.append("protected ");
  +        } else if (isPrivate(access_flags)){
  +            sb.append("private ");
  +        }
  +        if(isFinal(access_flags)){
               sb.append("final ");
  -		}
  +        }
           if(isSuper(access_flags)){
               sb.append("/*super*/ ");
  -		}
  +        }
           if(isInterface(access_flags)){
               sb.append("interface ");
  -		}
  +        }
           if(isAbstract(access_flags)){
               sb.append("abstract ");
  -		}
  +        }
           if(isClass(access_flags)){
               sb.append("class ");
  -		}
  +        }
           return sb.toString().trim();
       }
   }
  
  
  
  1.5       +34 -34    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java
  
  Index: AntSoundPlayer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sound/AntSoundPlayer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AntSoundPlayer.java	2001/10/28 21:30:24	1.4
  +++ AntSoundPlayer.java	2001/11/27 18:04:54	1.5
  @@ -87,7 +87,7 @@
    * I have only tested this with .WAV and .AIFF sound file formats. Both seem to work fine.
    *
    * @author Nick Pellow
  - * @version $Revision: 1.4 $, $Date: 2001/10/28 21:30:24 $
  + * @version $Revision: 1.5 $, $Date: 2001/11/27 18:04:54 $
    */
   
   public class AntSoundPlayer implements LineListener, BuildListener {
  @@ -137,32 +137,32 @@
           AudioInputStream audioInputStream = null;
   
   
  -		try {
  -			audioInputStream = AudioSystem.getAudioInputStream(file);
  -		}
  -		catch (UnsupportedAudioFileException uafe) {
  -			project.log("Audio format is not yet supported: "+uafe.getMessage());
  -		}
  +        try {
  +            audioInputStream = AudioSystem.getAudioInputStream(file);
  +        }
  +        catch (UnsupportedAudioFileException uafe) {
  +            project.log("Audio format is not yet supported: "+uafe.getMessage());
  +        }
           catch (IOException ioe) {
               ioe.printStackTrace();
           }
   
  -		if (audioInputStream != null) {
  -			AudioFormat	format = audioInputStream.getFormat();
  -			DataLine.Info	info = new DataLine.Info(Clip.class, format,
  +        if (audioInputStream != null) {
  +            AudioFormat format = audioInputStream.getFormat();
  +            DataLine.Info   info = new DataLine.Info(Clip.class, format,
                                                AudioSystem.NOT_SPECIFIED);
  -			try {
  -				audioClip = (Clip) AudioSystem.getLine(info);
  -				audioClip.addLineListener(this);
  +            try {
  +                audioClip = (Clip) AudioSystem.getLine(info);
  +                audioClip.addLineListener(this);
                   audioClip.open(audioInputStream);
  -			}
  -			catch (LineUnavailableException e) {
  +            }
  +            catch (LineUnavailableException e) {
                   project.log("The sound device is currently unavailable");
                   return;
  -			}
  -			catch (IOException e) {
  -				e.printStackTrace();
  -			}
  +            }
  +            catch (IOException e) {
  +                e.printStackTrace();
  +            }
   
               if (duration != null) {
                   playClip(audioClip, duration.longValue());
  @@ -171,10 +171,10 @@
               }
               audioClip.drain();
               audioClip.close();
  -		}
  -		else {
  -			project.log("Can't get data from file " + file.getName());
  -		}
  +        }
  +        else {
  +            project.log("Can't get data from file " + file.getName());
  +        }
       }
   
       private void playClip(Clip clip, int loops) {
  @@ -203,16 +203,16 @@
           if (event.getType().equals(LineEvent.Type.STOP)) {
               Line line = event.getLine();
               line.close();
  -		}
  -		else if (event.getType().equals(LineEvent.Type.CLOSE)) {
  -			/*
  -			 *	There is a bug in JavaSound 0.90 (jdk1.3beta).
  -			 *	It prevents correct termination of the VM.
  -			 *	So we have to exit ourselves.
  -			 */
  -			//System.exit(0);
  -		}
  -	}
  +        }
  +        else if (event.getType().equals(LineEvent.Type.CLOSE)) {
  +            /*
  +             *  There is a bug in JavaSound 0.90 (jdk1.3beta).
  +             *  It prevents correct termination of the VM.
  +             *  So we have to exit ourselves.
  +             */
  +            //System.exit(0);
  +        }
  +    }
   
   
       /**
  @@ -220,7 +220,7 @@
        */
       public void buildStarted(BuildEvent event){
       }
  -    
  +
       /**
        *  Fired after the last target has finished. This event
        *  will still be thrown if an error occured during the build.
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message