facebook

[Closed] Ant errors shown for prologe comment

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #269551 Reply

    dnebinger
    Member

    This 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!

    #269559 Reply

    Riyad Kalla
    Member

    Ahh, 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.

    #269585 Reply

    dnebinger
    Member

    I 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…

    #269590 Reply

    Riyad Kalla
    Member

    Did you try excluding the file from validation as I mentioned?

    #269591 Reply

    dnebinger
    Member

    Yes, 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.

    #269592 Reply

    Riyad Kalla
    Member

    Hmm, 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.

    #269593 Reply

    dnebinger
    Member

    I’ll pm the copy, but if that checkbox is set it happens to me with all ant build scripts that I have…

    #270633 Reply

    luis.amaral
    Member

    I 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.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: [Closed] Ant errors shown for prologe comment

You must be logged in to post in the forum log in