Here are the patches to sync up the committed version of these commands with
the version I have been refining over the last couple of weeks. I've tried
to minimise the deltas as much as possible, but the CSharp task in
particular shows a very wide variation.

That is because I have added lots of stuff to make the build process
workable, and then went and had the JavaStyle plugin in JEdit make a mess of
the results (all before Stefan committed the 0.2 set). The fact that the
JavaStyle plugin is moderately destructive to source under windows is now
known, but not before I had to whip the code into the 'Accident and
Emergency' ward and try and recover any recent changes from the mess it had
made.

Whatever, the code is now better javadocumented, and somwhat more tested.

The big changes are
-beta 1 tested
-automatic reference inclusion (imagine a hard coded list of jars stuck in
to substitute for the lack of the classpath concept)
-an 'extraoptions' attribute for any command line options the tasks don't
support
-attribute documentation moved to the dotnet.html file

I will follow up this message with the doc pages.

-steve

NB: If anyone wants an app to test against, I have a dotnet project on
sourceforge to provide postcode to lat/long mapping as a soap service:
http://sourceforge.net/projects/geocode/ which is the real test harness for
these ant tasks. It's short of the servlet equivalent and multicontinent
support.




Index: CSharp.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
retrieving revision 1.1
diff -u -r1.1 CSharp.java
--- CSharp.java 2000/11/09 16:18:50     1.1
+++ CSharp.java 2000/11/22 23:25:26
@@ -2,10 +2,10 @@
 *******************************************************************
 *
 * File:         Csharp.java
-* RCS:          $Header: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
 1.1 2000/11/09 16:18:50 bodewig Exp $
+* RCS:          $Header:$
 * Author:       Steve Loughran
 * Created:      July 21,  2000
-* Modified:     $Modtime: 00-11-01 12:57 $
+* Modified:     $Modtime:$
 * Language:     Java
 * Status:       Experimental 
 *
@@ -67,11 +67,11 @@
 
 /* build notes
 
--The reference CD to listen to while editing this file is 
-nap: Underworld  - Everything, Everything
--variable naming policy from Fowler's refactoring book.
--tested against the PDC pre-beta of csc.exe; future versions will 
-inevitably change things
+    -The reference CD to listen to while editing this file is 
+        nap: Underworld  - Everything, Everything
+    -variable naming policy from Fowler's refactoring book.
+    -tested against the PDC pre-beta of csc.exe; future versions will 
+     inevitably change things
 */
 
 // ====================================================================
@@ -89,11 +89,8 @@
 import org.apache.tools.ant.taskdefs.*;
 import org.apache.tools.ant.types.*;
 import java.io.*;
-import java.util.*;
-import java.text.*;
 
 
-// ====================================================================
 /**
 This task compiles CSharp source into executables or modules.
 The task will only work on win2K until other platforms support csc.exe or 
@@ -115,474 +112,507 @@
 
 <p>
 
-<table border="1" cellpadding="2" cellspacing="0">
-  <tr>
-    <td valign="top"><b>Attribute</b></td>
-    <td valign="top"><b>Description</b></td>
-    <td align="center" valign="top"><b>Example</b></td>
-  </tr>
-
-
-<tr>
-    <td valign="top">additionalModules
-    <td valign="top">Semicolon separated list of modules to refer to
-    </tr>
-  <tr>
-    <td valign="top">defaultexcludes</td>
-    <td valign="top">indicates whether default excludes should be used or not
-      (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when 
omitted.</td>
-  </tr>
-<tr>
-    <td valign="top">definitions
-    <td valign="top">defined constants
-    <td valign="top"> "RELEASE;BETA1"
-    </tr>
-<tr>
-    <td valign="top">debug
-    <td valign="top">include debug information
-    <td valign="top">"true" or "false"
-    </tr>
-
-<tr>
-    <td valign="top">docFile
-    <td valign="top">name of file for documentation
-    <td valign="top">"doc.xml"
-    </tr>
-  <tr>
-    <td valign="top">excludes</td>
-    <td valign="top">comma separated list of patterns of files that must be
-      excluded. No files (except default excludes) are excluded when 
omitted.</td>
-  </tr>
-  <tr>
-    <td valign="top">excludesfile</td>
-    <td valign="top">the name of a file. Each line of this file is
-      taken to be an exclude pattern</td>
-  </tr>
-<tr>
-    <td valign="top">failOnError
-    <td valign="top">Should a failed compile halt the build?
-    <td valign="top">"true" or "false"
-    </tr>
-  <tr>
-    <td valign="top">includes</td>
-    <td valign="top">comma separated list of patterns of files that must be
-      included. All files are included when omitted.</td>
-  </tr>
-  <tr>
-    <td valign="top">includesfile</td>
-    <td valign="top">the name of a file. Each line of this file is
-      taken to be an include pattern</td>
-  </tr>
-<tr>
-    <td valign="top">incremental
-    <td valign="top">Incremental build flag. Off by default
-    <td valign="top">"false"
-    </tr>
-<tr>
-    <td valign="top">mainClass
-    <td valign="top">name of main class for executables
-    <td valign="top">com.example.project.entrypoint
-    </tr>
-<tr>
-    <td valign="top">optimize
-    <td valign="top">optimisation flag
-    <td valign="top">"true" or "false"
-    </tr>
-<tr>
-    <td valign="top">outputFile
-    <td valign="top">filename of output
-    <td valign="top">"example.exe"
-    </tr>
-<tr>
-    <td valign="top">references
-    <td valign="top">Semicolon separated list of dlls to refer to
-    </tr>
-<tr>
-    <td valign="top">srcDir
-    <td valign="top">source directory (default = project directory)
-    <td valign="top">
-    </tr>
-<tr>
-    <td valign="top">targetType
-    <td valign="top">Type of target
-    <td valign="top">"exe","module","winexe","library"
-    </tr>
-<tr>
-    <td valign="top">unsafe
-    <td valign="top">enable unsafe code
-    <td valign="top">"true" or "false"
-    </tr>
-<tr>
-    <td valign="top">warnLevel
-    <td valign="top">level of warning
-    <td valign="top">1-4
-    </tr>
-<tr>
-    <td valign="top">win32Icon
-    <td valign="top">filename of icon to include
-    <td valign="top">
-    </tr>
 
-</table>
-
-
-
 <p>
-The first pass is just a proof of concept; enough to test. 
-<p>
 TODO
 <ol>
-       <li>get PATH incorporated into reference/module lookup
-       <li>is Win32Icon broken?
-       <li>all the missing options
+    <li>is incremental build still broken in beta-1?
+    <li>is Win32Icon broken?
+    <li>all the missing options
 </ol>
 <p>
 History
-       <Table>
-       <tr><td>0.2</td>
-               <td> Slightly different</td>
-               <td> Split command execution to a separate class; 
-       </tr>
-       <tr><td>0.1</td>
-               <td> "I can't believe it's so rudimentary"</td>
-               <td>  First pass; minimal builds only support; 
-       </tr>
+    <Table>
+    <tr><td>0.3</td>
+        <td> Beta 1 edition </td>
+        <td> To avoid having to remember which assemblies to include, 
+        the task automatically refers to the main dotnet libraries in Beta1.
+        
+    </tr>    <tr><td>0.2</td>
+        <td> Slightly different</td>
+        <td> Split command execution to a separate class; 
+    </tr>
+    <tr><td>0.1</td>
+        <td> "I can't believe it's so rudimentary"</td>
+        <td>  First pass; minimal builds only support; 
+    </tr>
 
-       </table>
[EMAIL PROTECTED] 0.2
+    </table>
[EMAIL PROTECTED] 0.3
 @author Steve Loughran [EMAIL PROTECTED]
 
  */
