Netbeans: deploying Java app to remote Tomcat

匿名 (未验证) 提交于 2019-12-03 02:50:02

问题:

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.

回答1:

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

UPDATE:

Here is an example:

<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> 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!