Bug 23638 - The line numbers for Ant build scripts that include other xml files are misleading
Summary: The line numbers for Ant build scripts that include other xml files are misle...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2002-09-17 09:06 EDT by Markus Kohler CLA
Modified: 2003-01-06 03:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kohler CLA 2002-09-17 09:06:48 EDT
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.
Comment 1 Darin Wright CLA 2002-11-15 13:37:48 EST
Needs investigation
Comment 2 Darin Wright CLA 2002-12-04 10:35:12 EST
This bug conflicts with bug 23392. Bug 23392 states that entity expands do not 
work.
Comment 3 Darin Swanson CLA 2003-01-01 15:01:40 EST
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.
Comment 4 Markus Kohler CLA 2003-01-06 03:48:20 EST
I guess it's an Ant 1.4.1 problem.