Running Ant in a headless workspace

You can use Ant to run a workbench with no interface and run specified Ant scripts.

You can use a sample batch file called runANT.bat to run Ant in a headless mode, and this bat file is located in <installdir>\IBM\SDP70\bin\. This .bat file will run a "headless" workbench (no user interface for the development environment) and run a specified ANT script file (example.xml). The ANT script file must be a fully qualified name.

Using runAnt has two advantages over the org.eclipse.ant.core.antRunner application:
  • The workspace is saved after executing the specified build file.
  • 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®.
  1. If you run runAnt with no parameters, it will present a simple menu of operations.
    • List your workbench projects
    • Run an Ant script
  2. If you specify parameters, it will pass them to Ant inside the workbench. Try the following command:
    runAnt -buildfile x:\MYWORKSPACE\MYPROJECT\echo.xml echo dir
  3. Then try the command:
    runAnt
  4. Then, you can type either 1 or 2 plus the following:
    -buildfile x:\MYWORKSPACE\MYPROJECT\echo.xml

Feedback