Netbeans:将Java应用程序部署到远程Tomcat [英] Netbeans: deploying Java app to remote Tomcat

查看:117
本文介绍了Netbeans:将Java应用程序部署到远程Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有简单的方法可以将Web服务/Java Web应用程序等自动部署到远程tomcat服务器?目前,我必须手动复制.war文件.

Is there any easy way to automatically deploy a web service / java web app, etc to a remote tomcat server? currently i have to manually copy the .war file.

推荐答案

我个人在build.xml中添加了一个包含< scp>"标记的"deploy"目标.标签以传输战争文件.

Personally, I add a "deploy" target in build.xml that contains an <scp> tag to transfer the war file.

更新:

这里是一个例子:

<target name="deploy" depends="dist">
    <scp todir="${user.name}@www.myserver.com:tomcat-base/webapps/"
            keyfile="${user.home}/.ssh/myserver.key"
            passphrase="BlaBlaBla" trust="true">
        <fileset dir="dist" includes="myapp.war"/>
    </scp>
</target>

这篇关于Netbeans:将Java应用程序部署到远程Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