Community
Participate
Working Groups
build 20020520 If an Ant script has a comment before the project declaration, the script cannot be parsed.
The following basic script works ok in build 2002-05-21b. <?xml version="1.0" encoding="UTF-8"?> <!-- foo --> <project name="foo" default="init"> <target name="init"> <echo message="bar"/> </target> </project> Note that if you remove the <target> element and its children then it fails with the same error message indicated above. (presumably expected behaviour)
Note that this works OK when using the External Tools history drop down but NOT ok when using the "Run Ant" from the context menu.
*** Bug 16755 has been marked as a duplicate of this bug. ***
There was another example posted on the newsgroup that does not work. We should test this one as well. Attaching file.
Created attachment 939 [details] Example that do not have comments but fails
Released Rodrigo's patch to use Xerces. Need to verify that it fixes the above case.
*** Bug 17855 has been marked as a duplicate of this bug. ***
Attachment 939 [details] refers to files that aren't included.
The original problem (comment at begining of ant script file) has been fixed. In build > 2002-05-21 Rodrigo, can you open another PR for the attachment you added. It does not seem related to the problem this PR represents. Also, if you could mention in the PR what the problem is with the attached ant script (could you also paste the ant script directly in the message, we are having problems looking at the attachment). If it is no longer a problem, then no new PR is needed.
Instead of clicking on the attachment, just use (in IE) the option "Save target as...) so you can check it with any text editor. The problem was the same as with comments (Could not parse Ant script).
I'm still getting this problem with the 0528 build. If I remove the comment from the build.xml, it works fine.
Please verify this again. Scott, can you attach the build.xml file that is failing for you with the 05/28 build?
I'm able to replicate with this simple script: <!-- --> <project name="Test" default="make"> <target name="make"> </target> </project> Using the Run Ant... action results in a "Could not parse Ant file." error dialog. Removing the comment fixes it.
Scott - are you using the integration build 05/28 or the nightly build 05/28. If the integration build, then yes this problem is still there because we've not submitted anything since freeze 1 build. The nightly build is off the head stream so it would have the latest and greatest (and dangerous?) code. We did actually submit something for the 05/29 integration build. Using that build, we could not reproduce the problem. Please reopen if you can.
Just tried I0529, works great.