-// ====================================================================
 
 public class CSharp 
     extends org.apache.tools.ant.taskdefs.MatchingTask {
 
-    
//============================================================================= 
   
     /** constructor inits everything and set up the search pattern
-     */
-
+    */
+    
     public CSharp () {
         Clear();
         setIncludes(csc_file_pattern);
     }
-
-
-    
//-----------------------------------------------------------------------------
+    
     /** name of the executable. the .exe suffix is deliberately not included 
      * in anticipation of the unix version
      */
     protected static final String csc_exe_name="csc";
-
+    
     /** what is the file extension we search on?
      */
     protected static final String csc_file_ext="cs";
-
-    /** and now derive the search pattern from the extension 
+    
+    /** derive the search pattern from the extension 
      */
-    protected static final String csc_file_pattern="*."+csc_file_ext;
-
-
-    
//============================================================================= 
   
+    protected static final String csc_file_pattern="**/*."+csc_file_ext;
+    
     /** list of reference classes. (pretty much a classpath equivalent)
      */
-
     protected  String _references;
-
+    
     /**
-     * Set the reference list to be used for this compilation.
+     *  Set the reference list to be used for this compilation. 
+     *
+     * @param  s  The new References value 
      */
-
     public void setReferences(String s) {
         _references=s;
     }
-
-    /** get the argument or null for no argument needed
+    
+    /**
+     *  get the reference string or null for no argument needed 
+     *
+     * @return    The References Parameter to CSC 
      */
     protected String getReferencesParameter() {
         //bail on no references
-        if (_references==null ||_references.length()==0)
+        if (notEmpty(_references)) 
+            return "/reference:"+_references;
+        else
             return null;
+    }
+                
+    /**
+     using the path approach didnt work as it could not handle the implicit
+     execution path. Perhaps that could be extracted from the runtime and then
+     the path approach would be viable
+    */
+    protected  Path _referenceFiles;
+    
+    /**
+     * add another path to the reference file path list
+     * @param path another path to append
+     */
+    public void setReferenceFiles(Path path) {
+        //demand create pathlist
+        if(_referenceFiles==null)
+                _referenceFiles=new Path(this.project);
+        _referenceFiles.append(path);
+    }
+    
+    /**
+     turn the path list into a list of files and a /references argument
+     @return null or a string of references.
+    */ 
+    protected String getReferenceFilesParameter() {
+        //bail on no references
+        if (_references==null)
+            return null;
+        //iterate through the ref list & generate an entry for each
+        //or just rely on the fact that the toString operator does this, but
+        //noting that the separator is ';' on windows, ':' on unix
+        String refpath=_references.toString();
+    
+        //bail on no references listed
+        if (refpath.length()==0)
+            return null;
+        
+        StringBuffer s=new StringBuffer("/reference:");
+        s.append(refpath);
+        return new String(s);
+    }   
+    
+    /** 
+     * C# is really dumb in how it handles inclusion. You have to list
+     * every 'assembly' -read DLL that is imported. So already you are
+     * making a platform assumption -shared libraries have a .dll extension
+     * and the poor developer has to know every library which is included
+     * why the compiler cant find classes on the path or in a directory,
+     * is a mystery.
+     *
+     * To reduce the need to be explicit, here is a long list of 
+     * the core libraries used in Beta-1 of .NET
+     * ommitting the blatantly non portable (MS.win32.interop)
+     * and the .designer libraries. (ripping out Com was tempting)
+     * Casing is chosen to match that of the file system <i>exactly</i>
+     * so may work on a unix box too. 
+     */
+    protected static final String DEFAULT_REFERENCE_LIST
+        ="System.dll;System.Drawing.dll;System.Data.dll;"+
+         "System.Diagnostics.dll;"+
+         "System.DirectoryServices.dll;"+
+         "System.IO.dll;"+
+         "System.Management.dll;"+
+         "System.Messaging.dll;"+
+         "System.Net.dll;"+
+         "System.Runtime.Remoting.dll;"+
+         "System.Runtime.Serialization.Formatters.Soap.dll;"+
+         "System.Security.dll;"+
+         "System.ServiceProcess.dll;"+
+         "System.Text.RegularExpressions.dll;"+
+         "System.Timers.dll;"+
+         "System.Web.dll;"+
+         "System.Web.Services.dll;"+
+         "System.WinForms.dll;"+
+         "System.XML.dll;"+
+         "System.XML.Serialization.dll;"+
+         "Microsoft.ComServices.dll;";
+    
+    /** 
+     * get default reference list
+     * @return null or a string of references.
+    */ 
+    protected String getDefaultReferenceParameter() {
+        if(_includeDefaultReferences) {
+            StringBuffer s=new StringBuffer("/reference:");
+            s.append(DEFAULT_REFERENCE_LIST);
+            return new String(s);
+        }
         else
-            return "/reference:"+_references;
+            return null;            
     }
-            
-
-    /* using the path approach didnt work as it could not handle the implicit
-       execution path. Perhaps that could be extracted from the runtime and 
then
-       the path approach would be viable
-
-
-       protected  Path _references;
-
-       public void setReferences(Path s) {
-       //demand create pathlist
-       if(_references==null)
-       _references=new Path(this.project);
-       _references.append(s);
-       }
-
-       protected String getReferencesParameter()
-       {
-       //bail on no references
-       if (_references==null)
-       return null;
-       //iterate through the ref list & generate an entry for each
-       //or just rely on the fact that the toString operator does this, but
-       //noting that the separator is ';' on windows, ':' on unix
-       String refpath=_references.toString();
-
-       //bail on no references listed
-       if (refpath.length()==0)
-       return null;
-       
-       StringBuffer s=new StringBuffer("/reference:");
-       s.append(refpath);
-       return new String(s);
-       }       
+     
+     /** flag to enable automatic reference inclusion
+      *
+     */
+     protected boolean _includeDefaultReferences;
+
+    /** set the automatic reference inclusion flag on or off
+     *  this flag controls the string of references and the 
+     *  /nostdlib option in CSC
+    @param f on/off flag
     */
-
-    
//============================================================================= 
   
-    /* optimise flag
+    public void setIncludeDefaultReferences(boolean f) {
+        _includeDefaultReferences=f;
+    }
+    
+    /** query the optimise flag
+    @return true if optimise is turned on
+     */
+    public boolean getIncludeDefaultReferences() {
+        return _includeDefaultReferences;
+    }
+    
+    /**
+     *  get the include default references flag or null for no argument needed 
+     *
+     * @return    The Parameter to CSC 
+     */
+    protected String getIncludeDefaultReferencesParameter() {
+        return "/nostdlib"+(_includeDefaultReferences?"-":"+");
+    }    
+    
+    /** optimise flag
      */
- 
     protected boolean _optimize;
-
+    
     /** set the optimise flag on or off
-        @param on/off flag
+    @param f on/off flag
     */
     public void setOptimize(boolean f) {
         _optimize=f;
     }
-
+    
     /** query the optimise flag
-        @return true if optimise is turned on
-    */
+    @return true if optimise is turned on
+     */
     public boolean getOptimize() {
         return _optimize;
     }
-
-    /** get the argument or null for no argument needed
+    
+    /**
+     *  get the optimise flag or null for no argument needed 
+     *
+     * @return    The Optimize Parameter to CSC 
      */
     protected String getOptimizeParameter() {
         return "/optimize"+(_optimize?"+":"-");
-    }  
-       
-    
//============================================================================= 
   
+    }   
+        
     /** incremental build flag */
     protected boolean _incremental;
