Disable DTD warning for Ant scripts in Eclipse?

Brian Deacon picture Brian Deacon · Dec 12, 2008 · Viewed 28.3k times · Source

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.

Answer

David Pierre picture David Pierre · Jan 27, 2009

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

<!DOCTYPE project>

for ant files