- This topic has 7 replies, 3 voices, and was last updated 17 years, 11 months ago by
luis.amaral.
-
AuthorPosts
-
dnebingerMemberThis is driving me batty…
I’ve got my ant.build xml file, starts out just like this:
<?xml version="1.0"?> <!-- build.xml for tbbgl-bo-rate. $Id: build.xml,v 1.3 2007/04/30 16:26:08 dnebinger Exp $ --> <project basedir="." default="info" name="tbbgl-bo-codes" > <description> This is the build.xml file for tbbgl-bo-codes, the generic business object project for TBBGL. $Id: build.xml,v 1.3 2007/04/30 16:26:08 dnebinger Exp $ </description>
It’s a pretty basic file, ant likes it and is happy (builds successfully).
But if I open the file in MyEclipse (currently 5.5 M2, but same happened in 5.1), I get an error all of a sudden on the very first char of the file:
Severity and Description Path Resource Location Creation Time Id Content is not allowed in prolog. tbbgl-bo-codes build.xml line 1 1177950529562 83591
Does anyone know what’s going on here? I can ignore it except for the project is now flagged with an error indicator even though it is fine. I don’t want to lose sight of legitimate errors because of this…
Thanks in advance!
Riyad KallaMemberAhh, the XML validator is running on it and in a normal XML file I believe you cannot have that header comment there, it probably wants it somewhere else.
If the file is fine just right click, go down to MyEclipse and do Exclude from Validation.
dnebingerMemberI tried moving the comment, deleting the comment, stripping all comments, removing the <?xml piece… All to no avail.
The only solution I could come up with was to go to prefs, under Ant and find the checkbox to disable all errors. Not great, but at least my projects don’t look like they are broken…
Riyad KallaMemberDid you try excluding the file from validation as I mentioned?
dnebingerMemberYes, the validation was already excluded (I had disabled the build checks for xml syntax checking and everything). Even after disabling the checks, excluding from validation, and doing a clean build the file would still be marked as an error.
The only thing that worked was checking “Ignore all buildfile problems” under prefs/ant/editor on the problems tab.
Riyad KallaMemberHmm, then it looks like the Ant editors itself was reporting the error, not the XML Validator like I originally thought.
That is strange that you didn’t notice it before and it just popped up, but was coming from the Ant editor… can you PM me a copy of the original Ant script to play with? I’m curious why it was acting like that.
dnebingerMemberI’ll pm the copy, but if that checkbox is set it happens to me with all ant build scripts that I have…
luis.amaralMemberI have solved same problem here using the same encoding for all ant files. Some files has been with “UTF-8” others with “ISO-8859-1” and some one more without header definition.
It’s solve my problem here.
-
AuthorPosts