Hi there.
Currently, whenever you include an XML snippet in a project file like
the FAQ shows here:
http://jakarta.apache.org/ant/faq.html#xml-entity-include
It works fine, but if there's a parser error in the file I'm including,
Ant incorrectly tells me that the error is in the file I included it in
(instead of in the included file). I believe this is a bug.
The attached patch of ProjectHelperImpl.java (CVS head's version) seems
to fix this problem for parse errors. I've also attached a patch for
Ant 1.4.
Can/should this be fixed by Ant 1.5 (final)?
There are also other spots where this same bug probably occurs after
Project parse time, which I'm going to investigate next..
Cheers.
--
Jason Brittain
<jasonb (~at~) collab (~dot~) net>
CollabNet http://www.collab.net
--- src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java.orig Tue Jul
2 17:17:04 2002
+++ src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java Tue Jul 2
17:17:14 2002
@@ -155,7 +155,7 @@
parser.parse(inputSource);
} catch (SAXParseException exc) {
Location location =
- new Location(buildFile.toString(), exc.getLineNumber(),
+ new Location(exc.getSystemId(), exc.getLineNumber(),
exc.getColumnNumber());
Throwable t = exc.getException();
--- src/main/org/apache/tools/ant/ProjectHelper.java.orig Tue Jul 2
15:16:40 2002
+++ src/main/org/apache/tools/ant/ProjectHelper.java Tue Jul 2 15:18:45 2002
@@ -121,7 +121,7 @@
}
catch(SAXParseException exc) {
Location location =
- new Location(buildFile.toString(), exc.getLineNumber(),
exc.getColumnNumber());
+ new Location(exc.getSystemId(), exc.getLineNumber(),
exc.getColumnNumber());
Throwable t = exc.getException();
if (t instanceof BuildException) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>