-
+    
     /** set the incremental compilation flag on or off
-     [EMAIL PROTECTED] on/off flag
+     * @param f on/off flag
      */
     public void setIncremental(boolean f){
         _incremental=f;
     }
-
+    
     /** query the incrementalflag
      * @return true iff incremental compilation is turned on
      */
     public boolean getIncremental() {
         return _incremental;
     }
-
-    /** get the argument or null for no argument needed
+    
+    /**
+     *  get the incremental build argument
+     *
+     * @return    The Incremental Parameter to CSC 
      */
     protected String getIncrementalParameter() {
         return "/incremental"+(_incremental?"+":"-");
-    }  
-
-    
//============================================================================= 
   
+    }   
+    
     /** debug flag. Controls generation of debug information. 
      */
- 
     protected boolean _debug;
-
+    
     /** set the debug flag on or off
-     * @param on/off flag
+     * @param f on/off flag
      */
- 
-    public void setDebug(boolean f)
-    {_debug=f;}
-       
+    public void setDebug(boolean f) {
+        _debug=f;
+    }
+        
     /** query the debug flag
      * @return true if debug is turned on
      */
- 
     public boolean getDebug() {
         return _debug;
     }
-
-    /** get the argument or null for no argument needed
+    
+    /**
+     *  get the debug switch argument  
+     *
+     * @return    The Debug Parameter to CSC 
      */
     protected String getDebugParameter() {
         return "/debug"+(_debug?"+":"-");
-    }  
-
-
-    
//============================================================================= 
   
+    }   
+    
     /** output XML documentation flag
-     */        
-       
+    */  
     protected File _docFile;
-       
+        
     /** file for generated XML documentation
-     * @param output file
+     * @param f output file
      */
- 
     public void setDocFile(String f) {
         _docFile=project.resolveFile(f);
     }
-
-
-
+            
     /** get the argument or null for no argument needed
+     * @return    The DocFile Parameter to CSC 
      */
     protected String getDocFileParameter() {
         if (_docFile!=null)
             return "/doc:"+_docFile.toString();
         else
             return null;
-    }  
-       
-    
//============================================================================= 
   
+    }   
+        
     /** warning level: 0-4, with 4 being most verbose
-     */
+    */
     private int _warnLevel;
-
+    
     /** set warn level (no range checking)
-     * @param warn level -see .net docs for valid range (probably 0-4)
-     */
+     * @param warnLevel warn level -see .net docs for valid range (probably 
0-4)
+    */
     public void setWarnLevel(int warnLevel)
-    {this._warnLevel=warnLevel;}
-
+        {this._warnLevel=warnLevel;}
+    
     /** query warn level
      * @return current value
-     */
+    */
     public int getWarnLevel()
-    {return _warnLevel;}
-
-    /** get the argument or null for no argument needed
+        {return _warnLevel;}
+    
+    /**
+     *  get the warn level switch 
+     *
+     * @return    The WarnLevel Parameter to CSC 
      */
     protected String getWarnLevelParameter() {
         return "/warn:"+_warnLevel;
-    }  
-
-    
//============================================================================= 
   
+    }   
+    
     /** enable unsafe code flag. Clearly set to false by default
      */
-
     protected boolean _unsafe;
-
+    
+    /**
+     *  Sets the Unsafe attribute 
+     *
+     * @param  unsafe  The new Unsafe value 
+     */
     public void setUnsafe(boolean unsafe)
-    {this._unsafe=unsafe;}
-
+        {this._unsafe=unsafe;}
+    
+    /**
+     *  query the Unsafe attribute 
+     *
+     * @return    The Unsafe value 
+     */
     public boolean getUnsafe()
-    {return this._unsafe;}
-
+        {return this._unsafe;}
+    
     /** get the argument or null for no argument needed
-     */
+     * @return    The Unsafe Parameter to CSC 
+    */
     protected String getUnsafeParameter(){
         return _unsafe?"/unsafe":null;
-    }  
-       
-    
//============================================================================= 
   
+    }   
+        
     /** main class (or null for automatic choice)
      */
     protected String _mainClass;
-
+    
+    /**
+     *  Sets the MainClass attribute
+     *
+     * @param  mainClass  The new MainClass value 
+     */
     public void setMainClass(String mainClass)
