ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers WinNTCommandLauncher.java ScriptCommandLauncher.java MacCommandLauncher.java ExecUtil.java
Date Sat, 05 Jan 2002 03:15:04 GMT
donaldp     02/01/04 19:15:04

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers
                        WinNTCommandLauncher.java
                        ScriptCommandLauncher.java MacCommandLauncher.java
                        ExecUtil.java
  Log:
  Mad all the command launchers use getEnvironmentSpec and thus made ExecUtil.toNativeEnvironment
private as it is not used outside class.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/WinNTCommandLauncher.java
  
  Index: WinNTCommandLauncher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/WinNTCommandLauncher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WinNTCommandLauncher.java	23 Dec 2001 02:54:35 -0000	1.3
  +++ WinNTCommandLauncher.java	5 Jan 2002 03:15:04 -0000	1.4
  @@ -18,7 +18,7 @@
    *
    * @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.3 $ $Date: 2001/12/23 02:54:35 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/05 03:15:04 $
    */
   public class WinNTCommandLauncher
       implements CommandLauncher
  @@ -41,7 +41,7 @@
           prefix[ 5 ] = "&&";
   
           final ExecMetaData newMetaData = ExecUtil.prepend( metaData, prefix );
  -        final String[] env = ExecUtil.toNativeEnvironment( metaData.getEnvironment() );
  +        final String[] env = ExecUtil.getEnvironmentSpec( metaData );
           return Runtime.getRuntime().exec( newMetaData.getCommand(), env );
       }
   }
  
  
  
  1.5       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ScriptCommandLauncher.java
  
  Index: ScriptCommandLauncher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ScriptCommandLauncher.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ScriptCommandLauncher.java	23 Dec 2001 02:54:35 -0000	1.4
  +++ ScriptCommandLauncher.java	5 Jan 2002 03:15:04 -0000	1.5
  @@ -20,7 +20,7 @@
    *
    * @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.4 $ $Date: 2001/12/23 02:54:35 $
  + * @version $Revision: 1.5 $ $Date: 2002/01/05 03:15:04 $
    */
   public class ScriptCommandLauncher
       implements CommandLauncher
  @@ -70,7 +70,7 @@
           prefix[ m_script.length ] = metaData.getWorkingDirectory().getCanonicalPath();
   
           final ExecMetaData newMetaData = ExecUtil.prepend( metaData, prefix );
  -        final String[] env = ExecUtil.toNativeEnvironment( metaData.getEnvironment() );
  +        final String[] env = ExecUtil.getEnvironmentSpec( metaData );
           return Runtime.getRuntime().exec( newMetaData.getCommand(), env );
       }
   }
  
  
  
  1.4       +3 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/MacCommandLauncher.java
  
  Index: MacCommandLauncher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/MacCommandLauncher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MacCommandLauncher.java	23 Dec 2001 02:54:35 -0000	1.3
  +++ MacCommandLauncher.java	5 Jan 2002 03:15:04 -0000	1.4
  @@ -22,7 +22,7 @@
    *
    * @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.3 $ $Date: 2001/12/23 02:54:35 $
  + * @version $Revision: 1.4 $ $Date: 2002/01/05 03:15:04 $
    */
   public class MacCommandLauncher
       implements CommandLauncher
  @@ -36,7 +36,7 @@
           final File directory = metaData.getWorkingDirectory().getCanonicalFile();
           if( ExecUtil.isCwd( directory ) )
           {
  -            final String[] env = ExecUtil.toNativeEnvironment( metaData.getEnvironment()
);
  +            final String[] env = ExecUtil.getEnvironmentSpec( metaData );
               return Runtime.getRuntime().exec( metaData.getCommand(), env );
           }
   
  @@ -46,7 +46,7 @@
           try
           {
               System.setProperty( "user.dir", directory.toString() );
  -            final String[] env = ExecUtil.toNativeEnvironment( metaData.getEnvironment()
);
  +            final String[] env = ExecUtil.getEnvironmentSpec( metaData );
               return Runtime.getRuntime().exec( metaData.getCommand(), env );
           }
           finally
  
  
  
  1.7       +2 -2      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ExecUtil.java
  
  Index: ExecUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ExecUtil.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExecUtil.java	5 Jan 2002 03:13:03 -0000	1.6
  +++ ExecUtil.java	5 Jan 2002 03:15:04 -0000	1.7
  @@ -20,7 +20,7 @@
    * A set of utility functions useful when writing CommandLaunchers.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/01/05 03:13:03 $
  + * @version $Revision: 1.7 $ $Date: 2002/01/05 03:15:04 $
    */
   class ExecUtil
   {
  @@ -79,7 +79,7 @@
           return file.getCanonicalFile().equals( getCwd() );
       }
   
  -    protected static String[] toNativeEnvironment( final Properties environment )
  +    private static String[] toNativeEnvironment( final Properties environment )
           throws ExecException
       {
           if( null == environment )
  
  
  

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


Mime
View raw message