score:129

Accepted answer

the simplest is to supply a minimal dtd to shut it up.

<!doctype project>

for ant files

score:-1

right click on the warning to delete it, then clean

score:1

in fact, as damoco says, this seems to be a bug in eclipse. if i delete (copy elsewhere) the file from windows, refresh eclipse, and then restore the file, and refresh again, the warning goes away.

i'm using eclipse galileo build 20090621-0832.

score:2

i see an option to disable this in newer versions of eclipse. it is under: window, preferences, xml, xml files, validation then change the drop-down "indicate when no grammar is specified:" from "warn" to "ignore"..

score:4

you can delete it, and restore it to avoid the warning. it is a bug, obviously.

score:6

even though this thread is a little older, somebody might find this interesting:

http://www.cs.hs-rm.de/~knauf/komponentenarchitekturen2008/jsfunit/index.html

go to project properties -> validation and follow the screen shots on that page. should be easy even if you don't speak german. ;-)

this solution worked perfectly for me. cheers!

score:27

being with brian on the "anal-retentive yearning for a warning-free problems tab", i finally decided to get serious about solving this. thanks to martin's leading, it looks like a done deal.

however, instead of project -> properties, it's solvable globally via windows -> preferences.

  1. select the validation category in the left pane.
  2. find the validator named "xml validator" (in the right pane) and click its ellipses (...) button.
  3. in the following dialogue, select the "exclude group" and click "add rule...".
  4. on the first page of the new filter rule wizard, select the content type option and click next>.
  5. finally, on the content type drop down, select "ant buildfile".
  6. click finish and a couple of oks and that should take care of existing and future ant build file validation warnings.

Related Query

More Query from same tag