| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> |
| <HEAD> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. 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>Executing project builders</title> |
| |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3>Executing project builders</h3> |
| |
| <P CLASS="Para">The whole point of project builders is that you don't need to |
| explicitly tell them to run. Instead, they run automatically whenever a qualifying build takes place |
| for the project that owns the buildfile. Remember that the builders are triggered as indicated |
| on the <strong>Build Options</strong> tab in the External Tools dialog and can be |
| any combination of after a clean, during a manual build or during auto builds. Let's see how this works.</P> |
| <ol> |
| <li>Select the HW project in one of the navigation views. In the workbench menu |
| bar, choose <b>Project > Clean...</b> Select <b>Clean selected projects</b> |
| and click <b>Ok</b></li> |
| <li>The project is rebuilt and the projectBuilder.xml buildfile is run. Notice |
| the output from this buildfile in the Console view. </li> |
| <li>Make sure the Autobuild preference is turned on, then make some trivial |
| change to HelloWorld.java and save the change. The save triggers an auto build, |
| but the auto build does not trigger the project builder. </li> |
| <li>Suppose we don't want to see the buildfile output every time it runs. Go |
| back to the External Tools Builders page of the project properties dialog |
| on HW. Select the Makejar entry and click <b>Edit...</b>. On the <b>Main</b> |
| tab, uncheck the <b>Capture Output</b> option, apply the change and exit back |
| to the workbench. </li> |
| </ol> |
| <P CLASS="Para">This concludes our look at Ant buildfiles as project builders |
| in Eclipse. It's worth repeating that though this example used a Java project, |
| project builders are not tied to Java, and may be used for any type of project. |
| </P> |
| |
| |
| |
| </BODY> |
| </HTML> |