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:04:21 GMT
bodewig     01/09/13 23:04:21

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  use FileUtils' resolution method for the dir/antfile logic
  
  committed in this branch to see whether it has broken something in
  next GUMP run.
  
  Revision  Changes    Path
  1.27      +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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Ant.java	2001/09/13 04:38:58	1.26
  +++ Ant.java	2001/09/14 06:04:21	1.27
  @@ -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.*;
   
  @@ -228,14 +229,8 @@
               if (antFile == null) 
                   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();
   
               p1.setUserProperty( "ant.file" , antFile );
               ProjectHelper.configureProject(p1, new File(antFile));
  
  
  

Mime
View raw message