Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude one project from automatic build in Eclipse?

Tags:

eclipse

build

How to exclude one project from automatic build in Eclipse?

I have one project in workspace, which is probably builds very long (even if nothing was changed). I want to keep this project opened to browse source code but I need not it is being build all the time.

How to disable automatic build for this project?

Probably this was a bug in Eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=60803 and it was solved long time ago. Unfortunately, I can't find any per project options to control automatic build.

like image 788
Dims Avatar asked May 16 '13 13:05

Dims


People also ask

How do I disable a project in Eclipse?

In the Eclipse Navigator view (or any Eclipse view that supports Team operations), navigate to the project that you want to remove. Right-click the project and click Team > Delete from Repository Workspace.

How do I exclude files in eclipse?

Navigate to the file/folder you want to exclude. Right Click -> Resource -> Exclude from build.

How do I stop eclipse from building Workspace?

In these situations, autobuild can be turned off through Window > Preferences > General > Workspace > Build automatically. Even for smaller workspaces, turning off autobuilding may be a useful feature.

How do I stop auto build in STS?

If you want to turn off auto Building your project, click the Project menu and uncheck the Build automatically menu. Also available in the Workspace settings: Windows –> Preferences –> General –> workspace --> uncheck "Build Automatically" box.


Video Answer


3 Answers

When you open the Project properties of the project that should not be built you can disable all Builders - especially the "Java Builder". This should prevent any automated action like compiling regarding the project.

like image 90
Robert Avatar answered Sep 24 '22 10:09

Robert


An easier solution is to "Close Project" on the projects that you don't want to Build. I tried deselecting the Builders for the project, but this didn't work. Close Project on sample code, unused libraries and other "non-dependencies" allowed me to work with only the Projects of concern in the Package Explorer.

like image 34
robWDC Avatar answered Sep 24 '22 10:09

robWDC


The best approach is to use the Inclusion and Exclusion Patterns option in the Java Build Path.
For example if you want to exclude one project from being automatically built:
1- Go to its Properties->Java Build Path->Source.
2- Expand the folder in the "Source folders on the build path:" area
3- Select Exclude->Edit
4- In the exclusion patterns add **
Note: for more information on this patterns: Include and Exclusion Patterns

like image 41
Javi Avatar answered Sep 23 '22 10:09

Javi