If the build file specified in the <ant> task didn't exist, it would throw
a FileNotFound exception, instead of doing a graceful exit. This patch
checks for the file's existence and throws a BuildException. (Standard
qualifiers wrt coding).
Also fixed a minor grammar bug ("it's" -> "its").
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/*** Ant.java.orig Fri Oct 13 21:38:40 2000
--- Ant.java Fri Oct 13 22:02:00 2000
***************
*** 189,194 ****
--- 189,198 ----
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.");
+ }
}
p1.setUserProperty( "ant.file" , antFile );
***************
*** 203,209 ****
p1.getProperty("ant.file").equals(project.getProperty("ant.file")) &&
target.equals(this.getOwningTarget().getName())) {
! throw new BuildException("ant task calling it's own parent
target");
}
p1.executeTarget(target);
--- 207,213 ----
p1.getProperty("ant.file").equals(project.getProperty("ant.file")) &&
target.equals(this.getOwningTarget().getName())) {
! throw new BuildException("ant task calling its own parent
target");
}
p1.executeTarget(target);