Exclude directories & subdirectories from validation in Eclipse

How do I exclude a folder AND its sub-directories from validation in eclipse? I know that you can right click on a folder in Package Explorer and select Exclude Validation, but if you have sub-directories under it, you'd have to this for each and it isn't ideal for generated directories or ones with many sub-folders.

Any plug-ins that might be able to do this?


Solution 1:

I usually exclude validation in this way, I believe it will be recursive.

  • Right-click on your project and select Properties.
  • Choose Validation from the left-nav menu.
  • If it is not already selected choose "Enable project specific settings".
  • Find the validator that is relevant for what you want to exclude and click the "..." in the Settings column.
  • Highlight the Exclude Group and click Add Rule. (If you don't have any existing exclusions you may have to add an Exclude Group.)
  • Select Folder or file name as the Filter Type.
  • Click Next.
  • Select Browse Folder and find the folder you want to exclude.

Solution 2:

For those PHP developers who coding in Eclipse Mars.

  1. Right click on folder.
  2. choose "Use As Library Folder"

For example in laravel framwork, you can exclude /vendor, /storage and /node_modules folders from eclipse validation.