Recent Posts

RSS Feeds

Ant stuff for Tomcat Remote Deployment

Here are my targets to get deployed. First you have to import the catalina tasks via the instructions here

Next setup a target to deploy your war file to tomcat

<target name="tomcat-deploy-war" description="Deploy the App to Tomcat"> <deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${web.context.path}" war="file:${build.destdir}/${web.war.name}.war"/> </target>

The 'local' default version of ${tomcat.manager.url} would be http://localhost:8080/manager to deploy to another machine simply replace localhost with your remote host and 8080 with the port of the remote machine. Of course you will have to know the user name and address of admin on the remote machine.

Hope this helps!

Permalink     2 Comments



Comments:

If you use AppFuse or Equinox, this is already built in - just run 'ant install'. ;-)

Posted by Matt Raible on December 03, 2004 at 04:30 PM MST #

I posted something similar on my weblog except it was the issue of specifying an external context file. It might help those that read this blog as well.

http://radio.javaranch.com/channel/gthought/2004/10/18/1098118614000.html

Posted by Gregg Bolinger on December 04, 2004 at 01:42 PM MST #

Post a Comment:
  • HTML Syntax: Allowed