-    {this._mainClass=mainClass;}
-
+        {this._mainClass=mainClass;}
+    
+    /**
+     *  Gets the MainClass attribute 
+     *
+     * @return    The MainClass value 
+     */
     public String getMainClass()
-    {return this._mainClass;}
-
-    /** get the argument or null for no argument needed
+        {return this._mainClass;}
+    
+    /**
+     *  get the /main argument or null for no argument needed 
+     *
+     * @return    The MainClass Parameter to CSC 
      */
     protected String getMainClassParameter(){
         if (_mainClass!=null && _mainClass.length()!=0)
             return "/main:"+_mainClass;
         else
             return null;
-    }  
-
-    
//============================================================================= 
   
+    } 
+    
+    /** any extra command options?
+     */
+    protected String _extraOptions;
+    
+    /**
+     *  Sets the ExtraOptions attribute
+     *
+     * @param  extraOptions  The new ExtraOptions value 
+     */
+    public void setExtraOptions(String extraOptions)
+        {this._extraOptions=extraOptions;}
+    
+    /**
+     *  Gets the ExtraOptions attribute 
+     *
+     * @return    The ExtraOptions value 
+     */
+    public String getExtraOptions()
+        {return this._extraOptions;}
+    
+    /**
+     *  get any extra options or null for no argument needed 
+     *
+     * @return    The ExtraOptions Parameter to CSC 
+     */
+    protected String getExtraOptionsParameter() {
+        if (_extraOptions!=null && _extraOptions.length()!=0)
+            return _extraOptions;
+        else
+            return null;
+    } 
+    
     /** source directory upon which the search pattern is applied
      */
     private File _srcDir;
-
+    
     /**
      * Set the source dir to find the files to be compiled
+     * @param  srcDirName  The new SrcDir value 
      */
     public void setSrcDir(String srcDirName){
         _srcDir = project.resolveFile(srcDirName);
     }
-
-    
//============================================================================= 
   
+    
     /** destination directory (null means use the source directory)
-     */
+    * NB: this is currently not used 
+    */
     private File _destDir;
-
+    
     /**
-     * Set the source dir to find the files to be compiled
+     * Set the destination dir to find the files to be compiled
+     * @param  dirName  The new DestDir value 
      */
     public void setDestDir(String dirName) {
         _destDir = project.resolveFile(dirName);
     }
-       
-
-    
//============================================================================= 
   
+    
     /** type of target. Should be one of exe|library|module|winexe|(null)
-        default is exe; the actual value (if not null) is fed to the command 
line.
-        <br>See /target
-    */
+    default is exe; the actual value (if not null) is fed to the command line.
+    <br>See /target
+     */
     protected String _targetType;
-
+    
     /** define the target
-     * param target. 
-     * @throws BuildException if target is not one of 
exe|library|module|winexe 
+     * @param  targetType          The new TargetType value 
+     * @exception  BuildException  if target is not one of 
exe|library|module|winexe 
      */
-
     public void setTargetType(String targetType)
         throws  BuildException {
         targetType=targetType.toLowerCase();
         if(targetType.equals("exe") || targetType.equals("library") ||
-           targetType.equals("module") ||targetType.equals("winexe") ) {
-            _targetType=targetType;    
+            targetType.equals("module") ||targetType.equals("winexe") ) {
+            _targetType=targetType; 
         }
         else 
             throw new BuildException("targetType " +targetType+" is not a 
valid type");
     }
-
+    
+    /**
+     *  Gets the TargetType attribute  
+     *
+     * @return    The TargetType value 
+     */
     public String getTargetType() { 
-        return _targetType;
-    }  
-
-    /** get the argument or null for no argument needed
+            return _targetType;
+    }   
+    
+    /**
+     *  get the argument or null for no argument needed 
+     *
+     * @return    The TargetType Parameter to CSC 
      */
     protected String getTargetTypeParameter() {
-        if (_targetType!=null)
+        if (notEmpty(_targetType)) 
             return "/target:"+_targetType;
         else
             return null;
-    }  
-
-
-    
//============================================================================= 
   
-    /* icon for incorporation into apps
-     */
- 
-    protected File _win32icon; 
-
+    }   
+    
+    /** icon for incorporation into apps
+     */     
+    protected File _win32icon;  
+    
     /**
      * Set the win32 icon 
-     * @param path to the file. Can be relative, absolute, whatever.
+     * @param fileName path to the file. Can be relative, absolute, whatever.
      */
     public void setWin32Icon(String fileName) {
         _win32icon = project.resolveFile(fileName);
     }
-
-    /** get the argument or null for no argument needed
+    
+    /**
+     *  get the argument or null for no argument needed 
+     *
+     * @return    The Win32Icon Parameter to CSC 
      */
     protected String getWin32IconParameter() {
         if (_win32icon!=null)
@@ -590,14 +620,12 @@
         else
             return null;
     }
-
-    
//============================================================================= 
   
-    /** defines list 'RELEASE;WIN32;NO_SANITY_CHECKS;;SOMETHING_ELSE'
-     *
-     */
-
+    
+    /** defines list
+    * something like 'RELEASE;WIN32;NO_SANITY_CHECKS;;SOMETHING_ELSE'
+    */
     String _definitions;
-
+    
     /**
      * Set the definitions
      * @param list of definitions split by ; or , or even :
@@ -605,22 +633,24 @@
     public void setDefinitions(String params) {
         _definitions=params;
     }
-
-    /** get the argument or null for no argument needed
-     */
+      
+    /**
+    *  get the argument or null for no argument needed 
+    *
+    * @return    The Definitions Parameter to CSC 
+    */
     protected String getDefinitionsParameter() {
-        if (_definitions==null || _definitions.length()==0)
+        if (notEmpty(_definitions))
+            return "/define:" + _definitions;
+        else
             return null;
-        else return "/DEFINE:"+_definitions;
     }
-
-    
//============================================================================= 
   
+    
     /** list of extra modules to refer to 
      *
-     */
-
+    */    
     String _additionalModules;
-
+    
     /**
      * Set the definitions
      * @param list of definitions split by ; or , or even :
@@ -628,22 +658,22 @@
     public void setAdditionalModules(String params) {
         _additionalModules=params;
     }
-
+    
     /** get the argument or null for no argument needed
+    * @return    The AdditionalModules Parameter to CSC 
      */
     protected String getAdditionalModulesParameter() {
-        if (_additionalModules==null || _additionalModules.length()==0)
+        if (notEmpty(_additionalModules)) 
+            return "/addmodule:" + _additionalModules;
+        else 
             return null;
-        else return "/addmodule:"+_additionalModules;
     }
