You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ad...@apache.org on 2002/04/08 01:10:45 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/types ArgumentList.java Commandline.java

adammurdoch    02/04/07 16:10:45

  Modified:    proposal/myrmidon/src/java/org/apache/antlib/build
                        Patch.java
               proposal/myrmidon/src/java/org/apache/antlib/cvslib
                        ChangeLog.java Cvs.java
               proposal/myrmidon/src/java/org/apache/antlib/dotnet
                        CSharp.java Ilasm.java
               proposal/myrmidon/src/java/org/apache/antlib/java
                        JavacAdaptor.java JikesAdaptor.java
               proposal/myrmidon/src/java/org/apache/antlib/nativelib
                        Exec.java
               proposal/myrmidon/src/java/org/apache/antlib/security
                        GenerateKey.java SignJar.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework
                        Execute.java
               proposal/myrmidon/src/java/org/apache/myrmidon/framework/java
                        ExecuteJava.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs
                        Cab.java Javah.java Rpm.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm
                        CCMCheck.java CCMCreateTask.java
                        CCMReconfigure.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase
                        CCCheckin.java CCCheckout.java CCUnCheckout.java
                        CCUpdate.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac
                        DefaultCompilerAdapter.java Javac12.java
                        Javac13.java Kjc.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc
                        Javadoc.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers
                        DefaultCompilerAdapter.java JasperC.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit
                        JUnitTask.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic
                        DefaultRmicAdapter.java KaffeRmic.java SunRmic.java
                        WLRmic.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka
                        Coverage.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/stylebook
                        StyleBook.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text
                        Native2Ascii.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss
                        MSVSS.java MSVSSCHECKIN.java MSVSSCHECKOUT.java
                        MSVSSGET.java MSVSSHISTORY.java MSVSSLABEL.java
               proposal/myrmidon/src/todo/org/apache/tools/todo/types
                        Commandline.java
  Added:       proposal/myrmidon/src/todo/org/apache/tools/todo/types
                        ArgumentList.java
  Log:
  * Extracted ArgumentList superclass out of Commandline.  Changed most usages
    of Commandline to use ArgumentList instead.
  
  * Execute now extends Commandline.
    - Removed Execute.getCommandline().
    - Moved Commandline.getCommandline() down to Execute, and made private.
  
  Revision  Changes    Path
  1.13      +5 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/build/Patch.java
  
  Index: Patch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/build/Patch.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Patch.java	29 Mar 2002 12:57:20 -0000	1.12
  +++ Patch.java	7 Apr 2002 23:10:43 -0000	1.13
  @@ -13,7 +13,6 @@
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
  -import org.apache.tools.todo.types.Commandline;
   
   /**
    * Task as a layer on top of patch. Patch applies a diff file to an original.
  @@ -21,7 +20,7 @@
    * @ant.task name="patchx"
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.12 $ $Date: 2002/03/29 12:57:20 $
  + * @version $Revision: 1.13 $ $Date: 2002/04/07 23:10:43 $
    */
   public class Patch
       extends AbstractTask
  @@ -105,8 +104,7 @@
       {
           validate();
   
  -        final Execute exe = new Execute();
  -        buildCommand( exe.getCommandline() );
  +        final Execute exe = buildCommand();
           exe.execute( getContext() );
       }
   
  @@ -132,8 +130,9 @@
           }
       }
   
  -    private void buildCommand( final Commandline cmd )
  +    private Execute buildCommand(  )
       {
  +        final Execute cmd = new Execute();
           cmd.setExecutable( "patch" );
           if( m_backups )
           {
  @@ -167,5 +166,6 @@
           {
               cmd.addArgument( m_originalFile );
           }
  +        return cmd;
       }
   }
  
  
  
  1.8       +7 -8      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java
  
  Index: ChangeLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/ChangeLog.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ChangeLog.java	2 Apr 2002 09:19:06 -0000	1.7
  +++ ChangeLog.java	7 Apr 2002 23:10:43 -0000	1.8
  @@ -56,7 +56,7 @@
    *
    * @author <a href="mailto:jeff.martin@synamic.co.uk">Jeff Martin</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.7 $ $Date: 2002/04/02 09:19:06 $
  + * @version $Revision: 1.8 $ $Date: 2002/04/07 23:10:43 $
    * @ant.task name="changelog"
    */
   public class ChangeLog
  @@ -185,9 +185,11 @@
               userList.put( user.getUserID(), user.getDisplayname() );
           }
   
  -        final Commandline command = new Commandline();
  -        command.setExecutable( "cvs" );
  -        command.addArgument( "log" );
  +        final Execute exe = new Execute();
  +        exe.setWorkingDirectory( m_dir );
  +        exe.setExecutable( "cvs" );
  +
  +        exe.addArgument( "log" );
   
           if( null != m_start )
           {
  @@ -196,7 +198,7 @@
   
               // We want something of the form: -d ">=YYYY-MM-dd"
               final String dateRange = "-d >=" + outputDate.format( m_start );
  -            command.addArgument( dateRange );
  +            exe.addArgument( dateRange );
           }
   
           // Check if list of files to check has been specified
  @@ -220,9 +222,6 @@
           */
   
           final ChangeLogParser parser = new ChangeLogParser( userList, getContext() );
  -        final Execute exe = new Execute();
  -        exe.setWorkingDirectory( m_dir );
  -        exe.setCommandline( command );
           exe.setExecOutputHandler( parser );
           exe.execute( getContext() );
   
  
  
  
  1.30      +4 -9      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java
  
  Index: Cvs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Cvs.java	23 Mar 2002 03:46:32 -0000	1.29
  +++ Cvs.java	7 Apr 2002 23:10:43 -0000	1.30
  @@ -22,7 +22,7 @@
    * @author <a href="mailto:costin@dnt.ro">costin@dnt.ro</a>
    * @author <a href="mailto:stefano@apache.org">stefano@apache.org</a>
    * @author <a href="mailto:wwerner@picturesafe.de">Wolfgang Werner</a>
  - * @version $Revision: 1.29 $ $Date: 2002/03/23 03:46:32 $
  + * @version $Revision: 1.30 $ $Date: 2002/04/07 23:10:43 $
    * @ant.task name="cvs"
    */
   public class Cvs
  @@ -143,13 +143,11 @@
       public void execute()
           throws TaskException
       {
  -        final Commandline command = buildCommandline();
  +        final Execute exe = new Execute();
  +        buildCommandline( exe );
           final Properties env = buildEnvironment();
   
  -        final Execute exe = new Execute();
           exe.setWorkingDirectory( m_dest );
  -
  -        exe.setCommandline( command );
           exe.setEnvironment( env );
           exe.execute( getContext() );
       }
  @@ -174,10 +172,8 @@
           return env;
       }
   
  -    private Commandline buildCommandline() throws TaskException
  +    private void buildCommandline( final Commandline command ) throws TaskException
       {
  -        final Commandline command = new Commandline();
  -
           command.setExecutable( "cvs" );
           if( m_cvsRoot != null )
           {
  @@ -213,7 +209,6 @@
           {
               command.addArguments( FileUtils.translateCommandline( m_module ) );
           }
  -        return command;
       }
   
       private String getNonEmptyString( final String value )
  
  
  
  1.11      +24 -25    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java
  
  Index: CSharp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/CSharp.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CSharp.java	29 Mar 2002 12:57:21 -0000	1.10
  +++ CSharp.java	7 Apr 2002 23:10:43 -0000	1.11
  @@ -11,8 +11,8 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.tools.todo.taskdefs.MatchingTask;
  -import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.DirectoryScanner;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.myrmidon.framework.file.Path;
   
   /**
  @@ -504,29 +504,28 @@
           }
   
           final Execute exe = new Execute();
  -        final Commandline cmd = exe.getCommandline();
  -        cmd.setExecutable( EXE_NAME );
  +        exe.setExecutable( EXE_NAME );
   
  -        addArgument( cmd, "/nologo" );
  -        addArgument( cmd, getAdditionalModulesParameter() );
  -        addArgument( cmd, getDefinitionsParameter() );
  -        addArgument( cmd, getDebugParameter() );
  -        addArgument( cmd, getDocFileParameter() );
  -        addArgument( cmd, getIncrementalParameter() );
  -        addArgument( cmd, getMainClassParameter() );
  -        addArgument( cmd, getOptimizeParameter() );
  -        addArgument( cmd, getReferencesParameter() );
  -        addArgument( cmd, getTargetTypeParameter() );
  -        addArgument( cmd, getUnsafeParameter() );
  -        addArgument( cmd, getWarnLevelParameter() );
  -        addArgument( cmd, getWin32IconParameter() );
  -        addArgument( cmd, getOutputFileParameter() );
  -        addArgument( cmd, getIncludeDefaultReferencesParameter() );
  -        addArgument( cmd, getDefaultReferenceParameter() );
  -        addArgument( cmd, getWin32ResParameter() );
  -        addArgument( cmd, getUtf8OutpuParameter() );
  -        addArgument( cmd, getFullPathsParameter() );
  -        addArgument( cmd, getExtraOptionsParameter() );
  +        addArgument( exe, "/nologo" );
  +        addArgument( exe, getAdditionalModulesParameter() );
  +        addArgument( exe, getDefinitionsParameter() );
  +        addArgument( exe, getDebugParameter() );
  +        addArgument( exe, getDocFileParameter() );
  +        addArgument( exe, getIncrementalParameter() );
  +        addArgument( exe, getMainClassParameter() );
  +        addArgument( exe, getOptimizeParameter() );
  +        addArgument( exe, getReferencesParameter() );
  +        addArgument( exe, getTargetTypeParameter() );
  +        addArgument( exe, getUnsafeParameter() );
  +        addArgument( exe, getWarnLevelParameter() );
  +        addArgument( exe, getWin32IconParameter() );
  +        addArgument( exe, getOutputFileParameter() );
  +        addArgument( exe, getIncludeDefaultReferencesParameter() );
  +        addArgument( exe, getDefaultReferenceParameter() );
  +        addArgument( exe, getWin32ResParameter() );
  +        addArgument( exe, getUtf8OutpuParameter() );
  +        addArgument( exe, getFullPathsParameter() );
  +        addArgument( exe, getExtraOptionsParameter() );
   
           //get dependencies list.
           final DirectoryScanner scanner = super.getDirectoryScanner( m_srcDir );
  @@ -539,14 +538,14 @@
           for( int i = 0; i < dependencies.length; i++ )
           {
               final String targetFile = baseDir + File.separator + dependencies[ i ];
  -            addArgument( cmd, targetFile );
  +            addArgument( exe, targetFile );
           }
   
           //now run the command of exe + settings + files
           exe.execute( getContext() );
       }
   
  -    private void addArgument( final Commandline cmd, final String argument )
  +    private void addArgument( final ArgumentList cmd, final String argument )
       {
           if( null != argument && 0 != argument.length() )
           {
  
  
  
  1.8       +12 -13    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/Ilasm.java
  
  Index: Ilasm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/dotnet/Ilasm.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Ilasm.java	29 Mar 2002 12:57:21 -0000	1.7
  +++ Ilasm.java	7 Apr 2002 23:10:43 -0000	1.8
  @@ -11,7 +11,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.tools.todo.taskdefs.MatchingTask;
  -import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.types.DirectoryScanner;
   
   /**
  @@ -248,21 +248,20 @@
           throws TaskException
       {
           final Execute exe = new Execute();
  -        final Commandline cmd = exe.getCommandline();
  -        cmd.setExecutable( EXE_NAME );
  -        addArgument( cmd, getDebugParameter() );
  -        addArgument( cmd, getTargetTypeParameter() );
  -        addArgument( cmd, getListingParameter() );
  -        addArgument( cmd, getOutputFileParameter() );
  -        addArgument( cmd, getResourceFileParameter() );
  -        addArgument( cmd, getVerboseParameter() );
  -        addArgument( cmd, getKeyfileParameter() );
  -        addArgument( cmd, getExtraOptionsParameter() );
  -        addArgument( cmd, targetFile );
  +        exe.setExecutable( EXE_NAME );
  +        addArgument( exe, getDebugParameter() );
  +        addArgument( exe, getTargetTypeParameter() );
  +        addArgument( exe, getListingParameter() );
  +        addArgument( exe, getOutputFileParameter() );
  +        addArgument( exe, getResourceFileParameter() );
  +        addArgument( exe, getVerboseParameter() );
  +        addArgument( exe, getKeyfileParameter() );
  +        addArgument( exe, getExtraOptionsParameter() );
  +        addArgument( exe, targetFile );
           exe.execute( getContext() );
       }
   
  -    private void addArgument( final Commandline cmd, final String argument )
  +    private void addArgument( final ArgumentList cmd, final String argument )
       {
           if( null != argument && 0 != argument.length() )
           {
  
  
  
  1.3       +7 -7      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JavacAdaptor.java
  
  Index: JavacAdaptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JavacAdaptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavacAdaptor.java	7 Apr 2002 09:51:09 -0000	1.2
  +++ JavacAdaptor.java	7 Apr 2002 23:10:43 -0000	1.3
  @@ -7,18 +7,18 @@
    */
   package org.apache.antlib.java;
   
  -import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.file.Path;
  -import org.apache.myrmidon.framework.file.FileListUtil;
  -import org.apache.tools.todo.types.Commandline;
   import java.io.File;
   import java.lang.reflect.Method;
  +import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.framework.file.FileListUtil;
  +import org.apache.myrmidon.framework.file.Path;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * An adaptor for the in-process Javac compiler.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/07 09:51:09 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/07 23:10:43 $
    *
    * @ant.type type="java-compiler" name="javac"
    */
  @@ -32,7 +32,7 @@
       protected void compile( final File[] compileList )
           throws TaskException
       {
  -        final Commandline cmd = new Commandline();
  +        final ArgumentList cmd = new ArgumentList();
           setupModernJavacCommand( cmd, compileList );
   
           final String[] args = cmd.getArguments();
  @@ -73,7 +73,7 @@
       /**
        * Builds the command-line to invoke the compiler with.
        */
  -    private void setupModernJavacCommand( final Commandline cmd,
  +    private void setupModernJavacCommand( final ArgumentList cmd,
                                             final File[] files )
           throws TaskException
       {
  
  
  
  1.4       +11 -13    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JikesAdaptor.java
  
  Index: JikesAdaptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/java/JikesAdaptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JikesAdaptor.java	7 Apr 2002 09:51:09 -0000	1.3
  +++ JikesAdaptor.java	7 Apr 2002 23:10:43 -0000	1.4
  @@ -13,7 +13,6 @@
   import org.apache.myrmidon.framework.java.JavaRuntimeClassPath;
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  -import org.apache.tools.todo.types.Commandline;
   
   /**
    * An adaptor for the jikes compiler.
  @@ -25,7 +24,7 @@
    * @author <a href="mailto:jayglanville@home.com">J D Glanville</a>
    * @author skanthak@muehlheim.de
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.3 $ $Date: 2002/04/07 09:51:09 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/07 23:10:43 $
    *
    * @ant.type type="java-compiler" name="jikes"
    */
  @@ -38,7 +37,7 @@
       protected void buildCommandLine( final Execute exe, final File tempFile )
           throws TaskException
       {
  -        Path classpath = new Path();
  +        final Path classpath = new Path();
   
           // Add the destination directory
           classpath.addLocation( getDestDir() );
  @@ -57,28 +56,27 @@
           classpath.add( new JavaRuntimeClassPath() );
   
           // Build the command line
  -        final Commandline cmd = exe.getCommandline();
  -        cmd.setExecutable( "jikes" );
  +        exe.setExecutable( "jikes" );
   
           if( isDeprecation() )
           {
  -            cmd.addArgument( "-deprecation" );
  +            exe.addArgument( "-deprecation" );
           }
   
           if( isDebug() )
           {
  -            cmd.addArgument( "-g" );
  +            exe.addArgument( "-g" );
           }
   
  -        cmd.addArgument( "-d" );
  -        cmd.addArgument( getDestDir() );
  +        exe.addArgument( "-d" );
  +        exe.addArgument( getDestDir() );
   
  -        cmd.addArgument( "-classpath" );
  -        cmd.addArgument( FileListUtil.formatPath( classpath, getContext() ) );
  +        exe.addArgument( "-classpath" );
  +        exe.addArgument( FileListUtil.formatPath( classpath, getContext() ) );
   
           // TODO - make this configurable
  -        cmd.addArgument( "+E" );
  +        exe.addArgument( "+E" );
   
  -        cmd.addArgument( "@" + tempFile.getAbsolutePath() );
  +        exe.addArgument( "@" + tempFile.getAbsolutePath() );
       }
   }
  
  
  
  1.18      +12 -26    jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java
  
  Index: Exec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Exec.java	23 Mar 2002 03:46:32 -0000	1.17
  +++ Exec.java	7 Apr 2002 23:10:43 -0000	1.18
  @@ -14,7 +14,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.tools.todo.types.Argument;
  -import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.EnvironmentData;
   import org.apache.tools.todo.types.EnvironmentVariable;
   
  @@ -32,11 +31,8 @@
   public class Exec
       extends AbstractTask
   {
  -    private long m_timeout;
  -    private EnvironmentData m_env = new EnvironmentData();
  -    private Commandline m_command = new Commandline();
  -    private boolean m_newEnvironment;
  -    private File m_dir;
  +    private final Execute m_exe = new Execute();
  +    private final EnvironmentData m_env = new EnvironmentData();
       private String m_os;
   
       /**
  @@ -45,7 +41,7 @@
       public void setDir( final File dir )
           throws TaskException
       {
  -        m_dir = dir;
  +        m_exe.setWorkingDirectory( dir );
       }
   
       /**
  @@ -54,7 +50,7 @@
       public void setExecutable( final String value )
           throws TaskException
       {
  -        m_command.setExecutable( value );
  +        m_exe.setExecutable( value );
       }
   
       /**
  @@ -62,7 +58,7 @@
        */
       public void setNewenvironment( final boolean newEnvironment )
       {
  -        m_newEnvironment = newEnvironment;
  +        m_exe.setNewenvironment( newEnvironment );
       }
   
       /**
  @@ -78,7 +74,7 @@
        */
       public void setTimeout( final long timeout )
       {
  -        m_timeout = timeout;
  +        m_exe.setTimeout( timeout );
       }
   
       /**
  @@ -94,7 +90,7 @@
        */
       public void addArg( final Argument argument )
       {
  -        m_command.addArgument( argument );
  +        m_exe.addArgument( argument );
       }
   
       public void execute()
  @@ -105,22 +101,12 @@
               return;
           }
   
  -        // execute the command
  -        final Execute exe = createExecute();
  -        exe.execute( getContext() );
  -    }
  -
  -    private Execute createExecute()
  -        throws TaskException
  -    {
  +        // Setup environment vars
           final Properties environment = m_env.getVariables();
  +        m_exe.setEnvironment( environment );
   
  -        final Execute exe = new Execute();
  -        exe.setTimeout( m_timeout );
  -        exe.setWorkingDirectory( m_dir );
  -        exe.setNewenvironment( m_newEnvironment );
  -        exe.setEnvironment( environment );
  -        exe.setCommandline( m_command );
  -        return exe;
  +        // execute the command
  +        m_exe.execute( getContext() );
       }
  +
   }
  
  
  
  1.14      +4 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/security/GenerateKey.java
  
  Index: GenerateKey.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/security/GenerateKey.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GenerateKey.java	23 Mar 2002 03:46:33 -0000	1.13
  +++ GenerateKey.java	7 Apr 2002 23:10:43 -0000	1.14
  @@ -118,15 +118,13 @@
           final String message = "Generating Key for " + m_alias;
           getContext().info( message );
   
  -        final Commandline cmd = createCommand();
  -        final Execute exe = new Execute();
  -        exe.setCommandline( cmd );
  +        final Execute exe = createCommand();
           exe.execute( getContext() );
       }
   
  -    private Commandline createCommand()
  +    private Execute createCommand()
       {
  -        final Commandline cmd = new Commandline();
  +        final Execute cmd = new Execute();
           cmd.setExecutable( "keytool" );
   
           cmd.addArgument( "-genkey " );
  @@ -202,6 +200,7 @@
               cmd.addArgument( "-validity" );
               cmd.addArgument( "" + m_validity );
           }
  +
           return cmd;
       }
   
  
  
  
  1.17      +9 -10     jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/security/SignJar.java
  
  Index: SignJar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/security/SignJar.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SignJar.java	7 Apr 2002 10:19:25 -0000	1.16
  +++ SignJar.java	7 Apr 2002 23:10:43 -0000	1.17
  @@ -17,7 +17,6 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.myrmidon.framework.FileSet;
  -import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.DirectoryScanner;
   import org.apache.tools.todo.types.ScannerUtil;
   
  @@ -293,21 +292,20 @@
           final String message = "Signing Jar : " + jarSource.getAbsolutePath();
           getContext().info( message );
   
  -        final Commandline cmd = buildCommand( jarTarget, jarSource );
  -        final Execute exe = new Execute();
  -        exe.setCommandline( cmd );
  +        final Execute exe = buildCommand( jarTarget, jarSource );
           exe.execute( getContext() );
       }
   
  -    private Commandline buildCommand( final File jarTarget, final File jarSource )
  +    private Execute buildCommand( final File jarTarget,
  +                                  final File jarSource )
       {
  -        final Commandline cmd = new Commandline();
  +        final Execute cmd = new Execute();
           cmd.setExecutable( "jarsigner" );
   
           if( null != m_keystore )
           {
               cmd.addArgument( "-keystore" );
  -            cmd.addArgument( m_keystore.toString() );
  +            cmd.addArgument( m_keystore );
           }
   
           if( null != m_storepass )
  @@ -331,13 +329,13 @@
           if( null != m_sigfile )
           {
               cmd.addArgument( "-sigfile" );
  -            cmd.addArgument( m_sigfile.toString() );
  +            cmd.addArgument( m_sigfile );
           }
   
           if( null != jarTarget )
           {
               cmd.addArgument( "-signedjar" );
  -            cmd.addArgument( jarTarget.toString() );
  +            cmd.addArgument( jarTarget );
           }
   
           if( m_verbose )
  @@ -355,9 +353,10 @@
               cmd.addArgument( "-sectionsonly" );
           }
   
  -        cmd.addArgument( jarSource.toString() );
  +        cmd.addArgument( jarSource );
   
           cmd.addArgument( m_alias );
  +
           return cmd;
       }
   }
  
  
  
  1.12      +20 -19    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Execute.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Execute.java	29 Mar 2002 12:56:02 -0000	1.11
  +++ Execute.java	7 Apr 2002 23:10:43 -0000	1.12
  @@ -29,14 +29,14 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
  - * @version $Revision: 1.11 $ $Date: 2002/03/29 12:56:02 $
  + * @version $Revision: 1.12 $ $Date: 2002/04/07 23:10:43 $
    */
   public class Execute
  +    extends Commandline
   {
       private static final Resources REZ
           = ResourceManager.getPackageResources( Execute.class );
   
  -    private Commandline m_command;
       private Properties m_environment = new Properties();
       private File m_workingDirectory;
       private boolean m_newEnvironment;
  @@ -76,19 +76,8 @@
        */
       public void setCommandline( final Commandline command )
       {
  -        m_command = command;
  -    }
  -
  -    /**
  -     * Returns the commandline of the process to launch.
  -     */
  -    public Commandline getCommandline()
  -    {
  -        if( null == m_command )
  -        {
  -            m_command = new Commandline();
  -        }
  -        return m_command;
  +        setExecutable( command.getExecutable() );
  +        addArguments( command );
       }
   
       /**
  @@ -177,7 +166,7 @@
           }
           catch( final Exception e )
           {
  -            final String message = REZ.getString( "execute.failed.error", m_command.getExecutable() );
  +            final String message = REZ.getString( "execute.failed.error", getExecutable() );
               throw new TaskException( message, e );
           }
       }
  @@ -207,7 +196,7 @@
        */
       private void validate() throws TaskException
       {
  -        if( null == m_command.getExecutable() )
  +        if( null == getExecutable() )
           {
               final String message = REZ.getString( "execute.no-executable.error" );
               throw new TaskException( message );
  @@ -250,7 +239,7 @@
           if( ! m_ignoreReturnCode && returnCode != m_returnCode )
           {
               final String message = REZ.getString( "execute.bad-resultcode.error",
  -                                                  m_command.getExecutable(),
  +                                                  getExecutable(),
                                                     new Integer(returnCode) );
               throw new TaskException( message );
           }
  @@ -265,7 +254,7 @@
           throws ExecException
       {
           // Build the command line
  -        final String[] command = m_command.getCommandline();
  +        final String[] command = getCommandLine();
   
           // Build the environment
           final Properties newEnvironment = new Properties();
  @@ -285,5 +274,17 @@
           return new ExecMetaData( command,
                                    newEnvironment,
                                    workingDir );
  +    }
  +
  +    /**
  +     * Builds the command line.
  +     */
  +    private String[] getCommandLine()
  +    {
  +        final String[] args = getArguments();
  +        final String[] result = new String[ args.length + 1 ];
  +        result[ 0 ] = getExecutable().replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
  +        System.arraycopy( args, 0, result, 1, args.length );
  +        return result;
       }
   }
  
  
  
  1.7       +16 -17    jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java
  
  Index: ExecuteJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExecuteJava.java	7 Apr 2002 09:51:09 -0000	1.6
  +++ ExecuteJava.java	7 Apr 2002 23:10:43 -0000	1.7
  @@ -19,9 +19,9 @@
   import org.apache.myrmidon.framework.Execute;
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  -import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.EnvironmentData;
   import org.apache.tools.todo.types.SysProperties;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.util.FileUtils;
   
   /**
  @@ -46,8 +46,8 @@
   
       private final Path m_classPath = new Path();
       private final EnvironmentData m_sysProperties = new EnvironmentData();
  -    private final Commandline m_args = new Commandline();
  -    private final Commandline m_vmArgs = new Commandline();
  +    private final ArgumentList m_args = new ArgumentList();
  +    private final ArgumentList m_vmArgs = new ArgumentList();
       private boolean m_fork;
       private File m_workingDirectory;
       private File m_jar;
  @@ -150,7 +150,7 @@
        *
        * @return the application's arguments.  Can be modified.
        */
  -    public Commandline getArguments()
  +    public ArgumentList getArguments()
       {
           return m_args;
       }
  @@ -161,7 +161,7 @@
        *
        * @return the JVM aguments.  Can be modified.
        */
  -    public Commandline getVmArguments()
  +    public ArgumentList getVmArguments()
       {
           return m_vmArgs;
       }
  @@ -287,52 +287,51 @@
           exe.setIgnoreReturnCode( m_ignoreReturnCode );
   
           // Setup the command line
  -        final Commandline command = exe.getCommandline();
   
           // Executable name
           if( m_jvm != null )
           {
  -            command.setExecutable( m_jvm );
  +            exe.setExecutable( m_jvm );
           }
           else
           {
  -            command.setExecutable( getJavaExecutableName() );
  +            exe.setExecutable( getJavaExecutableName() );
           }
   
           // JVM arguments
  -        command.addArguments( m_vmArgs );
  +        exe.addArguments( m_vmArgs );
   
           // Max memory size
           if( m_maxMemory != null )
           {
  -            command.addArgument( "-Xmx" + m_maxMemory );
  +            exe.addArgument( "-Xmx" + m_maxMemory );
           }
   
           // System properties
           final String[] props = SysProperties.getJavaVariables( m_sysProperties );
  -        command.addArguments( props );
  +        exe.addArguments( props );
   
           // Classpath
           final String[] classpath = m_classPath.listFiles( context );
           if( classpath.length > 0 )
           {
  -            command.addArgument( "-classpath" );
  -            command.addArgument( PathUtil.formatPath( classpath ) );
  +            exe.addArgument( "-classpath" );
  +            exe.addArgument( PathUtil.formatPath( classpath ) );
           }
   
           // What to execute
           if( m_jar != null )
           {
  -            command.addArgument( "-jar" );
  -            command.addArgument( m_jar );
  +            exe.addArgument( "-jar" );
  +            exe.addArgument( m_jar );
           }
           else
           {
  -            command.addArgument( m_className );
  +            exe.addArgument( m_className );
           }
   
           // Java app arguments
  -        command.addArguments( m_args );
  +        exe.addArguments( m_args );
   
           // Execute
           return exe.execute( context );
  
  
  
  1.4       +2 -6      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Cab.java
  
  Index: Cab.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Cab.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Cab.java	7 Apr 2002 10:19:26 -0000	1.3
  +++ Cab.java	7 Apr 2002 23:10:43 -0000	1.4
  @@ -135,8 +135,7 @@
                   File listFile = createListFile( files );
                   Execute exe = new Execute();
                   exe.setWorkingDirectory( m_baseDir );
  -                final Commandline cmd = createCommand( listFile );
  -                exe.setCommandline( cmd );
  +                createCommand( exe, listFile );
                   exe.execute( getContext() );
   
                   listFile.delete();
  @@ -243,10 +242,9 @@
       /**
        * Create the cabarc command line to use.
        */
  -    protected Commandline createCommand( final File listFile )
  +    protected void createCommand( final Commandline cmd, final File listFile )
           throws TaskException
       {
  -        final Commandline cmd = new Commandline();
           cmd.setExecutable( "cabarc" );
           cmd.addArgument( "-r" );
           cmd.addArgument( "-p" );
  @@ -265,8 +263,6 @@
           cmd.addArgument( "n" );
           cmd.addArgument( m_cabFile );
           cmd.addArgument( "@" + listFile.getAbsolutePath() );
  -
  -        return cmd;
       }
   
       /**
  
  
  
  1.7       +7 -7      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Javah.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Javah.java	7 Apr 2002 09:51:09 -0000	1.6
  +++ Javah.java	7 Apr 2002 23:10:43 -0000	1.7
  @@ -14,10 +14,10 @@
   import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.todo.types.Commandline;
  -import org.apache.tools.todo.util.FileUtils;
  -import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  +import org.apache.myrmidon.framework.file.Path;
  +import org.apache.tools.todo.types.ArgumentList;
  +import org.apache.tools.todo.util.FileUtils;
   
   /**
    * Task to generate JNI header files using javah. This task can take the
  @@ -207,7 +207,7 @@
        * Logs the compilation parameters, adds the files to compile and logs the
        * &qout;niceSourceList&quot;
        */
  -    private void logAndAddFilesToCompile( final Commandline cmd )
  +    private void logAndAddFilesToCompile( final ArgumentList cmd )
           throws TaskException
       {
           final String[] args = cmd.getArguments();
  @@ -251,10 +251,10 @@
       /**
        * Does the command line argument processing common to classic and modern.
        */
  -    private Commandline setupJavahCommand()
  +    private ArgumentList setupJavahCommand()
           throws TaskException
       {
  -        final Commandline cmd = new Commandline();
  +        final ArgumentList cmd = new ArgumentList();
   
           if( m_destDir != null )
           {
  @@ -316,7 +316,7 @@
       private void doClassicCompile()
           throws TaskException
       {
  -        Commandline cmd = setupJavahCommand();
  +        ArgumentList cmd = setupJavahCommand();
   
           // Use reflection to be able to build on all JDKs
           /*
  
  
  
  1.4       +4 -7      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Rpm.java
  
  Index: Rpm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/Rpm.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Rpm.java	18 Mar 2002 11:49:47 -0000	1.3
  +++ Rpm.java	7 Apr 2002 23:10:43 -0000	1.4
  @@ -8,10 +8,8 @@
   package org.apache.tools.todo.taskdefs;
   
   import java.io.File;
  -import org.apache.aut.nativelib.ExecManager;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.tools.todo.types.Commandline;
   
  @@ -89,20 +87,18 @@
       public void execute()
           throws TaskException
       {
  -        final Commandline cmd = createCommand();
  -        final Execute exe = new Execute();
  +        final Execute exe = createCommand();
           exe.setWorkingDirectory( m_topDir );
  -        exe.setCommandline( cmd );
   
           final String message = "Building the RPM based on the " + m_specFile + " file";
           getContext().info( message );
           exe.execute( getContext() );
       }
   
  -    private Commandline createCommand()
  +    private Execute createCommand()
           throws TaskException
       {
  -        final Commandline cmd = new Commandline();
  +        final Execute cmd = new Execute();
           cmd.setExecutable( "rpm" );
           if( m_topDir != null )
           {
  @@ -126,6 +122,7 @@
           }
   
           cmd.addArgument( "SPECS/" + m_specFile );
  +
           return cmd;
       }
   }
  
  
  
  1.3       +3 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMCheck.java
  
  Index: CCMCheck.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMCheck.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCMCheck.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCMCheck.java	7 Apr 2002 23:10:43 -0000	1.3
  @@ -10,6 +10,7 @@
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Class common to all check commands (checkout, checkin,checkin default task);
  @@ -127,7 +128,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void checkOptions( Commandline cmd )
  +    private void checkOptions( ArgumentList cmd )
       {
           if( getComment() != null )
           {
  @@ -143,7 +144,7 @@
   
           if( getFile() != null )
           {
  -            cmd.addArgument( _file.getAbsolutePath() );
  +            cmd.addArgument( _file );
           }// end of if ()
       }
   }
  
  
  
  1.3       +4 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMCreateTask.java
  
  Index: CCMCreateTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMCreateTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCMCreateTask.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCMCreateTask.java	7 Apr 2002 23:10:43 -0000	1.3
  @@ -12,6 +12,7 @@
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task allows to create new ccm task and set it as the default
  @@ -135,7 +136,7 @@
       public void execute()
           throws TaskException
       {
  -        final Commandline commandLine = determineTask();
  +        final ArgumentList commandLine = determineTask();
           if( null == m_task )
           {
               final String message = "Error determining task";
  @@ -150,7 +151,7 @@
           run( cmd, null );
       }
   
  -    private Commandline determineTask()
  +    private ArgumentList determineTask()
           throws TaskException
       {
           final Commandline commandLine = new Commandline();
  @@ -169,7 +170,7 @@
       /**
        * Check the command line options.
        */
  -    private void checkOptions( final Commandline cmd )
  +    private void checkOptions( final ArgumentList cmd )
       {
           if( m_comment != null )
           {
  
  
  
  1.3       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMReconfigure.java
  
  Index: CCMReconfigure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/ccm/CCMReconfigure.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCMReconfigure.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCMReconfigure.java	7 Apr 2002 23:10:43 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task allows to reconfigure a project, recurcively or not
  @@ -91,7 +92,7 @@
       /**
        * Build the command line options.
        */
  -    private void checkOptions( final Commandline cmd )
  +    private void checkOptions( final ArgumentList cmd )
       {
           if( m_recurse == true )
           {
  
  
  
  1.3       +4 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCCheckin.java
  
  Index: CCCheckin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCCheckin.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCCheckin.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCCheckin.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform Checkin command to ClearCase. <p>
  @@ -347,7 +348,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getCommentCommand( Commandline cmd )
  +    private void getCommentCommand( ArgumentList cmd )
       {
           if( getComment() != null )
           {
  @@ -367,7 +368,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getCommentFileCommand( Commandline cmd )
  +    private void getCommentFileCommand( ArgumentList cmd )
       {
           if( getCommentFile() != null )
           {
  @@ -387,7 +388,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void checkOptions( Commandline cmd )
  +    private void checkOptions( ArgumentList cmd )
       {
           if( getComment() != null )
           {
  
  
  
  1.3       +6 -5      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCCheckout.java
  
  Index: CCCheckout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCCheckout.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCCheckout.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCCheckout.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform Checkout command to ClearCase. <p>
  @@ -435,7 +436,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getBranchCommand( Commandline cmd )
  +    private void getBranchCommand( ArgumentList cmd )
       {
           if( getBranch() != null )
           {
  @@ -455,7 +456,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getCommentCommand( Commandline cmd )
  +    private void getCommentCommand( ArgumentList cmd )
       {
           if( getComment() != null )
           {
  @@ -475,7 +476,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getCommentFileCommand( Commandline cmd )
  +    private void getCommentFileCommand( ArgumentList cmd )
       {
           if( getCommentFile() != null )
           {
  @@ -495,7 +496,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getOutCommand( Commandline cmd )
  +    private void getOutCommand( ArgumentList cmd )
       {
           if( getOut() != null )
           {
  @@ -515,7 +516,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void checkOptions( Commandline cmd )
  +    private void checkOptions( ArgumentList cmd )
       {
           // ClearCase items
           if( getReserved() )
  
  
  
  1.3       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCUnCheckout.java
  
  Index: CCUnCheckout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCUnCheckout.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCUnCheckout.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCUnCheckout.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform UnCheckout command to ClearCase. <p>
  @@ -139,7 +140,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void checkOptions( Commandline cmd )
  +    private void checkOptions( ArgumentList cmd )
       {
           // ClearCase items
           if( getKeepCopy() )
  
  
  
  1.3       +3 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCUpdate.java
  
  Index: CCUpdate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/clearcase/CCUpdate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CCUpdate.java	18 Mar 2002 08:53:30 -0000	1.2
  +++ CCUpdate.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform an Update command to ClearCase. <p>
  @@ -349,7 +350,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void getLogCommand( Commandline cmd )
  +    private void getLogCommand( ArgumentList cmd )
       {
           if( getLog() == null )
           {
  @@ -373,7 +374,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    private void checkOptions( Commandline cmd )
  +    private void checkOptions( ArgumentList cmd )
       {
           // ClearCase items
           if( getGraphical() )
  
  
  
  1.10      +11 -10    jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultCompilerAdapter.java	7 Apr 2002 10:19:26 -0000	1.9
  +++ DefaultCompilerAdapter.java	7 Apr 2002 23:10:44 -0000	1.10
  @@ -18,6 +18,7 @@
   import org.apache.myrmidon.framework.Execute;
   import org.apache.myrmidon.framework.FileSet;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
   import org.apache.tools.todo.util.FileUtils;
  @@ -99,7 +100,7 @@
           return m_attributes;
       }
   
  -    protected Commandline setupJavacCommand()
  +    protected ArgumentList setupJavacCommand()
           throws TaskException
       {
           return setupJavacCommand( false );
  @@ -112,10 +113,10 @@
        * @param debugLevelCheck Description of Parameter
        * @return Description of the Returned Value
        */
  -    protected Commandline setupJavacCommand( boolean debugLevelCheck )
  +    protected ArgumentList setupJavacCommand( boolean debugLevelCheck )
           throws TaskException
       {
  -        Commandline cmd = new Commandline();
  +        ArgumentList cmd = new ArgumentList();
           setupJavacCommandlineSwitches( cmd, debugLevelCheck );
           logFilesToCompile( cmd );
           addFilesToCompile( cmd );
  @@ -130,7 +131,7 @@
        * @param useDebugLevel Description of Parameter
        * @return Description of the Returned Value
        */
  -    protected Commandline setupJavacCommandlineSwitches( Commandline cmd,
  +    protected ArgumentList setupJavacCommandlineSwitches( ArgumentList cmd,
                                                            boolean useDebugLevel )
           throws TaskException
       {
  @@ -253,10 +254,10 @@
        *
        * @return Description of the Returned Value
        */
  -    protected Commandline setupModernJavacCommand()
  +    protected ArgumentList setupModernJavacCommand()
           throws TaskException
       {
  -        Commandline cmd = new Commandline();
  +        ArgumentList cmd = new ArgumentList();
           setupModernJavacCommandlineSwitches( cmd );
   
           logFilesToCompile( cmd );
  @@ -271,7 +272,7 @@
        * @param cmd Description of Parameter
        * @return Description of the Returned Value
        */
  -    protected Commandline setupModernJavacCommandlineSwitches( Commandline cmd )
  +    protected ArgumentList setupModernJavacCommandlineSwitches( ArgumentList cmd )
           throws TaskException
       {
           setupJavacCommandlineSwitches( cmd, true );
  @@ -309,7 +310,7 @@
        *
        * @param cmd The feature to be added to the CurrentCompilerArgs attribute
        */
  -    protected void addCurrentCompilerArgs( Commandline cmd )
  +    protected void addCurrentCompilerArgs( ArgumentList cmd )
       {
           cmd.addArguments( getJavac().getCurrentCompilerArgs() );
       }
  @@ -382,7 +383,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    protected void logFilesToCompile( final Commandline cmd )
  +    protected void logFilesToCompile( final ArgumentList cmd )
           throws TaskException
       {
           final String[] cmdline = cmd.getArguments();
  @@ -409,7 +410,7 @@
       /**
        * Adds the files to compile to a command-line
        */
  -    protected void addFilesToCompile( final Commandline cmd )
  +    protected void addFilesToCompile( final ArgumentList cmd )
       {
           for( int i = 0; i < m_compileList.length; i++ )
           {
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac12.java
  
  Index: Javac12.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac12.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Javac12.java	17 Mar 2002 09:42:22 -0000	1.1
  +++ Javac12.java	7 Apr 2002 23:10:44 -0000	1.2
  @@ -13,6 +13,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;
   
   /**
  @@ -32,7 +33,7 @@
           throws TaskException
       {
           getTaskContext().debug( "Using classic compiler" );
  -        Commandline cmd = setupJavacCommand( true );
  +        ArgumentList cmd = setupJavacCommand( true );
   
           try
           {
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac13.java
  
  Index: Javac13.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Javac13.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Javac13.java	17 Mar 2002 09:42:22 -0000	1.1
  +++ Javac13.java	7 Apr 2002 23:10:44 -0000	1.2
  @@ -11,6 +11,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.taskdefs.javac.DefaultCompilerAdapter;
   
   /**
  @@ -35,7 +36,7 @@
           throws TaskException
       {
           getTaskContext().debug( "Using modern compiler" );
  -        Commandline cmd = setupModernJavacCommand();
  +        ArgumentList cmd = setupModernJavacCommand();
   
           // Use reflection to be able to build on all JDKs >= 1.1:
           try
  
  
  
  1.7       +4 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Kjc.java
  
  Index: Kjc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javac/Kjc.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Kjc.java	7 Apr 2002 09:51:09 -0000	1.6
  +++ Kjc.java	7 Apr 2002 23:10:44 -0000	1.7
  @@ -10,6 +10,7 @@
   import java.lang.reflect.Method;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
   
  @@ -26,7 +27,7 @@
           throws TaskException
       {
           getTaskContext().debug( "Using kjc compiler" );
  -        Commandline cmd = setupKjcCommand();
  +        ArgumentList cmd = setupKjcCommand();
   
           try
           {
  @@ -63,10 +64,10 @@
        *
        * @return Description of the Returned Value
        */
  -    protected Commandline setupKjcCommand()
  +    protected ArgumentList setupKjcCommand()
           throws TaskException
       {
  -        Commandline cmd = new Commandline();
  +        ArgumentList cmd = new Commandline();
   
           // generate classpath, because kjc does't support sourcepath.
           Path classpath = new Path();
  
  
  
  1.11      +3 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java
  
  Index: Javadoc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/javadoc/Javadoc.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Javadoc.java	7 Apr 2002 10:19:26 -0000	1.10
  +++ Javadoc.java	7 Apr 2002 23:10:44 -0000	1.11
  @@ -27,6 +27,7 @@
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
   import org.apache.tools.todo.types.ScannerUtil;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * This task makes it easy to generate Javadoc documentation for a collection of
  @@ -65,7 +66,7 @@
       extends AbstractTask
       implements ExecOutputHandler
   {
  -    private Commandline m_command = new Commandline();
  +    private ArgumentList m_command = new ArgumentList();
   
       private Path m_sourcePath;
       private File m_destDir;
  @@ -882,7 +883,7 @@
        * @param packages Description of Parameter
        * @param excludePackages Description of Parameter
        */
  -    private void evaluatePackages( Commandline toExecute, Path sourcePath,
  +    private void evaluatePackages( ArgumentList toExecute, Path sourcePath,
                                      ArrayList packages, ArrayList excludePackages )
           throws TaskException
       {
  
  
  
  1.3       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultCompilerAdapter.java	7 Apr 2002 09:51:10 -0000	1.2
  +++ DefaultCompilerAdapter.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -14,6 +14,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.taskdefs.jsp.JspC;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.util.FileUtils;
   
   /**
  @@ -61,7 +62,7 @@
        */
       protected void logAndAddFilesToCompile( JspC jspc,
                                               ArrayList compileList,
  -                                            Commandline cmd )
  +                                            ArgumentList cmd )
           throws TaskException
       {
           final String[] args = cmd.getArguments();
  
  
  
  1.4       +2 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/JasperC.java
  
  Index: JasperC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/JasperC.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JasperC.java	7 Apr 2002 09:51:10 -0000	1.3
  +++ JasperC.java	7 Apr 2002 23:10:44 -0000	1.4
  @@ -8,12 +8,10 @@
   package org.apache.tools.todo.taskdefs.jsp.compilers;
   
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.java.ExecuteJava;
  -import org.apache.antlib.java.JavaTask;
   import org.apache.tools.todo.taskdefs.jsp.JspC;
  -import org.apache.tools.todo.types.Argument;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * The implementation of the jasper compiler. This is a cut-and-paste of the
  @@ -50,7 +48,7 @@
       /*
        * ------------------------------------------------------------
        */
  -    private void setupJasperCommand( final Commandline cmd )
  +    private void setupJasperCommand( final ArgumentList cmd )
           throws TaskException
       {
           JspC jspc = getJspc();
  
  
  
  1.11      +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/junit/JUnitTask.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JUnitTask.java	7 Apr 2002 09:51:10 -0000	1.10
  +++ JUnitTask.java	7 Apr 2002 23:10:44 -0000	1.11
  @@ -27,6 +27,7 @@
   import org.apache.tools.todo.types.EnvironmentData;
   import org.apache.tools.todo.types.EnvironmentVariable;
   import org.apache.tools.todo.types.SysProperties;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Ant task to run JUnit tests. <p>
  @@ -112,7 +113,7 @@
       private String maxMem;
       private EnvironmentData sysProperties = new EnvironmentData();
       private Path classPath = new Path();
  -    private Commandline vmArgs = new Commandline();
  +    private ArgumentList vmArgs = new Commandline();
   
       /**
        * The directory to invoke the VM in. Ignored if no JVM is forked.
  
  
  
  1.8       +7 -7      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java
  
  Index: DefaultRmicAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/DefaultRmicAdapter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultRmicAdapter.java	7 Apr 2002 09:51:10 -0000	1.7
  +++ DefaultRmicAdapter.java	7 Apr 2002 23:10:44 -0000	1.8
  @@ -13,10 +13,10 @@
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.FileNameMapper;
  -import org.apache.tools.todo.types.Commandline;
  -import org.apache.tools.todo.util.FileUtils;
  -import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  +import org.apache.myrmidon.framework.file.Path;
  +import org.apache.tools.todo.types.ArgumentList;
  +import org.apache.tools.todo.util.FileUtils;
   
   /**
    * This is the default implementation for the RmicAdapter interface. Currently,
  @@ -88,7 +88,7 @@
        *
        * @return Description of the Returned Value
        */
  -    protected Commandline setupRmicCommand()
  +    protected ArgumentList setupRmicCommand()
           throws TaskException
       {
           return setupRmicCommand( null );
  @@ -100,10 +100,10 @@
        * @param options additional parameters needed by a specific implementation.
        * @return Description of the Returned Value
        */
  -    protected Commandline setupRmicCommand( String[] options )
  +    protected ArgumentList setupRmicCommand( String[] options )
           throws TaskException
       {
  -        Commandline cmd = new Commandline();
  +        ArgumentList cmd = new ArgumentList();
   
           if( options != null )
           {
  @@ -220,7 +220,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    protected void logAndAddFilesToCompile( final Commandline cmd )
  +    protected void logAndAddFilesToCompile( final ArgumentList cmd )
           throws TaskException
       {
           ArrayList compileList = attributes.getCompileList();
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/KaffeRmic.java
  
  Index: KaffeRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/KaffeRmic.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KaffeRmic.java	17 Mar 2002 09:42:23 -0000	1.1
  +++ KaffeRmic.java	7 Apr 2002 23:10:44 -0000	1.2
  @@ -12,6 +12,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;
   
   /**
  @@ -26,7 +27,7 @@
           throws TaskException
       {
           getTaskContext().debug( "Using Kaffe rmic" );
  -        Commandline cmd = setupRmicCommand();
  +        ArgumentList cmd = setupRmicCommand();
   
           try
           {
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/SunRmic.java
  
  Index: SunRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/SunRmic.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SunRmic.java	17 Mar 2002 09:42:23 -0000	1.1
  +++ SunRmic.java	7 Apr 2002 23:10:44 -0000	1.2
  @@ -14,6 +14,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;
   
   /**
  @@ -28,7 +29,7 @@
           throws TaskException
       {
           getTaskContext().debug( "Using SUN rmic compiler" );
  -        Commandline cmd = setupRmicCommand();
  +        ArgumentList cmd = setupRmicCommand();
   
           // Create an instance of the rmic, redirecting output to
           // the project log
  
  
  
  1.3       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/WLRmic.java
  
  Index: WLRmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/rmic/WLRmic.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WLRmic.java	7 Apr 2002 09:51:10 -0000	1.2
  +++ WLRmic.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -12,6 +12,7 @@
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.java.ExecuteJava;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.taskdefs.rmic.DefaultRmicAdapter;
   
   /**
  @@ -49,7 +50,7 @@
   
           final ExecuteJava exe = new ExecuteJava();
           exe.setClassName( "weblogic.rmic" );
  -        final Commandline cmd = setupRmicCommand( new String[]{"-noexit"} );
  +        final ArgumentList cmd = setupRmicCommand( new String[]{"-noexit"} );
           exe.getArguments().addArguments( cmd );
   
           exe.execute( getTaskContext() );
  
  
  
  1.11      +6 -7      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/Coverage.java
  
  Index: Coverage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/sitraka/Coverage.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Coverage.java	7 Apr 2002 10:19:27 -0000	1.10
  +++ Coverage.java	7 Apr 2002 23:10:44 -0000	1.11
  @@ -19,6 +19,7 @@
   import org.apache.myrmidon.framework.FileSet;
   import org.apache.tools.todo.types.Argument;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.myrmidon.framework.file.Path;
   import org.apache.aut.nativelib.PathUtil;
   
  @@ -57,9 +58,9 @@
       private String m_vm;
       private File m_workingDir;
       private String m_className;
  -    private Commandline m_args = new Commandline();
  +    private ArgumentList m_args = new ArgumentList();
       private Path m_classpath = new Path();
  -    private Commandline m_vmArgs = new Commandline();
  +    private ArgumentList m_vmArgs = new ArgumentList();
   
       /**
        * classname to run as standalone or runner for filesets
  @@ -241,12 +242,10 @@
           {
               // we need to run Coverage from his directory due to dll/jar issues
               final Execute exe = new Execute();
  -            final Commandline cmdl = exe.getCommandline();
  -            cmdl.setExecutable( new File( m_home, "jplauncher" ).getAbsolutePath() );
  -            cmdl.addArgument( "-jp_input=" + paramfile.getAbsolutePath() );
  +            exe.setExecutable( new File( m_home, "jplauncher" ).getAbsolutePath() );
  +            exe.addArgument( "-jp_input=" + paramfile.getAbsolutePath() );
   
               // use the custom handler for stdin issues
  -            exe.setCommandline( cmdl );
               exe.execute( getContext() );
           }
           finally
  @@ -269,7 +268,7 @@
       protected String[] getParameters()
           throws TaskException
       {
  -        Commandline params = new Commandline();
  +        ArgumentList params = new ArgumentList();
           params.addArgument( "-jp_function=coverage" );
           if( m_vm != null )
           {
  
  
  
  1.3       +2 -2      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/stylebook/StyleBook.java
  
  Index: StyleBook.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/stylebook/StyleBook.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StyleBook.java	21 Mar 2002 08:03:56 -0000	1.2
  +++ StyleBook.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -59,8 +59,8 @@
           validate();
   
           addArg( new Argument( "targetDirectory=" + m_targetDirectory ) );
  -        addArg( new Argument( m_book.toString() ) );
  -        addArg( new Argument( m_skinDirectory.toString() ) );
  +        addArg( new Argument( m_book ) );
  +        addArg( new Argument( m_skinDirectory ) );
           if( null != m_loaderConfig )
           {
               addArg( new Argument( "loaderConfig=" + m_loaderConfig ) );
  
  
  
  1.2       +4 -6      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text/Native2Ascii.java
  
  Index: Native2Ascii.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/text/Native2Ascii.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Native2Ascii.java	17 Mar 2002 09:42:23 -0000	1.1
  +++ Native2Ascii.java	7 Apr 2002 23:10:44 -0000	1.2
  @@ -9,13 +9,11 @@
   
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.AbstractTask;
  -import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.FileNameMapper;
   import org.apache.tools.todo.taskdefs.MatchingTask;
  -import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.DirectoryScanner;
   import org.apache.tools.todo.types.SourceFileScanner;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.tools.todo.util.mappers.IdentityMapper;
   
   /**
  @@ -180,7 +178,7 @@
                                        + " would overwrite its self" );
           }
   
  -        final Commandline cmd = buildCommand( srcFile, destFile );
  +        final ArgumentList cmd = buildCommand( srcFile, destFile );
   
           // Make intermediate directories if needed
           // XXX JDK 1.1 dosen't have File.getParentFile,
  @@ -201,10 +199,10 @@
           }
       }
   
  -    private Commandline buildCommand( final File srcFile,
  +    private ArgumentList buildCommand( final File srcFile,
                                         final File destFile )
       {
  -        final Commandline cmd = new Commandline();// Command line to run
  +        final ArgumentList cmd = new ArgumentList();// Command line to run
           // Set up the basic args (this could be done once, but
           // it's cleaner here)
           if( m_reverse )
  
  
  
  1.4       +2 -1      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSS.java
  
  Index: MSVSS.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSS.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MSVSS.java	18 Mar 2002 11:49:48 -0000	1.3
  +++ MSVSS.java	7 Apr 2002 23:10:44 -0000	1.4
  @@ -14,6 +14,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.Execute;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * A base class for creating tasks for executing commands on Visual SourceSafe.
  @@ -179,7 +180,7 @@
       /**
        * @param cmd Description of Parameter
        */
  -    public void getLoginCommand( Commandline cmd )
  +    public void getLoginCommand( ArgumentList cmd )
       {
           if( m_vssLogin == null )
           {
  
  
  
  1.4       +5 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKIN.java
  
  Index: MSVSSCHECKIN.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKIN.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MSVSSCHECKIN.java	19 Mar 2002 02:44:37 -0000	1.3
  +++ MSVSSCHECKIN.java	7 Apr 2002 23:10:44 -0000	1.4
  @@ -10,6 +10,7 @@
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform CheckIn commands to Microsoft Visual Source Safe.
  @@ -83,7 +84,7 @@
        * Checks the value set for the autoResponse. if it equals "Y" then we
        * return -I-Y if it equals "N" then we return -I-N otherwise we return -I
        */
  -    public void getAutoresponse( final Commandline cmd )
  +    public void getAutoresponse( final ArgumentList cmd )
       {
           if( null == m_autoResponse )
           {
  @@ -109,7 +110,7 @@
        *
        * The localpath is created if it didn't exist
        */
  -    private void getLocalpathCommand( final Commandline cmd )
  +    private void getLocalpathCommand( final ArgumentList cmd )
           throws TaskException
       {
           if( m_localPath == null )
  @@ -134,7 +135,7 @@
           cmd.addArgument( FLAG_OVERRIDE_WORKING_DIR + m_localPath );
       }
   
  -    private void getRecursiveCommand( final Commandline cmd )
  +    private void getRecursiveCommand( final ArgumentList cmd )
       {
           if( !m_recursive )
           {
  @@ -146,7 +147,7 @@
           }
       }
   
  -    private void getWritableCommand( final Commandline cmd )
  +    private void getWritableCommand( final ArgumentList cmd )
       {
           if( !m_writable )
           {
  
  
  
  1.4       +5 -4      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKOUT.java
  
  Index: MSVSSCHECKOUT.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSCHECKOUT.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MSVSSCHECKOUT.java	19 Mar 2002 02:44:37 -0000	1.3
  +++ MSVSSCHECKOUT.java	7 Apr 2002 23:10:44 -0000	1.4
  @@ -10,6 +10,7 @@
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform CheckOut commands to Microsoft Visual Source Safe.
  @@ -118,7 +119,7 @@
        * Checks the value set for the autoResponse. if it equals "Y" then we
        * return -I-Y if it equals "N" then we return -I-N otherwise we return -I
        */
  -    public void getAutoresponse( final Commandline cmd )
  +    public void getAutoresponse( final ArgumentList cmd )
       {
           if( m_autoResponse == null )
           {
  @@ -144,7 +145,7 @@
        *
        * The localpath is created if it didn't exist
        */
  -    public void getLocalpathCommand( final Commandline cmd )
  +    public void getLocalpathCommand( final ArgumentList cmd )
           throws TaskException
       {
           // make sure m_LocalDir exists, create it if it doesn't
  @@ -167,7 +168,7 @@
           cmd.addArgument( FLAG_OVERRIDE_WORKING_DIR + m_localPath );
       }
   
  -    private void getRecursiveCommand( final Commandline cmd )
  +    private void getRecursiveCommand( final ArgumentList cmd )
       {
           if( !m_recursive )
           {
  @@ -183,7 +184,7 @@
        * Simple order of priority. Returns the first specified of version, date,
        * label If none of these was specified returns ""
        */
  -    private void getVersionCommand( final Commandline cmd )
  +    private void getVersionCommand( final ArgumentList cmd )
       {
           if( null != m_version )
           {
  
  
  
  1.5       +7 -6      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSGET.java
  
  Index: MSVSSGET.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSGET.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MSVSSGET.java	21 Mar 2002 08:03:56 -0000	1.4
  +++ MSVSSGET.java	7 Apr 2002 23:10:44 -0000	1.5
  @@ -10,6 +10,7 @@
   import java.io.File;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   import org.apache.myrmidon.framework.file.Path;
   
   /**
  @@ -339,7 +340,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    public void getAutoresponse( Commandline cmd )
  +    public void getAutoresponse( ArgumentList cmd )
       {
   
           if( m_AutoResponse == null )
  @@ -369,7 +370,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    public void getLocalpathCommand( Commandline cmd )
  +    public void getLocalpathCommand( ArgumentList cmd )
           throws TaskException
       {
           if( m_LocalPath == null )
  @@ -395,7 +396,7 @@
           }
       }
   
  -    public void getQuietCommand( Commandline cmd )
  +    public void getQuietCommand( ArgumentList cmd )
       {
           if( m_Quiet )
           {
  @@ -406,7 +407,7 @@
       /**
        * @param cmd Description of Parameter
        */
  -    public void getRecursiveCommand( Commandline cmd )
  +    public void getRecursiveCommand( ArgumentList cmd )
       {
           if( !m_Recursive )
           {
  @@ -424,7 +425,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    public void getVersionCommand( Commandline cmd )
  +    public void getVersionCommand( ArgumentList cmd )
       {
   
           if( m_Version != null )
  @@ -444,7 +445,7 @@
       /**
        * @param cmd Description of Parameter
        */
  -    public void getWritableCommand( Commandline cmd )
  +    public void getWritableCommand( ArgumentList cmd )
       {
           if( !m_Writable )
           {
  
  
  
  1.3       +6 -5      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSHISTORY.java
  
  Index: MSVSSHISTORY.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSHISTORY.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSHISTORY.java	18 Mar 2002 08:53:31 -0000	1.2
  +++ MSVSSHISTORY.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -17,6 +17,7 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
   import org.apache.tools.todo.types.EnumeratedAttribute;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform HISTORY commands to Microsoft Visual Source Safe.
  @@ -277,7 +278,7 @@
        *
        * @param cmd the commandline the command is to be added to
        */
  -    private void getOutputCommand( Commandline cmd )
  +    private void getOutputCommand( ArgumentList cmd )
       {
           if( m_OutputFileName != null )
           {
  @@ -288,7 +289,7 @@
       /**
        * @param cmd Description of Parameter
        */
  -    private void getRecursiveCommand( Commandline cmd )
  +    private void getRecursiveCommand( ArgumentList cmd )
       {
           if( !m_Recursive )
           {
  @@ -305,7 +306,7 @@
        *
        * @param cmd the commandline the command is to be added to
        */
  -    private void getUserCommand( Commandline cmd )
  +    private void getUserCommand( ArgumentList cmd )
       {
           if( m_User != null )
           {
  @@ -319,7 +320,7 @@
        * @param cmd the commandline the command is to be added to
        * @exception TaskException Description of Exception
        */
  -    private void getVersionDateCommand( Commandline cmd )
  +    private void getVersionDateCommand( ArgumentList cmd )
           throws TaskException
       {
           if( m_FromDate == null && m_ToDate == null && m_NumDays == Integer.MIN_VALUE )
  @@ -378,7 +379,7 @@
        * @param cmd the commandline the command is to be added to
        * @exception TaskException Description of Exception
        */
  -    private void getVersionLabelCommand( Commandline cmd )
  +    private void getVersionLabelCommand( ArgumentList cmd )
           throws TaskException
       {
           if( m_FromLabel == null && m_ToLabel == null )
  
  
  
  1.3       +4 -3      jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSLABEL.java
  
  Index: MSVSSLABEL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/taskdefs/vss/MSVSSLABEL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MSVSSLABEL.java	18 Mar 2002 08:53:31 -0000	1.2
  +++ MSVSSLABEL.java	7 Apr 2002 23:10:44 -0000	1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.types.Commandline;
  +import org.apache.tools.todo.types.ArgumentList;
   
   /**
    * Task to perform LABEL commands to Microsoft Visual Source Safe. <p>
  @@ -242,7 +243,7 @@
        *
        * @param cmd Description of Parameter
        */
  -    public void getAutoresponse( Commandline cmd )
  +    public void getAutoresponse( ArgumentList cmd )
       {
   
           if( m_AutoResponse == null )
  @@ -290,7 +291,7 @@
        *
        * @param cmd the commandline the command is to be added to
        */
  -    public void getLabelCommand( Commandline cmd )
  +    public void getLabelCommand( ArgumentList cmd )
       {
           if( m_Label != null )
           {
  @@ -303,7 +304,7 @@
        *
        * @param cmd the commandline the command is to be added to
        */
  -    public void getVersionCommand( Commandline cmd )
  +    public void getVersionCommand( ArgumentList cmd )
       {
           if( m_Version != null )
           {
  
  
  
  1.4       +3 -109    jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/types/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/types/Commandline.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Commandline.java	7 Apr 2002 09:51:10 -0000	1.3
  +++ Commandline.java	7 Apr 2002 23:10:45 -0000	1.4
  @@ -7,12 +7,7 @@
    */
   package org.apache.tools.todo.types;
   
  -import java.io.File;
  -import java.util.ArrayList;
  -import org.apache.avalon.excalibur.util.StringUtil;
  -import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.todo.util.FileUtils;
  -import org.apache.tools.todo.types.Argument;
  +
   
   /**
    * Commandline objects help handling command lines specifying processes to
  @@ -35,121 +30,20 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    */
   public class Commandline
  +    extends ArgumentList
   {
  -    protected final ArrayList m_arguments = new ArrayList();
       private String m_executable;
   
  -    public Commandline()
  -    {
  -    }
  -
  -    public Commandline( final String[] command )
  -    {
  -        if( 0 == command.length )
  -        {
  -            throw new IllegalArgumentException( "command" );
  -        }
  -
  -        m_executable = command[ 0 ];
  -        for( int i = 1; i < command.length; i++ )
  -        {
  -            addArgument( command[ i ] );
  -        }
  -    }
  -
       /**
        * Sets the executable to run.
        */
       public void setExecutable( final String executable )
       {
  -        if( executable == null || executable.length() == 0 )
  -        {
  -            return;
  -        }
  -        m_executable = executable.replace( '/', File.separatorChar )
  -            .replace( '\\', File.separatorChar );
  -    }
  -
  -    /**
  -     * Returns all arguments defined by <code>addLine</code>, <code>addValue</code>
  -     * or the argument object.
  -     *
  -     * @return The Arguments value
  -     */
  -    public String[] getArguments()
  -    {
  -        final int size = m_arguments.size();
  -        final ArrayList result = new ArrayList( size * 2 );
  -        for( int i = 0; i < size; i++ )
  -        {
  -            final Argument arg = (Argument)m_arguments.get( i );
  -            final String[] s = arg.getParts();
  -            for( int j = 0; j < s.length; j++ )
  -            {
  -                result.add( s[ j ] );
  -            }
  -        }
  -
  -        final String[] res = new String[ result.size() ];
  -        return (String[])result.toArray( res );
  -    }
  -
  -    /**
  -     * Returns the executable and all defined arguments.
  -     */
  -    public String[] getCommandline()
  -    {
  -        final String[] args = getArguments();
  -        if( m_executable == null )
  -        {
  -            return args;
  -        }
  -        final String[] result = new String[ args.length + 1 ];
  -        result[ 0 ] = m_executable;
  -        System.arraycopy( args, 0, result, 1, args.length );
  -        return result;
  +        m_executable = executable;
       }
   
       public String getExecutable()
       {
           return m_executable;
  -    }
  -
  -    public void addArguments( final String[] args )
  -    {
  -        for( int i = 0; i < args.length; i++ )
  -        {
  -            addArgument( args[ i ] );
  -        }
  -    }
  -
  -    public void addArguments( final Commandline cmdline )
  -    {
  -        addArguments( cmdline.getArguments() );
  -    }
  -
  -    public void addArgument( final File argument )
  -    {
  -        addArgument( new Argument( argument ) );
  -    }
  -
  -    public void addArgument( final String argument )
  -    {
  -        addArgument( new Argument( argument ) );
  -    }
  -
  -    public void addArgument( final Argument argument )
  -    {
  -        m_arguments.add( argument );
  -    }
  -
  -    public void addLine( final String line )
  -        throws TaskException
  -    {
  -        final String[] parts = FileUtils.translateCommandline( line );
  -        for( int i = 0; i < parts.length; i++ )
  -        {
  -            addArgument( parts[ i ] );
  -        }
       }
   }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/todo/org/apache/tools/todo/types/ArgumentList.java
  
  Index: ArgumentList.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.tools.todo.types;
  
  import java.util.ArrayList;
  import java.io.File;
  import org.apache.myrmidon.api.TaskException;
  import org.apache.tools.todo.util.FileUtils;
  
  /**
   * A utility class to use to assemble a list of command-line arguments.
   *
   * @author thomas.haas@softwired-inc.com
   * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
   * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
   * @version $Revision: 1.1 $ $Date: 2002/04/07 23:10:45 $
   */
  public class ArgumentList
  {
      protected final ArrayList m_arguments = new ArrayList();
  
      /**
       * Returns all arguments defined by <code>addLine</code>, <code>addValue</code>
       * or the argument object.
       *
       * @return The Arguments value
       */
      public String[] getArguments()
      {
          final int size = m_arguments.size();
          final ArrayList result = new ArrayList( size * 2 );
          for( int i = 0; i < size; i++ )
          {
              final Argument arg = (Argument)m_arguments.get( i );
              final String[] s = arg.getParts();
              for( int j = 0; j < s.length; j++ )
              {
                  result.add( s[ j ] );
              }
          }
  
          final String[] res = new String[ result.size() ];
          return (String[])result.toArray( res );
      }
  
      public void addArguments( final String[] args )
      {
          for( int i = 0; i < args.length; i++ )
          {
              addArgument( args[ i ] );
          }
      }
  
      public void addArguments( final ArgumentList args )
      {
          addArguments( args.getArguments() );
      }
  
      public void addArgument( final File argument )
      {
          addArgument( new Argument( argument ) );
      }
  
      public void addArgument( final String argument )
      {
          addArgument( new Argument( argument ) );
      }
  
      public void addArgument( final Argument argument )
      {
          m_arguments.add( argument );
      }
  
      public void addLine( final String line )
          throws TaskException
      {
          final String[] parts = FileUtils.translateCommandline( line );
          addArguments( parts );
      }
  }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>