Liberty: Ant task - deploy
The deploy task can be used to install applications on a Liberty server.
Description
The deploy task supports deployment of one or more applications to the Liberty server.
Attributes
The following table describes attributes of the deploy task.
Attribute | Description | Required |
---|---|---|
installDir | Location of the Liberty server. | Yes |
serverName | Name of the Liberty 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 your 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"/>