Deployment in Tomcat using ANT Script

Hi

Open build.xml, and add the below Task def and Ant Task.

[taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/]

[deploy url=”${manager.url}”
username=”${manager.username}”
password=”${manager.password}”
path=”/${name}”
war=”file:/${dist.dir}/${name}.war” /]

[target name=”deploy” depends=”package-web” if=”tomcat.home”
description=”unwar into the servlet container’s deployment directory”]

[unwar src=”${webapp.dist}/${webapp.war}”
dest=”${tomcat.home}/webapps/${webapp.name}”/]

[/target]

Advertisements

One thought on “Deployment in Tomcat using ANT Script

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s