Ant targets

A WebSphere Commerce instance can be created from the command line. The command-line utility uses Apache Ant to create the objects required. The targets are divided into several high-level groups that correspond to the environment that is to be configured.

  • The database
  • The application server
  • The web server
  • WebSphere Commerce

Ant targets might have one or more prerequisites. Each target takes a set of parameters that defines what the target creates. For example, the CreateDatabase target takes the database name and other parameters.

The required input for the target is specified through the following two methods:
  • Using command-line parameters.
  • Using a properties file. The createInstance.properties file must exist for the Ant targets to work. This file is provided by completing the steps in Generating the createInstance.properties file.

Running the WebSphere Commerce Ant target:

  1. WindowsOpen a command prompt.
  2. SolarisLinuxAIXOpen a UNIX shell.
  3. SolarisLinuxAIXSwitch to the WebSphere Commerce non-root user. All Ant targets must be run as this user.
  4. For IBM i OS operating systemLog on as a user with SECOFR class authority.
  5. For IBM i OS operating systemStart a Qshell session by issuing the STRQSH command.
  6. Go to the bin directory. For example, cd WC_installdir/bin.
  7. Run your command. For example, ./config_ant.sh -DinstanceName=instance_name -Dparam1=value1 -Dparam2=value2 Targetname.
    Note: The instance_name parameter is required for all targets. It tells the target where to locate the properties file used by Ant.

Targets

The following table shows types of Ant targets and the associated target.

Target type Description Targets
Creating and configuring targets Creating an instance
Configure WebSphere Commerce Server
Configure database
Configure workspaces
Removing targets Remove WebSphere Commerce instance
Remove WebSphere Commerce Server