user manual

Chapter 28: Apache Ant and running BES examples 337
Deploying the example
2 Set the current directory to an example directory. The "Hello World"
example located at <install_dir>/examples/j2ee/hello is a good place to
start.
3 On the command line, enter "ant".
The example should build automatically.
Note The server does not have to be running to build the example. However,
deployment and undeployment require that the server be operational.
Executing an example requires that the partion be running.
Deploying the example
1 Make sure that a server is running.
2 On the command line, enter ant deploy.
This will deploy the example to the hub, configuration, and partition set in
the <install_dir>\examples\deploy.properties file.
If you wish to deploy to a different combination of hub/configuration/partition,
you can either edit the deploy.properties file to change the settings, or use -D
options on the command line to override the deploy.properties settings.
For example, to use a hub named "myhub", use the command:
ant -Dhub.name=myhub deploy
This will override the default hub name in deploy.properties with the value
myhub.
Running the example
1 Make sure that the Partition is running.
2 On the command line, enter ant execute.
The precise response depends on the particular example.
Undeploying the example
1 Make sure that a server is running.
2 On the command line, enter undeploy.
Troubleshooting
1 Make sure that the <bes_install_dir>/bin directory is on your path and
precedes the path to any alternative Ant installations.