简体   繁体   中英

Why does Eclipse sometimes rebuild the whole workspace?

I use Eclipse Luna 4.4.0. After I start Eclipse and haven't changed anything it sometimes rebuilds the whole workspace which is sort of annoying. It is not an incremental build, but a full rebuild (which includes cleaning output folders of all projects).

I use autobuild for projects (all java, using svn and git), but autobuild should not lead to this behaviour.

What triggers the complete workspace rebuild? The error log does not contain any hint.

Generally, the builder gets triggered as follows (from the Eclipse wiki ).

JDT uses the autobuild facilities provided by the platform. If a resource changes, the platform checks the project description file (see .project in your projects). When the file contains a reference to the Java builder, the builder gets notified of the change and will then compile the Java source file and its dependents.

I don't know what exactly triggers the build on startup (I've always had the feeling that it somewhow "made sense" for Eclipse to do so when starting). Could it be that some of your resources are touch ed (if you're on a Linux system) during startup?

It also says there on the wiki how to switch off autobuilding (which I guess you're already fully aware of):

autobuild can be turned off through Window > Preferences > General > Workspace > Build automatically .

There are also related bugs on Eclipse's bugzilla, eg https://bugs.eclipse.org/bugs/show_bug.cgi?id=73969 , https://bugs.eclipse.org/bugs/show_bug.cgi?id=172444 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM