The Deploy ANT Task is for launching the Deploy command-line tool in Apache ANT. Deploy performs remote deployment of Web services. More details on this tool are given in Deploy Tool.
![]() | Note |
|---|---|
Examples You can find usage examples of ANT tasks in WASP_HOME/src/example/tools/ant and in the build.xml files in Demos. See also Example 218. | |
| Task Name | Task Class |
|---|---|
| DeployTask | com.idoox.wasp.tools.ant.DeployTask |
Example 218. Deploy ANT Task
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="main" name="test">
<taskdef classname="com.idoox.wasp.tools.ant.DeployTask"
name="Deploy"/>
<target name="main">
<!-- you can either deploy JAR file made by WaspPackager ... -->
<Deploy Class="demo.basic.hello.server.HelloService"
Package="http://wso2.com/package/demo/basic/hello/server:HelloDemo"
Redeploy="true" Target="http://localhost:6060"
Uri="/demo/basic/HelloService">
<classpath path="${COMPILE_SERVER_CLASSPATH}"/>
</Deploy>
<!-- ... or you can let the deploy task to generate package for you
from the java class file -->
<Deploy Jarfile="/build/hellopackage.jar" Redeploy="true"
Target="http://localhost:6060">
<classpath path="${COMPILE_SERVER_CLASSPATH}"/>
</Deploy>
</target>
</project>
| Attribute Name | Description | Command-line Option |
|---|---|---|
| jarfile | Sets the name of the service JAR file | |
| Or, alternatively: | ||
| uri | Sets the path of the service on the WSO2 SOA Enablement Server | --uri |
| class | Sets the service class name | --class |
| Attribute Name | Description | Command-line Option |
|---|---|---|
| attachmentType | Sets attachment type as MIME or DIME. Default setting is mime. | --attachment-type (mime/dime) |
| classPathRef | Sets a reference to the classpath element. Used when deploying a class. | --classpath |
| target | Sets the URL of the WSO2 SOA Enablement Server that will host the service. Default value is http://localhost:6060. | --target |
| context | Sets the context of the package | --context |
| package | Sets the name of the service package when deploying class | --package |
| serviceName | Sets the name of the service package when deploying class | --service-name |
| redeploy | If set, the package will be redeployed | --redeploy |
| force | Sets forced Undeploy when redeploying | --force |
| generateWSDL | When set to false, disables generation of WSDL on client side (allowing server to generate WSDL). Default value is true. | --generate-wsdl |
| disabled | If set, the service will be deployed in the disabled state | --disabled |
| soapBindingStyle | Sets the SOAP binding style (document (default), rpc or wrapped) | --sbs |
| soapEncodingStyle | Sets the SOAP encoding style (literal (default) or encoded) | --ses |
| protocol | Sets SOAP version protocol: soap11, soap12 or soap11 soap 12 (both). Default value is determined by the clientconf.xml | --protocol |
| securityProvider | Sets the security provider | --security-provider |
| username | Sets the username that is used for authentication | --username |
| password | Sets the password that is used for authentication | --password |
verbose | Additional information during processing will be printed to stderr. Value is a level from 0-10. Default is 0 | --verbose |
Sets the classpath that the task will use to find other classes.
| Attribute of classpath | Description |
|---|---|
| path | Pathname. Syntax is $PATHNAME |
| refid | Reference to the id attribute of a path defined elsewhere in the buildfile. Syntax is simply PATH_ID. Useful when using the same path for several tasks. |