-
-    
//============================================================================= 
   
+    
     /** output file. If not supplied this is derived from the
      *  source file
-     */
-
+     */    
     protected String _outputFile;
-
+    
     /**
      * Set the definitions
      * @param list of definitions split by ; or , or even :
@@ -651,37 +681,39 @@
     public void setOutputFile(String params) {
         _outputFile=params;
     }
-
+    
     /** get the argument or null for no argument needed
-     */
+    * @return    The OutputFile Parameter to CSC 
+    */
     protected String getOutputFileParameter() {
-        if (_outputFile==null || _outputFile.length()==0)
+        if (notEmpty(_outputFile)) {
+            File f=project.resolveFile(_outputFile);
+            return "/out:"+f.toString();
+        }
+        else            
             return null;
-        File f=project.resolveFile(_outputFile);
-        return "/out:"+f.toString();
     }
-
-    
//============================================================================= 
   
+    
     /** flag to control action on execution trouble
-     */
-
+    */
     protected boolean _failOnError;
-
+    
     /**set fail on error flag
-     */
+    * @param  b  The new FailOnError value 
+    */
     public void setFailOnError(boolean b){
         _failOnError=b;
     }
-
+    
     /** query fail on error flag
-     */
+     * @return    The FailFailOnError value 
+    */
     public boolean getFailFailOnError() {
-        return _failOnError;
+            return _failOnError;
     }
-
-    
//============================================================================= 
   
+    
     /** reset all contents. 
-     */
+    */
     public void Clear() {
         _targetType=null;
         _win32icon=null;
@@ -698,18 +730,27 @@
         _failOnError=true;
         _definitions=null;
         _additionalModules=null;
+        _includeDefaultReferences=true;
+        _extraOptions=null;
     }
-
-
-    
//============================================================================= 
   
-    /** do the work by building the command line and then calling it
+    
+    /**
+     *  test for a string containing something useful 
+     *
+     * @param  s  string in 
+     * @return    true if the argument is not null or empty 
      */
-
+    protected boolean notEmpty(String s) {
+        return s != null && s.length() != 0;
+    }
+    
+    /** do the work by building the command line and then calling it
+    */
     public void execute() 
         throws BuildException {
         if (_srcDir == null)
             _srcDir=project.resolveFile(".");
-
+    
         NetCommand command=new NetCommand(this,"CSC",csc_exe_name);
         command.setFailOnError(getFailFailOnError());
         //DEBUG helper
@@ -729,12 +770,10 @@
         command.addArgument(getWarnLevelParameter());
         command.addArgument(getWin32IconParameter());
         command.addArgument(getOutputFileParameter());   
-        /* space for more argumentativeness
-           command.addArgument();
-           command.addArgument();
-        */
-
-
+        command.addArgument(getIncludeDefaultReferencesParameter());
+        command.addArgument(getDefaultReferenceParameter());
+        command.addArgument(getExtraOptionsParameter());
+    
         //get dependencies list. 
         DirectoryScanner scanner = super.getDirectoryScanner(_srcDir);
         String[] dependencies = scanner.getIncludedFiles();
@@ -746,11 +785,9 @@
             targetFile=baseDir+File.separator+targetFile;
             command.addArgument(targetFile);
         }
-    
+        
         //now run the command of exe + settings + files
         command.runCommand();
     } // end execute
-
-
-
+    
 } //end class
Index: Ilasm.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
retrieving revision 1.1
diff -u -r1.1 Ilasm.java
--- Ilasm.java  2000/11/09 16:18:50     1.1
+++ Ilasm.java  2000/11/22 22:00:59
@@ -2,10 +2,10 @@
 *******************************************************************
 *
 * File:         Csharp.java
-* RCS:          $Header: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
 1.1 2000/11/09 16:18:50 bodewig Exp $
+* RCS:          $Header: 
/net/csharp_task/src/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java 7 
    00-11-14 16:01 Slo $
 * Author:       Steve Loughran
 * Created:      July 21,  2000
-* Modified:            $Modtime: 00-11-01 10:25 $
+* Modified:     $Modtime: 00-11-08 10:41 $
 * Language:     Java
 * Status:       Experimental 
 *
@@ -67,24 +67,24 @@
 
 /* build notes
 
--The reference CD to listen to while editing this file is 
-nap: Underworld  - Everything, Everything
--variable naming policy from Fowler's refactoring book.
--tested against the PDC pre-beta of csc.exe; future versions will 
-inevitably change things
+    -The reference CD to listen to while editing this file is 
+        nap: Underworld  - Everything, Everything
+    -variable naming policy from Fowler's refactoring book.
+    -tested against the PDC pre-beta of csc.exe; future versions will 
+     inevitably change things
 */
 
-// ====================================================================
+
 // place in the optional ant tasks package
 // but in its own dotnet group
-// ====================================================================
+
 
 package org.apache.tools.ant.taskdefs.optional.dotnet;
+
 
-// ====================================================================
 // imports
-// ====================================================================
 
+
 import org.apache.tools.ant.*;
 import org.apache.tools.ant.taskdefs.*;
 import org.apache.tools.ant.types.*;
