I had the same problem with antlib. I have now copied the logic from antlib to import, so build exceptions during import parsing should now report the imported and importing files in an emacs friendly form.
BUILD FAILED /home/preilly/cvs/ant/src/etc/testcases/taskdefs/import/import_bad_import.xml:2: Error executing import file /home/preilly/cvs/ant/src/etc/testcases/taskdefs/import/bad.xml:2: The content of elements must consist of well-formed character data or markup. Where import_bad_import.xml is: <project> <import file="bad.xml"/> </project> and bad.xml is: <project> <<< </project> Peter On Monday 03 November 2003 16:06, Dominique Devienne wrote: > > From: Stefan Bodewig [mailto:[EMAIL PROTECTED] > > > > On Tue, 21 Oct 2003, Dominique Devienne <[EMAIL PROTECTED]> wrote: > > > The error message doesn't specify which build file failed to parse > > > correctly, > > > > I think it did, as the message must have come from an IOException, so > > the error actually is in recurse.xml not in the file it is trying to > > import. At least I think so. > > No, really Stefan! recurse.xml was doing a <subant> on rescue.xml, and it's > rescue.xml which failed to parse (like I said, because rescue.xml was doing > an entity include of a URI using a custom URL protocol not enabled during > this run. FTR, I was replacing entity include using that protocol with > <import>). > > So Filters.xml was importing recurse.xml > recurse.xml was <subant>'ing rescue.xml > rescue.xml failed to parse because of the entity include (see above) > > And *still* the error messages never mentioned that *rescue.xml* failed to > parse, and simply reported on IOException in recurse.xml, never mentioning > as well that recurse.xml was itself imported by Filters.xml. > > I don't know what layer is at fault here, but the proper error should have > reported that rescue.xml failed to parse, from <subant> at line XYZ in > recurse.xml, imported from Filters.xml at line ABC. > > Without this kind of clear and detailed error report, <import> and > <[sub]ant> will not mix happily! > > > > and furthermore, the error is reported to occur in recurse.xml, > > > never mentioning that recurse.xml was in fact imported from > > > build.xml or at which line. > > > > This is a bit harder to track down and put into the error message, I'm > > afraid. Currently we don't keep track of that at all AFAICS, we only > > record that a file has been imported, but not from where. > > As I said above, I think it's absolutely necessary Ant does this! --DD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]