Home

 

Running the headless Ant build script

Attention: Prior to running Ant in headless mode RAD must be closed. If you do not close RAD v7.5, you will get build errors when attempting to run Ant build in headless mode.

To run the itsoRunAnt.bat command file, do these steps:

Ensure that you have closed RAD v7.5.

Open a Windows command prompt.

Navigate to the location of the itsoRunAnt.bat file.

Run the command file by entering the following command:
itsoRunAnt -buildfile
	c:\workspaces\ RAD75proguide\ RAD75EJBEAR\META-INF\build.xml clean Total
	-DDebug=true -Dsource=true -Dmeta=true

The -buildfile parameter specifies the fully qualified path of the build.xml script file. We can pass the targets to run as parameters to itsoRunAnt and we can also pass Java environment variables by using the -D switch.

In this example, we run the clean and Total targets, and we include the debug, Java source, and metadata files in the resulting EAR file.

There are several build output files, which can be found in the c:\temp\ RAD75AntEE\dist directory: RAD75EJB.jar, RAD75EJBEAR.ear, and RAD75EJBTestWeb.war.

Note: We have included itsoRunAnt.bat and output.txt files in the c:\7672code\ant\j2ee directory. The output.txt file contains the output from the headless Ant script for review purposes.

Verify that the installation directory (see Example | 5-2, bold) points to the correct directory on your system.

ibm.com/redbooks