ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Exec.java
Date Sun, 06 Feb 2000 01:17:23 GMT
rubys       00/02/05 17:17:23

  Modified:    src/main/org/apache/tools/ant/taskdefs Exec.java
  Removed:     src/bin  antRun.bat
  Log:
  Restore support for > 9 parameters on exec calls on Windows
  
  Revision  Changes    Path
  1.7       +9 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java
  
  Index: Exec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Exec.java	2000/01/30 16:20:24	1.6
  +++ Exec.java	2000/02/06 01:17:23	1.7
  @@ -87,12 +87,16 @@
               return;
           }
   
  -        String ant = project.getProperty("ant.home");
  -        if (ant == null) throw new BuildException("Property 'ant.home' not found");
  +        if (myos.toLowerCase().indexOf("windows") >= 0) {
  +            if (!dir.equals("."))
  +                command = "cmd /c cd " + project.resolveFile(dir) + " && " + command;
  +        } else {
  +            String ant = project.getProperty("ant.home");
  +            if (ant == null) throw new BuildException("Property 'ant.home' not found");
  +            String antRun = project.resolveFile(ant + "/bin/antRun").toString();
   
  -        String antRun = project.resolveFile(ant + "/bin/antRun").toString();
  -        if (myos.toLowerCase().indexOf("windows") >= 0) antRun = antRun + ".bat";
  -        command = antRun + " " + project.resolveFile(dir) + " " + command;
  +            command = antRun + " " + project.resolveFile(dir) + " " + command;
  +        }
   
           try {
               // show the command
  
  
  

Mime
View raw message