ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs ExecTask.java
Date Mon, 27 Jan 2003 15:10:40 GMT
conor       2003/01/27 07:10:37

  Modified:    src/main/org/apache/tools/ant/taskdefs ExecTask.java
  Log:
  Make default not to resolve executable
  
  Revision  Changes    Path
  1.44      +14 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  
  Index: ExecTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -w -u -r1.43 -r1.44
  --- ExecTask.java	27 Jan 2003 14:51:49 -0000	1.43
  +++ ExecTask.java	27 Jan 2003 15:10:36 -0000	1.44
  @@ -99,6 +99,7 @@
       private boolean failIfExecFails = true;
       private boolean append = false;
       private String executable;
  +    private boolean resolveExecutable = false;
   
       /**
        * Controls whether the VM (1.3 and above) is used to execute the
  @@ -187,6 +188,13 @@
       }
   
       /**
  +     * Attempt to resolve the executable to a file
  +     */
  +    public void setResolveExecutable(boolean resolveExecutable) {
  +        this.resolveExecutable = resolveExecutable;
  +    }
  +    
  +    /**
        * Add an environment variable to the launched process.
        */
       public void addEnv(Environment.Variable var) {
  @@ -240,6 +248,8 @@
           this.append = append;
       }
   
  +    
  +    
       /**
        * Attempt to figure out where the executable is so that we can feed 
        * the full path - first try basedir, then the exec dir and then
  @@ -248,6 +258,10 @@
        * @return the executable as a full path if it can be determined.
        */
       private String resolveExecutable() {
  +        if (!resolveExecutable) {
  +            return executable;
  +        }
  +        
           // try to find the executable
           File executableFile = getProject().resolveFile(executable);
           if (executableFile.exists()) {
  
  
  

--
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