Browse Source

use FileUtils' resolution method for the dir/antfile logic

committed in this branch to see whether it has broken something in
next GUMP run.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269708 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
bab6532e41
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      src/main/org/apache/tools/ant/taskdefs/Ant.java

+ 3
- 8
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -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 @@ public class Ant extends Task {
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));


Loading…
Cancel
Save