Community
Participate
Working Groups
Our build.xml files typically include at least one other file using the XML include mechnism : ?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE project [ <!ENTITY common SYSTEM "file:../Build/Ant/common.xml"> ]> <project name="SomeProject" default="main" basedir="."> &common; The problem is that the line numbers for errors (when running the script) in these files are incorrect (or at least misleading). It seems to me that the lines of the included file are also counted. I get line numbers which are greater than the number of lines in my build.xml file.
Needs investigation
This bug conflicts with bug 23392. Bug 23392 states that entity expands do not work.
I cannot reproduce the problem. Note that this is using 2.1 M4. ---build.xml---- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE project [ <!ENTITY common SYSTEM "file:common.xml"> ]> <project name="SomeProject" default="main2" basedir="."> &common; <target name="main2" depends="main"> <echo message= "Main2"> </target> </project> ---common.xml--- <target name="main"> <!-- do stuff --> <echo message= "Main"/> <echo message= "Main2"/> <echo message= "Main3"/> <echo message= "Main4"/> <echo message= "Main5"/> </target> Error message I recieve: BUILD FAILED: file:c:/1115/ApacheCon/scripts/23638.xml:12: Expected "</echo>" to terminate element starting on line 11.
I guess it's an Ant 1.4.1 problem.