@@ -93,157 +93,64 @@
 import java.text.*;
 
 /**
-   Task to assemble .net 'Intermediate Language' files.
-   The task will only work on win2K until other platforms support csc.exe or 
-   an equivalent. ilasm.exe must be on the execute path too.
-   <p>
-
-   <p>
-   All parameters are optional: &lt;il/&gt; should suffice to produce a debug
-   build of all *.il files.
-   The option set is roughly compatible with the CSharp class;
-   even though the command line options are only vaguely
-   equivalent. [The low level commands take things like /OUT=file,
-   csc wants /out:file ... /verbose is used some places; /quiet here in
-   ildasm... etc.] It would be nice if someone made all the command line
-   tools consistent (and not as brittle as the java cmdline tools) 
-
-
-   <p>
-
-   The task is a directory based task, so attributes like 
<b>includes="*.il"</b> and 
-   <b>excludes="broken.il"</b> can be used to control the files pulled in. 
-   Each file is built on its own, producing an appropriately named output file 
unless
-   manually specified with <b>outfile</b>
-
-   <p>
-
-   <table border="1" cellpadding="2" cellspacing="0">
-   <tr>
-   <td valign="top"><b>Attribute</b></td>
-   <td valign="top"><b>Description</b></td>
-   <td align="center" valign="top"><b>Example</b></td>
-   </tr>
-
-
-   <tr>
-   <tr>
-   <td valign="top">defaultexcludes</td>
-   <td valign="top">indicates whether default excludes should be used or not
-   (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when 
omitted.</td>
-   </tr>
-
-   <tr>
-   <td valign="top">debug
-   <td valign="top">include debug information
-   <td valign="top">true (default)
-   </tr>
-   <tr>
-   <tr>
-   <td valign="top">excludes</td>
-   <td valign="top">comma separated list of patterns of files that must be
-   excluded. No files (except default excludes) are excluded when omitted.</td>
-   </tr>
-   <tr>
-   <td valign="top">excludesfile</td>
-   <td valign="top">the name of a file. Each line of this file is
-   taken to be an exclude pattern</td>
-   </tr>
-   <tr>
-   <td valign="top">failOnError
-   <td valign="top">Should a failed compile halt the build?
-   <td valign="top">true(default)
-   </tr>
-   <tr>
-   <td valign="top">includes</td>
-   <td valign="top">comma separated list of patterns of files that must be
-   included. All files are included when omitted.</td>
-   </tr>
-   <tr>
-   <td valign="top">includesfile</td>
-   <td valign="top">the name of a file. Each line of this file is
-   taken to be an include pattern</td>
-   </tr>
-   <tr>
-   <td valign="top">listing
-   <td valign="top">Produce a listing (off by default)
-   <td valign="top">off (default)
-   </tr>
-   <tr>
-   <td valign="top">outputFile
-   <td valign="top">filename of output
-   <td valign="top">"example.exe"
-   </tr>
-   <tr>
-   <td valign="top">owner
-   <td valign="top">restrict disassembly by setting the 'owner' string
-   <td valign="top">"secret"
-   </tr>
-   <tr>
-   <td valign="top">resourceFile
-   <td valign="top">name of resource file to include
-   <td valign="top">"resources.res"
-   </tr>
-   <tr>
-   <td valign="top">srcDir
-   <td valign="top">source directory (default = project directory)
-   <td valign="top">
-   </tr>
-   <tr>
-   <td valign="top">targetType
-   <td valign="top">Type of target. library means DLL is output. 
-   <td valign="top">"exe","library"
-   </tr>
-   <tr>
-   <td valign="top">verbose
-   <td valign="top">output progress messages
-   <td valign="top">off (default)
-   </tr>
-
-   </table>
+Task to assemble .net 'Intermediate Language' files.
+The task will only work on win2K until other platforms support csc.exe or 
+an equivalent. ilasm.exe must be on the execute path too.
+<p>
+
+<p>
+All parameters are optional: &lt;il/&gt; should suffice to produce a debug
+build of all *.il files.
+The option set is roughly compatible with the CSharp class;
+even though the command line options are only vaguely
+equivalent. [The low level commands take things like /OUT=file,
+csc wants /out:file ... /verbose is used some places; /quiet here in
+ildasm... etc.] It would be nice if someone made all the command line
+tools consistent (and not as brittle as the java cmdline tools) 
+
+
+<p>
+
+The task is a directory based task, so attributes like <b>includes="*.il"</b> 
and 
+<b>excludes="broken.il"</b> can be used to control the files pulled in. 
+Each file is built on its own, producing an appropriately named output file 
unless
+manually specified with <b>outfile</b>
 
 
[EMAIL PROTECTED] Steve Loughran [EMAIL PROTECTED]
[EMAIL PROTECTED] 0.2
+ */
 
 
-   @author Steve Loughran [EMAIL PROTECTED]
-   @version 0.1
-*/
-// ====================================================================
-
 public class Ilasm
     extends org.apache.tools.ant.taskdefs.MatchingTask {
 
-    
//============================================================================= 
   
     /** constructor inits everything and set up the search pattern
-     */
-
+    */
     public Ilasm () {
         Clear();
         setIncludes(file_pattern);
     }
 
-
-    
//-----------------------------------------------------------------------------
     /** name of the executable. the .exe suffix is deliberately not included 
      * in anticipation of the unix version
      */
     protected static final String exe_name="ilasm";
-
+    
     /** what is the file extension we search on?
      */
     protected static final String file_ext="il";
-
+    
     /** and now derive the search pattern from the extension 
      */
-    protected static final String file_pattern="*."+file_ext;
-
+    protected static final String file_pattern="**/*."+file_ext;
+    
     /** title of task for external presentation
      */
     protected static final String exe_title="ilasm";
-
-    
//============================================================================= 
   
+    
     /** reset all contents. 
-     */
+    */
     public void Clear() {
         _targetType=null;
         _srcDir=null;
@@ -255,49 +162,56 @@
         _failOnError=true;
         _resourceFile=null;
         _owner=null;
+        _extraOptions=null;     
     }
 
-    
//============================================================================= 
   
     /** source directory upon which the search pattern is applied
      */
     private File _srcDir;
-
+    
     /**
      * Set the source dir to find the files to be compiled
+     * @param  srcDirName  The new SrcDir value 
      */
     public void setSrcDir(String srcDirName){
         _srcDir = project.resolveFile(srcDirName);
     }
+    
 
-
-    
//============================================================================= 
   
     /** type of target. Should be one of exe|library|module|winexe|(null)
-        default is exe; the actual value (if not null) is fed to the command 
line.
-        <br>See /target
-    */
+    default is exe; the actual value (if not null) is fed to the command line.
+    <br>See /target
+     */
     protected String _targetType;
-
+    
     /** define the target
-     * param target. 
-     * @throws BuildException if target is not one of 
exe|library|module|winexe 
+     * @param  targetType          one of exe|library|
+     * @exception BuildException if target is not one of 
exe|library|module|winexe 
      */
-
+    
     public void setTargetType(String targetType)
         throws  BuildException {
         targetType=targetType.toLowerCase();
         if(targetType.equals("exe") || targetType.equals("library")) {
-            _targetType=targetType;    
+            _targetType=targetType; 
         }
         else 
             throw new BuildException("targetType " +targetType+" is not a 
valid type");
     }
 
+    /**
+     * accessor method for target type
+     * @return the current target option
+     */
     public String getTargetType() { 
         return _targetType;
-    }  
-
-    /** get the argument or null for no argument needed
-     */
+    }   
+    
+    /** g
+     *  get the target type or null for no argument needed 
+     *
+     * @return    The TargetTypeParameter value 
+    */
 
     protected String getTargetTypeParameter() {
         if(!notEmpty(_targetType))
@@ -305,72 +219,96 @@
         if (_targetType.equals("exe"))
             return "/exe";
         else 
-            if (_targetType.equals("library"))
-                return "/dll";
-            else
-                return null;
-    }  
-       
-    
//============================================================================= 
   
+        if (_targetType.equals("library"))
+            return "/dll";
+        else
+            return null;
+    }   
+        
     /** owner string is a slightly trivial barrier to disassembly
-     */
-
+    */
+    
     protected String _owner;
