Good. I'm sick of this problem. It should be easy to fix, I'm sure of it! I hope SO helps me get rid of this once and for all!
Question
How to make Eclipse stop trying to process / compile all files under a specific project directory? the goal is that no errors / warnings exist in presenting problems if they relate to something in this folder or to subfolders.
Background
We are running Eclipse 3.6, and the m2eclipse v0.10.2.20100623 plugin controls our auto-object. For reasons beyond my control, we have the entire BlazeDS distribution in our SVN project directory under src/main/resources/blazeds . In fact, this directory contains the tomcat vanilla distribution that launches blazeds, to which all our configuration and project files are added when deployed to our server via SCP.
So, when we start the deployment, this version of tomcat is copied to the server, and our project is placed inside. Tomcat and our RIA application work, and everything is in order.
The problem is that Eclipse is trying to compile everything under src/main/resources/blazeds when AutoBuild starts, and this generates about 300 errors / warnings in our view of the problem. Therefore, when a real error occurs, it is lost in the midst of noise.
Errors are related to the code in /blazeds/tomcat/webapps/samples/testdrive-datapush , as well as traderdesktop testdrive-httpservice , traderdesktop web application traderdesktop . They have dependent source code that does not apply to classes and banks that are not included in libraries.
Unsuccessful attempts to solve
I am trying to push the correct solution: completely remove the samples, as well as get rid of version control. This is not happening anytime soon.
I followed the Answer here here , but this is only a very temporary solution. I tried adding exceptions everywhere I can think of, and the other members of my team did the same. I removed src/main/resources as the source directory (in Settings> Java Build Path> Source Tab). I have added exceptions for blazeds to the resource directory. I tried every permutation blazeds and ** as in *blazeds* , **/blazeds/** etc.
I even tried, including the libraries and source files that the compiler complains about, but I could not figure it out without overly changing the project configuration.
Summary
It should be easy. What is the usual way to exclude a folder that creates warnings / errors in an eclipse project?
Update # 1:
The gedim solution below is decent, but it 1) does not clear red X from the project
2) - this is a change that all members of our team must perform manually (i.e. not in the project properties file, thereby it is not checked for subversion)
I hope there is a way to solve the main problem by telling Eclipse that this directory does not contain compilation / validation items. Such a change is likely to appear in one of the project settings files.
Update # 2:The figure below shows the red X that I am trying to clear, and that Build Path > Exclude
not an option...
