本主题描述如何使用 ANT 任务来自动地将应用程序部署到 WebSphere Process Server。通过使用 ANT 任务,可以定义多个应用程序的部署方式并以无人照管方式在服务器上部署这些应用程序。
WebSphere® Integration Developer 信息中心提供了有关开发和测试应用程序的信息。
WebSphere Application Server Network Deployment V6 信息中心的“参考”部分提供了有关应用程序编程接口的信息。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