-
+    
+    /**
+     *  Sets the Owner attribute 
+     *
+     * @param  s  The new Owner value 
+     */
+    
     public void setOwner(String s) {
         _owner=s;
-    }
+        }
     
+    /**
+     *  Gets the Owner switch for ilasm
+     *
+     * @return    The Owner string
+     */    
     protected String getOwnerParameter() {
         if(notEmpty(_owner))
             return "/owner="+_owner;
         else 
             return null;
     }
-
-    
//============================================================================= 
   
+        
     /** test for a string containing something useful
      * @param string to test
      * @returns true if the argument is not null or empty
-     */
+    */
     protected boolean notEmpty(String s)
-    {return s!=null && s.length()!=0;}
-
-    
//============================================================================= 
   
+        {return s!=null && s.length()!=0;}
+    
     /** verbose flag
      */
-     
     protected boolean _verbose;
 
+    /** 
+     * enable/disable verbose ILASM output
+     * @param b flag set to true for verbose on
+     */
     public void setVerbose(boolean b) {
         _verbose=b;
     }
-
+    
+    /** 
+     * turn the verbose flag into a parameter for ILASM
+     * @return null or the appropriate command line string
+     */
     protected String getVerboseParameter() {
         return _verbose?null:"/quiet";
     }   
-
-    
//============================================================================= 
   
+    
+        
     /** listing flag
      */
-     
+         
     protected boolean _listing;
 
+    /** 
+     * enable/disable listing
+     * @param b flag set to true for listing on
+     */
     public void setListing(boolean b) {
         _listing=b;
     }
-
+    
+    /** 
+     * turn the listing flag into a parameter for ILASM
+     * @return the appropriate string from the state of the listing flag
+     */
     protected String getListingParameter() {
         return _listing?"/listing":"/nolisting";
     }
-   
-    
//============================================================================= 
   
-    /** output file. If not supplied this is derived from the
+       
+    
+    /**
+     * output file. If not supplied this is derived from the
      *  source file
      */
- 
+     
     protected String _outputFile;
-
+    
     /**
      * Set the definitions
      * @param list of definitions split by ; or , or even :
@@ -378,89 +316,119 @@
     public void setOutputFile(String params) {
         _outputFile=params;
     }
-
-    /** get the argument or null for no argument needed
-     */
+    
+    /**
+     * get the output file 
+     * @return the argument string or null for no argument
+    */
     protected String getOutputFileParameter() {
         if (_outputFile==null || _outputFile.length()==0)
             return null;
         File f=project.resolveFile(_outputFile);
         return "/output="+f.toString();
     }
-
-    
//============================================================================= 
   
+    
     /** resource file (.res format) to include in the app. 
      */
- 
-    protected String _resourceFile;
-
-    public void setResourceFile(String s) {
-        _resourceFile=s;
-    }
+    protected File _resourceFile;
     
+    /**
+     * Set the resource file 
+     * @param fileName path to the file. Can be relative, absolute, whatever.
+     */public void setResourceFile(String fileName) {
+        _resourceFile = project.resolveFile(fileName);
+    }
+        
     protected String getResourceFileParameter() {
-        if(notEmpty(_resourceFile)) {
-            return "/resource="+_resourceFile;
+        if(_resourceFile!=null) {
+            return "/resource="+_resourceFile.toString();
         }
-        else 
+        else {
             return null;
+        }
     }
-   
-    
//============================================================================= 
   
+    
     /** flag to control action on execution trouble
-     */
-
+    */
     protected boolean _failOnError;
-
+    
     /**set fail on error flag
-     */
+    */
     public void setFailOnError(boolean b){
         _failOnError=b;
     }
-
+    
     /** query fail on error flag
-     */
+    */
     public boolean getFailFailOnError() {
         return _failOnError;
     }
-
-    
//============================================================================= 
   
+        
     /** debug flag. Controls generation of debug information. 
      */
- 
     protected boolean _debug;
-
+    
     /** set the debug flag on or off
-     * @param on/off flag
+     * @param f on/off flag
      */
- 
     public void setDebug(boolean f)
-    {_debug=f;}
-       
+        {_debug=f;}
+        
     /** query the debug flag
      * @return true if debug is turned on
      */
- 
     public boolean getDebug() {
         return _debug;
     }
-
+    
     /** get the argument or null for no argument needed
-     */
+    */
     protected String getDebugParameter() {
         return _debug?"/debug":null;
-    }  
-   
-    
//============================================================================= 
   
+    }   
+
+    /** any extra command options?
+     */
+    protected String _extraOptions;
+    
+    /**
+     *  Sets the ExtraOptions attribute
+     *
+     * @param  extraOptions  The new ExtraOptions value 
+     */
+    public void setExtraOptions(String extraOptions)
+        {this._extraOptions=extraOptions;}
+    
+    /**
+     *  Gets the ExtraOptions attribute 
+     *
+     * @return    The ExtraOptions value 
+     */
+    public String getExtraOptions()
+        {return this._extraOptions;}
+    
+    /**
+     *  get any extra options or null for no argument needed 
+     *
+     * @return    The ExtraOptions Parameter to CSC 
+     */
+    protected String getExtraOptionsParameter() {
+        if (_extraOptions!=null && _extraOptions.length()!=0)
+            return _extraOptions;
+        else
+            return null;
+    } 
+
+        
     /** This is the execution entry point. Build a list of files and
      *  call ilasm on each of them.
+     * @throws BuildException if the assembly failed and FailOnError is true
      */
-
     public void execute() 
         throws BuildException {
         if (_srcDir == null)
-            _srcDir=project.resolveFile(".");
-
+                _srcDir=project.resolveFile(".");
+    
         //get dependencies list. 
         DirectoryScanner scanner = super.getDirectoryScanner(_srcDir);
         String[] dependencies = scanner.getIncludedFiles();
@@ -472,13 +440,15 @@
             targetFile=baseDir+File.separator+targetFile;
             executeOneFile(targetFile);
         }
-    
+        
     } // end execute
-
-    
//============================================================================= 
   
