Friday, May 18, 2007

Eclipse's Ant Editor and Maven


We have a number of Maven XML files in our project; if you accidentally open one of these in the Ant editor, it attempts to verify the contents, and will often fail. If it does so, it marks the file as having errors and refuses to believe otherwise unless you correct what it perceives to be problems, even through IDE restarts.

I've mostly corrected this by using WTP's XML Editor, but I still accidentally open one now and again using the Ant editor. When this happens, I curse, fix the "problems", close the editor, open it back up in the XML Editor and "unfix the problems".

This happens often enough that, today, when it happened again, I did another Google search for alternate solutions. Happily, this time I found one. You can specify a list of files that you don't want the Ant editor to check for problems in Preferences > Ant > Editor > Problems. Beautiful. One less thing to complain about. Thanks, Joerg Schaible!

No comments: