Disable DTD warning for Ant scripts in Eclipse?

Viewed 28539

I'm using Eclipse Ganymede. Everything works fine, but I have an anal-retentive yearning for a warning-free Problems tab. Right now it (correctly) complains about my Ant scripts: "No grammar constraints (DTD or XML schema) detected for the document." Is there any way to turn that off for just those files? Ideally I'd like it to still warn me if my other schema-constrained files were missing the schema declarations.

7 Answers

The simplest is to supply a minimal DTD to shut it up.

<!DOCTYPE project>

for ant files

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

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.

right click on the warning to delete it, then clean

Related