The Java EE 6 Tutorial, Volume I

Building, Packaging, Deploying, and Running order Using Ant

To build the application components of order, enter the following command:


ant

This runs the default task, which compiles the source files and packages the application into an WAR file located at tut-install/examples/persistence/order/dist/order.war.

To deploy the WAR, make sure the Enterprise Server is started, then enter the following command:


ant deploy

Open a web browser to http://localhost:8080/order/ to create and update the order data.

The all Task

As a convenience, the all task will build, package, deploy, and run the application. To do this, enter the following command:


ant all

Undeploying order

To undeploy order.war, enter the following command:


ant undeploy