Netbeans: deploying Java app to remote Tomcat

前端 未结 1 867
盖世英雄少女心
盖世英雄少女心 2021-02-06 10:29

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条回答
  • 2021-02-06 10:37

    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>
    
    0 讨论(0)
提交回复
热议问题