How to ignore XML warnings from a specific folder in Eclipse?

此生再无相见时 提交于 2019-12-10 14:48:57

问题


I'm building a java project with Eclipse and the plugin m2e (it adds Maven support in Eclipse).

There some XML Surefire reports ine the target directory. They generate annoying warnings because they have neither a DTD nor an XML Schema.

How can you tell Eclipse to ignore **/target folders ?


回答1:


See the following image:
Open the preferences Window > Preferences




回答2:


The whole target/ folder can be excluded from Eclipse's "management" by marking it as derived. Right-click on the target/ folder and go to properties:

This disables validation, excludes this directory from search, "Open Resource" lookup, etc. Unfortunately, you'll have to remember to toggle it after every project Build since it switches back to "off" by default.




回答3:


  1. open the Preferences (Windoww > Preferences)
  2. go to xml validation XML > XML Files > Validation
  3. set "No grammar specified" to Ignore

Edit: I see you want it for a specific folder... but I'm afraid this only works on workspace or at least project level



来源:https://stackoverflow.com/questions/17208621/how-to-ignore-xml-warnings-from-a-specific-folder-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!