+

Search Tips   |   Advanced Search

Ant task - deploy

The deploy task can be used to install applications on a Liberty profile server.


Description

The deploy task supports deployment of one or more applications to the Liberty profile server.


Attributes

The following table describes attributes of the deploy task.

attributes of the deploy 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
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
file Location of a single application to be deployed. See file attribute in Apache Ant. The application type can be war, ear, rar, eba, zip , or jar. Yes, only when the fileset attribute is not specified.
fileset Location of multiple applications to be deployed. See fileset attribute in Apache Ant. Yes, only when the file attribute is not specified.
timeout Waiting time before the deployment completes successfully. The default value is 30 seconds. The unit is milliseconds. 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 deploy task in the build.xml file:

    <wlp:deploy ref="wlp.ant.test" >
       <fileset dir="${basedir}/resources/">
             <include name="**/*.war"/>               
       </fileset>
  </wlp:deploy>
  <wlp:deploy ref="wlp.ant.test" file="${basedir}/resources/SimpleOSGiApp.eba"  timeout="40000"/>


Parent topic: Use Ant to automate tasks