Eclipse automatically refresh resources and exclud

2020-06-25 18:47发布

问题:

Eclipse Helios: 40+ project working set, using maven (mvn-eclipse plugin) to generate eclipse project files.

'Resource is out of sync with the file system: ...' Appears after doing, among other things, a text search.

After a bit of googling found Prefs > Workspace > Refresh Automatically which is widely reported to be malfunctional, and has the same symptom for me. The source files are source controlled, so therefore have lock attributes on them, was curious if this may come into play with this.

Second part is regarding my build directory; eclipse knows proj_root/target is the build directory, but I would like to exclude resource sync'ing in that folder.

I basically never want to see that dialog, and don't want to have to take action to remedy it (ie manually refreshing).

回答1:

I had the same problem with m2eclipse. Marking target folder as Derived resource worked for me (right-click -> Properties -> Resource -> Derived).