eclipse builds all projects even on issuing build for single project

后端 未结 3 1785
一生所求
一生所求 2021-01-21 00:53

There seems to be some issue with Eclipse VERSION 3.7

When I compile some single project ( though ant or though buildProject) , Eclipse starts building all projects in

相关标签:
3条回答
  • 2021-01-21 01:07

    Three options I can think of:

    1. Disable automatic building (Preferences->General->Workspace).
    2. Change the build order to compile the project you need first (Preferences->General->Workspace->Build Order).
    3. Close any projects you don't want built.

    None of these is ideal, but they may be an improvement.

    0 讨论(0)
  • 2021-01-21 01:11

    I have checked the options you have in the current Eclipse release, Indigo.

    • Use automatic building: See the Menu Project > Build Automatically. If that is on, Eclipse builds on its own only when there are changes to files, and it will build incrementally. I suspect that this option is off for you.
    • If the option is not used, you can start a build by doing Project > Build All or Project > Build Project. As the menu entries say, only the first one will build all your projects. Perhaps you are using the keybinding that starts that menu entry? CTRL-B? This will only do anything if something has changed.
    • When doing a clean build, there comes a popup (see below) with some options in it. If you set the right options, only the project you have selected will be cleaned and then built. enter image description here

    So only the options Clean projects selected below combined with Build only the selected projects will do what you want.

    I do not understand why an Ant build (started in Eclipse) of one project will lead to a rebuild of all projects in the same workspace. There is no connection at all from the Ant build to the eclipse projects. The only reason I could imagine is, that the Ant build touches something, which is then dirty, and that leads to a new build. Perhaps you should add information about your build file, the directory structure you work on, ...

    0 讨论(0)
  • 2021-01-21 01:29

    Shortcut Key Method

    Another way is to change the shortcut key for building a project eg. Ctrl-B to only Build Project, instead of Build All.

    1. Go to Window -> Preferences
    2. In General -> Keys, find "Build" in the filter
    3. There are two cases, Build All and Build Project.
    4. Personally, I set Ctrl-B to Build Project by pressing Ctrl-B in the Binding Box
    5. Next I set Ctrl-A Ctrl-B sequence to build all Projects

    Try it out

    0 讨论(0)
提交回复
热议问题