bodewig 00/10/16 02:09:13
Modified: src/main/org/apache/tools/ant/taskdefs Ant.java
Log:
Better error reporting when <ant> cannot find the build file, grammar
correction.
Submitted by: Diane Holt <[EMAIL PROTECTED]>
Revision Changes Path
1.19 +5 -1
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.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Ant.java 2000/09/20 11:31:13 1.18
+++ Ant.java 2000/10/16 09:09:10 1.19
@@ -189,6 +189,10 @@
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,7 +207,7 @@
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");
+ throw new BuildException("ant task calling its own parent
target");
}
p1.executeTarget(target);