-    /** do the work by building the command line and then calling it
+    
+        
+    /**
+     * do the work for one file by building the command line then calling it
+     * @param targetFile name of the the file to assemble
+     * @throws BuildException if the assembly failed and FailOnError is true
      */
-
     public void executeOneFile(String targetFile) 
         throws BuildException {
         NetCommand command=new NetCommand(this,exe_title,exe_name);
@@ -493,18 +463,19 @@
         command.addArgument(getOwnerParameter());
         command.addArgument(getResourceFileParameter());
         command.addArgument(getVerboseParameter());
-
- 
+        command.addArgument(getExtraOptionsParameter());
+    
+     
         /* space for more argumentativeness
-           command.addArgument();
-           command.addArgument();
+        command.addArgument();
+        command.addArgument();
         */
-    
+        
         command.addArgument(targetFile);
         //now run the command of exe + settings + file
         command.runCommand();
     } // end executeOneFile
-
-
-
+    
+    
+    
 } //class
Index: NetCommand.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
retrieving revision 1.1
diff -u -r1.1 NetCommand.java
--- NetCommand.java     2000/11/09 16:18:50     1.1
+++ NetCommand.java     2000/11/22 23:24:24
@@ -2,10 +2,10 @@
  *******************************************************************
  *
  * File:         CSharp.java
- * RCS:          $Header: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
 1.1 2000/11/09 16:18:50 bodewig Exp $
+ * RCS:          $Header: 
/net/csharp_task/src/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
 9     00-11-14 17:44 Slo $
  * Author:       Steve Loughran
  * Created:      July 21,  2000
- * Modified:     $Modtime: 00-11-01 10:09 $
+ * Modified:     $Modtime: 00-11-14 17:32 $
  * Language:     Java
  * Status:       Experimental
  *
@@ -70,7 +70,7 @@
 The reference CD to listen to while editing this file is
 Underworld Everything, Everything
 variable naming policy from Fowler's refactoring book.
-*/
+ */
 
 // place below the optional ant tasks package
 
@@ -86,7 +86,6 @@
 import java.text.*;
 
 
-
 /**
 This is a helper class to spawn net commands out. 
 In its initial form it contains no .net specifics, just contains
@@ -94,118 +93,118 @@
 to have a means of setting the path to point to the dotnet bin directory; in 
which
 case the shared code should go in here.
 @author Steve Loughran [EMAIL PROTECTED]
-
[EMAIL PROTECTED] 2000-11-01
[EMAIL PROTECTED] 0.3
  */
 
-
 public class NetCommand {
-
+    
     /** constructor
-        @param owning task
-        @param title (for logging/errors)
-        @param executable. Leave off the '.exe. for future portability
+    @param owning task
+    @param title (for logging/errors)
+    @param executable. Leave off the '.exe. for future portability
     */
-
-    public NetCommand(Task owner, String title, String program)
-        throws BuildException {
+    
+    public NetCommand(Task owner, String title, String program) {
         _owner=owner;
         _title=title;
         _program=program;
         _commandLine=new Commandline();
         _commandLine.setExecutable(_program);
         prepareExecutor();
-    }
-
+        }
+    
     /** owner project
      */
     protected Task _owner;
-
+    
     /** executabe
      */
     protected Execute _exe;
-
+    
     /** what is the command line
      */
     protected Commandline _commandLine;
-
+    
     /** title of the command
      */
     protected String _title;
-
+    
     /** actual program to invoke
      */
     protected String _program;
-
+    
     /** trace flag
      */
     protected boolean _traceCommandLine=false;
-
+    
+    /**
+     * turn tracing on or off
+     * @param b trace flag
+     */
     public void setTraceCommandLine(boolean b){
         _traceCommandLine=b;
     }
-
+    
     /** flag to control action on execution trouble
-     */
-
+    */
     protected boolean _failOnError;
-
-    /**set fail on error flag
+    
+    /**
+     * set fail on error flag
+     * @param b fail flag -set to true to cause an exception to be raised if
+     * the return value != 0
      */
     public void setFailOnError(boolean b){
         _failOnError=b;
     }
-
+    
     /** query fail on error flag
-     */
+    */
     public boolean getFailFailOnError() {
         return _failOnError;
     }
-
-
-        
-    /** verbose text log
-     * @param string to add to log iff verbose is defined for the build
+    
+    /** 
+     * verbose text log
+     * @param msg string to add to log iff verbose is defined for the build
      */
     protected void logVerbose(String msg){
         _owner.getProject().log(msg,Project.MSG_VERBOSE);
-    }
-
-
-    /** error text log
-     * @param string to add to the error log
+        }
+    
+    
+    /**
+     * error text log
+     * @param  msg  message to display as an error
      */
     protected void logError(String msg) {
         _owner.getProject().log(msg,Project.MSG_ERR);
     }
-
-    /*
+    
+    /**
      * add an argument to a command line; do nothing if the arg is null or 
empty string
-     * @param commandline to extend
-     * @param next arg
+     * @param  argument  The feature to be added to the Argument attribute 
      */
     public void addArgument(String argument){
         if(argument!=null && argument.length()!=0) {
             _commandLine.createArgument().setValue(argument);
         }
     }
-
+    
     /**
      * set up the command sequence..
      */
-    protected void prepareExecutor() throws BuildException {
+    protected void prepareExecutor() {
         // default directory to the project's base directory
         File dir = _owner.getProject().getBaseDir();
         ExecuteStreamHandler handler=new LogStreamHandler(_owner,
-                                                          Project.MSG_INFO, 
Project.MSG_WARN);
+                   Project.MSG_INFO, Project.MSG_WARN);
         _exe = new Execute(handler, null);
         _exe.setAntRun(_owner.getProject());
         _exe.setWorkingDirectory(dir);
-        /* do nothing with env variables. REVISIT: SDK command line?
-           String[] environment = env.getVariables();
-           exe.setEnvironment(environment);
-        */
     }
-
+    
     /**
      * Run the command using the given Execute instance.
      * @throws an exception of something goes wrong and the failOnError flag 
is true
@@ -217,8 +216,10 @@
             if(_traceCommandLine) {
                 _owner.log(_commandLine.toString());
             }
-            else
+            else {
+                //in verbose mode we always log stuff
                 logVerbose(_commandLine.toString());
+            }
             _exe.setCommandline(_commandLine.getCommandline());
             err = _exe.execute();
             if (err != 0) {
@@ -232,6 +233,6 @@
             throw new BuildException(_title+" failed: " + e, e, 
_owner.getLocation());
         }
     }
-
+    
 
 } //class

Reply via email to