Looks like it was there in Ant 1.5 final (Java.run()), but now it's missing
Here's a patch to fix this.
Kev
I have it on reliable authority (chapter 5 of java development with
ant), that Ant1.5 would fail with a location error when you tried to
run <java> without a class on the classpath. But now I see a stack
trace and not a location:
[echo] running the diary program
[java] Could not find d1.core.DiaryMain. Make sure you have it in
your classpath
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:178)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:731)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:190)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:100)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.jav
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Index: Java.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v
retrieving revision 1.103
diff -u -r1.103 Java.java
--- Java.java 18 Mar 2005 17:32:14 -0000 1.103
+++ Java.java 12 Apr 2005 10:20:39 -0000
@@ -734,7 +734,7 @@
throw new BuildException("Timeout: killed the sub-process");
}
} catch (IOException e) {
- throw new BuildException(e);
+ throw new BuildException(e, getLocation());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]