Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 161377 - "Content is not allowed in prolog" error when useing import task in build.xml
Summary: "Content is not allowed in prolog" error when useing import task in build.xml
Status: RESOLVED DUPLICATE of bug 174759
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 04:52 EDT by Anthony Chen CLA
Modified: 2007-02-27 10:07 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 Anthony Chen CLA 2006-10-18 04:52:47 EDT
I have a ant build.xml with import task.It looks like as below:

<?xml version="1.0" encoding="UTF-8"?>

<project name="helloproject" basedir="." >

    <property file="build.properties"/>
    <import file="imported.xml"/>
 
    <target name="hello" description="hello">
        <echo>hello</echo>
    </target>

</project>

the same build.xml works fine in eclipse 3.2,but shows "Content is not allowed in prolog." error at line 1 in eclipse 3.2.1.

After I replace the "org.eclipse.ant.ui_3.2.1.r321_v20060828.jar" in eclipse 3.2.1 with "org.eclipse.ant.ui_3.2.0.v20060531.jar" from eclipse 3.2,that error disappeared.
Comment 1 Darin Swanson CLA 2006-10-19 16:43:56 EDT
Thank you for the bug report.

Can you provide the imported.xml file?
Are you using Eclipse's Ant or pointing to an external Ant install?
Comment 2 Anthony Chen CLA 2006-10-31 05:18:08 EST
(In reply to comment #1)
> Thank you for the bug report.
> 
> Can you provide the imported.xml file?
> Are you using Eclipse's Ant or pointing to an external Ant install?
> 

The imported.xml just export my project from CVS like:

<?xml version="1.0" encoding="UTF-8"?>
<project name="cvs" basedir="." default="">
	<property file="build.properties" />
<target name="exportFromCVS">
	<cvs cvsroot="${cvs.directory}">
		<commandline>
			<argument value="export" />
			<argument value="-r" />
			<argument value="HEAD" />
			<argument value="-d" />
			<argument value="${project.export.dir}" />
		        <argument value="myproject" />
	        </commandline>
	</cvs>
</target>
</project>

And I found that if my imported.xml encoding is UTf-8 with BOM&#65292;the error appears in build.xml.If my imported.xml encoding is UTf-8 without BOM,nothing happend.
Comment 3 Darin Swanson CLA 2006-10-31 10:12:03 EST
Thanks Anthony.

Is there still a difference between 3.2 and 3.2.1?

Possibly at duplicate of bug 67048.
Comment 4 Darin Swanson CLA 2007-02-27 10:07:20 EST
The difference between Eclipse 3.2 and Eclipse 3.2.1 is our handling of the import tasks and we introduced a bug...fixed via 174759



*** This bug has been marked as a duplicate of bug 174759 ***