Setting up the Ant tasks environment

To run Decision Center Ant tasks, you must first set up the required environment variables.

To run Ant tasks, you must have version 1.7.1 (or later) of Ant set up on your system. If Ant is not installed or your version is older than version 1.7.1, you must set up your environment to use the correct version of Ant. You can download Ant from the Apache web site, or you can use the Ant 1.7.1 distribution packaged at <ODM_InstallDir>/shared/tools/ant, where <ODM_InstallDir> is your Operational Decision Manager installation directory.

To test your current version of Ant:

Type the following command in a Windows command prompt or UNIX shell: ant -version

To set up your environment to use Ant:

  1. Set the ANT_HOME environment variable to <ODM_InstallDir>/shared/tools/ant.
  2. Set the JAVA_HOME environment variable to the path to your JDK installation.
  3. Add the directory <ODM_InstallDir>/shared/tools/ant/bin to your PATH environment variable.
The Decision Center Ant tasks are defined in <ODM_InstallDir>/teamserver/bin/build.xml and executed by commands of the form:
ant <taskName> <parameters list>
Note: To execute these Ant tasks, you must use the same Java™ virtual machine version and vendor as the one that is used by the application server.

Ant task parameters start with -D. Use them to set values such as the following ones:

ant execute-schema -Dserver.url=<protocol://host:port>/teamserver/ -DdatasourceName=jdbc/ilogDataSource -Dfile=my_sql_file.sql

The <protocol://host:port> URL is defined in the file <ODM_InstallDir>/teamserver/bin/teamserver-anttasks.properties. If your browser is not running on the same host as the application server, replace localhost with the address of the machine. If your web application is mapped to a host on a port that is different from the port number shown, change the port number to your host port number.

The file <ODM_InstallDir>/teamserver/bin/teamserver-anttasks.properties defines the value of some common parameters and others that depend on the application server used. You do not have to include these parameters in your Ant task command if they are properly defined in this file. The content of the teamserver-anttasks.properties file is as follows:

# Default properties
# ------------------------------------
rtsAdmin.login=rtsAdmin
rtsAdmin.password=rtsAdmin

protocol=http
server.host=localhost
server.port=8080
server.url=${protocol}://${server.host}:${server.port}/teamserver

datasourceName=jdbc/ilogDataSource

outputFile=output.sql

languagePackPath = .
languagePackOutputPath = ./generated

persistenceLocale =
selector =
branch =
override = false

Also, take note of any special instructions in this file concerning your application server.

The appserver.name property configures the class path for the Ant tasks. If you have to add specific drivers to your class path, you can add them to <ODM_InstallDir>/teamserver/lib/classpath-teamserver.xml.

Communication between the Ant tasks and Decision Center supports the HTTP or HTTPS communication protocols. For more information, see Ant task communication protocol.