| <!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>Using the Ant view</title> |
| |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3>Using the Ant view</h3> |
| |
| <P CLASS="Para">Eclipse provides a standard view, the Ant view, that lets you |
| work with your Ant buildfiles. This view is tree-structured, showing Ant buildfiles |
| as top-level entries and targets & internal targets as children. The main |
| advantage of this view is that you can work with all of your Ant buildfiles |
| in one place, as opposed to hunting them down in one of the navigation views.</P> |
| <ol> |
| <li>Open the Ant view from the workbench menu by selecting <b>Window > Show |
| View > Ant</b>.</li> |
| <li>By default, the Ant view is empty. There are three ways to add Ant buildfiles |
| to this view: |
| <ul> |
| <li>Click <strong>Add Buildfile<img src="../images/image618-add-ant.png" alt="Ant view" border="0" ></strong>. |
| This brings up a dialog in which you explicitly select those Ant buildfiles |
| you want to add</li> |
| <li>Click <strong>Add Buildfiles with Search<img src="../images/image618-add-ant-search.png" alt="Ant view" border="0" ></strong>. |
| This brings up a search dialog in which you can specify a filename pattern |
| for your Ant buildfiles and search within the entire workspace or a specified |
| working set.<br></li> |
| <li>Drag and drop buildfiles from other views to the Ant view.<br> |
| <br> |
| Once added to the Ant view, Ant buildfile entries remain in the view across |
| workbench invocations until explicitly removed or the associated project is closed.</li> |
| </ul> |
| </li> |
| <li>Click <strong>Add Buildfiles with Search</strong>. Suppose you only remember |
| that the buildfile you want to work with starts with 'H'. Enter 'H*.xml' for |
| the buildfile name. Make sure Workspace is selected for the scope, then click |
| Search. The HelloWorld.xml file is found and placed in the Ant view.</li> |
| <li>Expand the top-level entry to see the default target Hello, and the internal |
| target World.<br> |
| <img src="../images/ant_view.png" alt="Ant view" border="0" > |
| </li> |
| <li>Select the World internal target and click <strong>Run the Selected Target <img src="../images/image618-ant-run.png" alt="Ant view" border="0" ></strong>. |
| Notice that just the World target gets executed. </li> |
| <li>Select the top-level HelloWorld buildfile and click <strong>Run the Default |
| Target of the Selected Buildfile <img src="../images/image618-ant-run.png" alt="Ant view" border="0" ></strong>. Notice that just the default target, |
| Hello, gets executed.</li> |
| <li>To edit your buildfile, bring up the context menu on the HelloWorld file |
| and select <b>Open With > Ant Editor</b>.</li> |
| <li>To edit the default launch configuration, select <strong>Run As > Ant Build...</strong> from |
| the context menu.</li> |
| <li>The Run Ant launch configuration dialog appears. Here you can modify the way in which the buildfile |
| is run from the Ant view.</li> |
| <li>Select the HelloWorld file, then click the Remove button. The buildfile |
| is removed from the view.<br> |
| <strong>Note</strong>: This does not delete the file from the workspace.</li> |
| </ol> |
| |
| |
| |
| </BODY> |
| </HTML> |