| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en"> | |
| <HEAD> | |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > | |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> | |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> | |
| <title>Builds</title> | |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script> | |
| </HEAD> | |
| <BODY BGCOLOR="#ffffff"> | |
| <h1 class="Head">Builds</h1> | |
| <p class="Para">Builders create or modify workspace resources, | |
| usually based on the existence and state of other resources. They are a powerful | |
| mechanism for enforcing the constraints of some domain. For example, a Java | |
| builder converts Java source files (.java files) into executable class files | |
| (.class files), a web link builder updates links to files whose name/location | |
| have changed, etc. As resources are created and modified, builders are run | |
| and the constraints are maintained. This transform need not be one to one. For | |
| example, a single .java file can produce several .class files. </p> | |
| <h2>Auto-build vs. Manual Build</h2> | |
| <p class="Intro">There are two distinct user work modes with respect to | |
| building: relying on Auto-build, or user initiated manual building.</p> | |
| <p class="Intro">If you don't need fine-grained control over when builds occur, | |
| you can turn on auto-building. With auto-building on, | |
| builds occur after every set of resource changes (e.g., saving a file, importing | |
| a ZIP, ...). Auto-building is efficient because the amount of work done is | |
| proportional to the amount of change done. The benefit of auto-building is | |
| that your derived resources (e.g., Java .class files) are always up to date. | |
| Auto-building is turned on/off via the <b>Build automatically</b> option on the | |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Workspace)")'> | |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> | |
| <b>General > Workspace</b></a> preference page.</p> | |
| <p class="Intro">If you need more control over when builds occur, you can turn off | |
| auto-building and invoke builds manually. This is sometimes desirable in | |
| cases where, for example, you know building is of no value until you finish a | |
| large set of changes. In this case there is no benefit to paying the cost of | |
| auto-building. Builds can be invoked manually in numerous ways, for example, by | |
| right-clicking the project and selecting <b>Build Project</b>.</p> | |
| <p class="Intro">The disadvantage of manual building is that the problems that | |
| were generated to indicate build errors quickly become out of date until you | |
| build. In addition, it is very important that you remember to manually build | |
| before relying on build output (e.g. before running your Java program).</p> | |
| <h2>Building and Cleaning</h2> | |
| <p class="Intro">Builds work incrementally based on a previous built state. They | |
| will apply the transforms of the configured builders only on the resources that have | |
| changed since that previous state was computed (i.e., since the last build). | |
| Auto-building always uses incremental building for efficiency.</p> | |
| <p class="Intro">A clean build (<b>Project > Clean</b>) discards any existing | |
| built state. The next build after a clean will transform all resources according the | |
| domain rules of the configured builders.</p> | |
| <p class="Intro">Depending on your needs, build and clean can | |
| be done over a specific set of projects or the workspace as a whole. Specific | |
| files and folders cannot be built separately.</p> | |
| </BODY> | |
| </HTML> |