Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans: deploying Java app to remote Tomcat

Tags:

netbeans

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.

like image 408
sivabudh Avatar asked Jun 29 '09 06:06

sivabudh


People also ask

How does Tomcat integrate with Netbeans?

Restart Netbeans. On the project view (default left side of the screen), go to services, right click on Servers and then "Add Server" Select Apache Tomcat, enter username and password and config the rest and finish.


1 Answers

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>
like image 142
Maurice Perry Avatar answered Sep 21 '22 16:09

Maurice Perry