如何使用 Ant 将 portlet 部署到远程 WebSphere Portal?

发布于 2024-07-14 04:36:08 字数 61 浏览 4 评论 0原文

如何使用 Ant 将 portlet 部署到远程 WebSphere Portal 6.0 (Linux)?

How to deploy with Ant an portlet to remote WebSphere Portal 6.0 (Linux)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陪你到最终 2024-07-21 04:36:08

您应该能够使用 XmlAccess Ant 任务来完成此操作。 请参阅红皮书WebSphere Portal 版本 6 企业规模部署最佳实践

You should be able to do this with the XmlAccess Ant tasks. See the appendices of the Redbook WebSphere Portal Version 6 Enterprise Scale Deployment Best Practices.

长梦不多时 2024-07-21 04:36:08

我们在本地而不是远程执行此操作,使用 ant 任务执行以下操作:

1) 将 portlet war 文件复制到 Portal 的 installApps 目录(因为您是远程执行此操作,所以您需要通过 FTP 或其他方式进行操作,而不是简单地执行此操作)像我们一样将其复制到本地)。

2) 针对当前目录“xmlaccess”的子目录中名为“update.xmlaccess”的 xml 访问文件执行 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>

We do this, locally, not remotely, with an ant task that does the following:

1) copy's the portlet war file to the Portal's installApps directory (since you are doing it remote, you would need to FTP it or something, rather than simply copy it locally as we do).

2) Executes the xmlaccess script (in our case, xmlaccess.bat, in your case xmlaccess.sh) against a xml access file called "update.xmlaccess" in a subdirectory of the current directory called "xmlaccess".

Here is a clip of the code from our ant task. Some of the values in there are variables specific to our script, but the names should be simple enough to figure out what they do:

<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文