+

Search Tips   |   Advanced Search

Ant task - server

The server task can be used to manage the status of a Liberty profile server.


Description

The server task supports the following options to manage the status of a Liberty profile server:


Attributes

The following table describes attributes of the server task.

attributes of the server task.

The first column contains a list of attributes, the second column contains a description of each attribute, and the third column states whether this attribute is required.

Attribute Description Required
installDir Location of the Liberty profile server. Yes
operation Server operations available as options: create, start, stop, status, and package. Yes
serverName Liberty profile server instance. The default value is defaultServer. No
userDir Value of the ${wlp.user.dir} variable. The default value is ${installDir}/usr/servers/${serverName}. No
outputDir Value of the ${wlp_output_dir} variable. The default value is ${installDir}/usr/servers/${serverName} No
clean Attributes that determines whether to operate the server using the clean option. No
timeout Waiting time before the server starts or stops. The default value is 30 seconds. The unit is milliseconds. No
archive Location of the compressed file when packaging a server. The value must be a file name and only works for the package option. No
ref Reference to an existing server task definition to reuse its server configuration. The value can be null when other required attributes are set. No


Example

This example shows how to use the server task in the build.xml file:

<wlp:server id="wlp.ant.test" installDir="${wlp_install_dir}" operation="start" 
            serverName="${serverName}" userDir="${wlp_usr}" outputDir="${wlp_output}" />
<wlp:server ref="wlp.ant.test" operation="status"/>


Parent topic: Use Ant to automate tasks