Home

 

Running the Ant Java EE application build

When launching the build.xml script, you can select which targets to run and the execution order.

To run the Ant build.xml to build the Java EE application, do these steps:

Right-click build.xml (in RAD75EJBEAR/META-INF), and select Run As Æ 3 Ant Build.

The Edit configuration and launch dialog opens (Figure | 5-14):

Select the Main tab:
To build the Java EE EAR file with debug, source files, and metadata, enter the following values in the Arguments text area:

-DDebug=true -Dsource=true -Dmeta=true

To build the Java EE EAR for production deployment (without debug support, source code, and metadata), enter the following value in the Arguments text area:

-Dtype=full

Select the Targets tab. Ensure that Total is selected (default).

Figure 25-14 Launch Ant to build and export a J2EE project (EAR)

Select the JRE tab. Select Run in the same JRE as the workspace.
Click Apply and then click Run.

Verify in the c:\temp\RAD75AntEE\dist output directory that the RAD7EJBEAR.ear, RAD75EJB.jar, and RAD75EJBTestWeb.war files were created.

The Console view displays the operations performed and their results.
ibm.com/redbooks