使用 pscp 将 war 文件复制到远程服务器
我正在使用 Maven 3,我想在构建战争文件后将其复制到远程目标。我在 WinXP 机器上并安装了 PuTTY 及其工具,即存在 pscp.exe。
我读到了 maven-deploy-plugin,但这似乎只适用于将某些内容发送到存储库中。远程站点有一个 Tomcat 正在运行,并且与存储库没有任何关系。它应该只运行网络应用程序。
有一段时间我使用 maven-resources-plugin 将 war 文件复制到本地目的地,但这似乎无法将某些内容发送到远程站点。
谁能告诉我我能做什么吗?也许有样品?
I'm using Maven 3 and I want to copy the war-file after it was built to a remote destination. I'm on a WinXP-machine and have PuTTY with its tools installed, i.e. pscp.exe exists.
I read about maven-deploy-plugin, but that only seems to apply to sending something into a repository. The remote site has a Tomcat running and hasn't got anything to do with a repository. It should only run the web-app.
For a while I was using maven-resources-plugin to copy the war-file to a local destination, but that doesn't seem to be able to send something to a remote site.
Can anyone please tell me what I can do? Maybe with a sample?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在浪费了一整天时间并尝试了各种东西(例如 ant-plugin 和 wagon-thing)之后,我使用了 exec-maven-插件。我只是将
pscp.exe
称为普通的 ol' 风格。显然它没有使用任何“花哨”的东西,但它确实有效。
After wasting an entire day and trying various things like the ant-plugin and a wagon-thing I used the exec-maven-plugin. I simply call
pscp.exe
the plain ol' style.Obviously it doesn't use any of the "fancy" stuff, but it works.