| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html lang="en-us" xml:lang="en-us"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| |
| |
| <!-- /******************************************************************************* |
| * Copyright (c) 2000, 2005 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ --> |
| <link rel="stylesheet" type="text/css" href="../../org.eclipse.wtp.doc.user/common.css" /> |
| |
| <title>Running Ant in a headless workspace</title> |
| </head> |
| <body id="tjantheadless"><a name="tjantheadless"><!-- --></a> |
| <h1 class="topictitle1">Running Ant in a headless workspace</h1> |
| <div><p>You can use Ant to run a workbench with no interface and run specified |
| Ant scripts.</p> |
| <div class="section"> <p>In the root of the com.ibm.etools.j2ee.ant plugin is a sample |
| batch file called <samp class="codeph">runANT.bat</samp>. This <samp class="codeph">.bat</samp> file |
| will run a "headless" workbench (no user interface for the development environment) |
| and run a specified ANT script file (<samp class="codeph">example.xml</samp>). The ANT |
| script file must be a fully qualified name.</p> |
| <div class="p">Using runAnt has two advantages |
| over the org.eclipse.ant.core.antRunner application: <ul><li>The workspace is saved after executing the specified build file.</li> |
| <li>Autobuild is disabled during Ant script execution as a performance enhancement |
| and to fix a known limitation with org.eclipse.ant.core.antRunner on Linux<sup>®</sup>.</li> |
| </ul> |
| </div> |
| </div> |
| <ol><li class="stepexpand"><span>If you run runAnt with no parameters, it will present a simple |
| menu of operations.</span><ul><li>List your workbench projects</li> |
| <li>Run an Ant script</li> |
| </ul> |
| </li> |
| <li class="stepexpand"><span>If you specify parameters, it will pass them to Ant inside the |
| workbench. Try the following command:</span> <pre>runAnt -buildfile x:\MYWORKSPACE\MYPROJECT\echo.xml echo dir</pre> |
| </li> |
| <li class="stepexpand"><span>Then try the command:</span> <pre>runAnt</pre> |
| </li> |
| <li class="stepexpand"><span>Then, you can type either <kbd class="userinput">1</kbd> or <kbd class="userinput">2</kbd> plus |
| the following:</span> <pre>-buildfile x:\MYWORKSPACE\MYPROJECT\echo.xml</pre> |
| </li> |
| </ol> |
| </div> |
| <div> |
| <div class="familylinks"> |
| <div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/tjant.html">Working with Ant</a></div> |
| </div> |
| </div></body> |
| </html> |