ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Fri, 14 Sep 2001 06:01:05 GMT
bodewig     01/09/13 23:01:05

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_14_BRANCH
                        Ant.java
  Log:
  use FileUtils' resolution method for the dir/antfile logic
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.2  +3 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.25.2.1
  retrieving revision 1.25.2.2
  diff -u -r1.25.2.1 -r1.25.2.2
  --- Ant.java	2001/09/05 07:34:15	1.25.2.1
  +++ Ant.java	2001/09/14 06:01:05	1.25.2.2
  @@ -55,6 +55,7 @@
   package org.apache.tools.ant.taskdefs;
   
   import org.apache.tools.ant.*;
  +import org.apache.tools.ant.util.FileUtils;
   import java.io.*;
   import java.util.*;
   
  @@ -243,14 +244,8 @@
                   antFile = "build.xml";
               }
   
  -            File file = new File(antFile);
  -            if (!file.isAbsolute()) {
  -                antFile = (new File(dir, antFile)).getAbsolutePath();
  -                file = (new File(antFile)) ;
  -                if( ! file.isFile() ) {
  -                  throw new BuildException("Build file " + file + " not found.");
  -                }
  -            }
  +            File file = FileUtils.newFileUtils().resolveFile(dir, antFile);
  +            antFile = file.getAbsolutePath();
   
               newProject.setUserProperty( "ant.file" , antFile );
               ProjectHelper.configureProject(newProject, new File(antFile));
  
  
  

Mime
View raw message