如何使用Ant將Portlet部署到遠程WebSphere Portal 6.0(Linux)?如何使用Ant將Portlet部署到遠程WebSphere Portal?
4
A
回答
2
您應該可以使用XmlAccess Ant任務完成此任務。請參閱紅皮書WebSphere Portal Version 6 Enterprise Scale Deployment Best Practices的附錄。
2
我們做到這一點,在本地,而不是遠程,與螞蟻的任務,執行以下操作:
1)副本的portlet的war文件到門戶網站的installApps目錄(因爲你是遠程做它,你將需要通過FTP或其他方式,而不是像我們一樣簡單地在本地複製它)。
2)在名爲「xmlaccess」的當前目錄的子目錄中,對xml訪問文件「update.xmlaccess」執行xmlaccess腳本(在我們的例子中爲xmlaccess.bat,在您的情況xmlaccess.sh中)。
這裏是我們的ant任務代碼片段。其中的一些值有特定於我們腳本的變量,但名稱應該足夠簡單以找出它們的作用:
<target name="deploy" depends="war" description="deploy the application">
<copy file="${project.base}/target/${package.name}.war" todir="${portal.base}/installableApps" />
<echo message="Deploying ${project.name} to WebSphere Portal." />
<exec executable="${portal.base}/bin/xmlaccess.bat">
<arg line='-in "xmlaccess/update.xmlaccess" -user ${wps.admin.user} -pwd ${wps.admin.password} -url ${wps.admin.url}
-out "xmlaccess/deploymentresults.xmlaccess"' />
</exec>
</target>
您能發佈update.xmlaccess文件嗎?我試圖完成同樣的事情 – 2012-08-09 18:42:16