The Ant build file

The EAServer installation includes a sample XML build file. You can find it in %JAGUAR%\sample\jagtool\sample.xml (UNIX) or $JAGUAR/sample/jagtool/sample.xml (Windows).

This file contains targets for:

For example, to run jagant with the sample build file to refresh a package named SVU, enter this command all on one line:

jagant -buildfile %JAGUAR%\sample\jagtool\sample.xml refresh_svu

In this example, jagant is invoked with the specified build file. The target, refresh_svu, is defined in the build file as:

<!--refresh package svu -->
<target name="refresh_svu" depends="connect">
  <jag_refresh entity="Package:SVU" />
</target>

The refresh_svu target invokes the jag_refresh command to refresh the package named SVU. The refresh_svu target depends on the connect target. This dependency causes the connect target to run before the refresh_svu target. The connect target is defined as follows:

<!-- connect -->
<target name="connect">
<jag_connect host="$(jaguar.host)"port="$(jaguar.port)" user="$(jaguar.user)"
password="$(jaguar.password)" />
</target>

The connect target invokes the jag_connect command to open a connection with the server. The host name, port number, user name and password are variables. They are defined earlier in the build file as follows:

<!-- global properties for this build -->
<property name="jaguar.host" value="yourMachine" />
<property name="jaguar.port" value="9000" />
<property name="jaguar.user" value="jagadmin" />
<property name="jaguar.password" value="" />

You can override these values at the command line using the Ant -D option. This is typically done to specify the password, so that it is not stored directly in the build file. For example (entered all on one line):

jagant -Djaguar.host=eclipse -Djaguar.port=9005 -Djaguar.password=jagpass -buildfile %JAGUAR%\sample\jagtool\sample.xml refresh_svu

This command connects to the server with a host name of eclipse on port 9005, with the user name jagadmin and the password jagpass. The default user of jagadmin is still used because it was not overridden at the command line.