本主题描述如何使用 ANT 任务自动将应用程序部署至 WebSphere ESB。通过使用 ANT 任务,可定义多个应用程序的部署并让它们在服务器上以无人照管的方式运行。
有关部署和测试应用程序的信息在 WebSphere® Integration Developer V6.0 信息中心中。
WebSphere Application Server V6.0 信息中心的引用部分包含有关应用程序编程接口的一节。在程序包 com.ibm.websphere.ant.tasks 中对 ANT 任务进行了描述。对于此主题的目的,相 关任务包括 ServiceDeploy 和 InstallApplication。
<?xml version="1.0" > <project name="OwnTaskExample" default="main" basedir="."> <taskdef name="servicedeploy" classname="com.ibm.websphere.ant.tasks.ServiceDeployTask" /> <target name="main" depends="main2"> <servicedeploy scaModule="c:/synctest/SyncTargetJAR" ignoreErrors="true" outputApplication="c:/synctest/SyncTargetEAREAR" workingDirectory="c:/synctest" noJ2eeDeploy="true" cleanStagingModules="true"/> </target> </project>
${WAS}/bin/ws_ant -f myBuildScript.xml