<taskdef classname="org.apache.catalina.ant.InstallTask" classpath="${tomcatAntLib}" name="install"/>
this way you may wish to keep the path independant rather than copying the jar to the ant home!
Steph Richardson wrote:
Juraj
Look for TOMCAT_HOME/server/lib/catalina-ant.jar and copy it to your ANT_HOME/lib directory.
Then you need to define the targets, and add some tasks like this :
<!-- ****************** Tomcat / catalina.ant tasks ****************** --> <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" /> <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" /> <taskdef name="list" classname="org.apache.catalina.ant.ListTask" /> <taskdef name="start" classname="org.apache.catalina.ant.StartTask" /> <taskdef name="stop" classname="org.apache.catalina.ant.StopTask" /> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
<target name="reload"> <!-- reload the web application in tomcat --> <echo message="Reloading tomcat web app on port : ${tomcat.port}" /> <reload url="${tomcat.manager}" path="/${context-path}" username="${tomcat.usr}" password="${tomcat.pwd}" /> </target>
<target name="war"> <mkdir dir="${deploy}"/> <war warfile="${deploy}/${context-path}.war" webxml="${dist}/web.xml"> <fileset dir="${rootdir}"> <exclude name="**/build.xml"/> <exclude name="**/web.xml"/> <exclude name="**/dev/**"/> <exclude name="**/temp/**"/> <exclude name="**/CVS/**"/> <exclude name="**/*.java"/> </fileset> </war> </target>
<target name="deploy" description="Deploys a Web application"> <deploy url="${tomcat.manager}" username="${tomcat.usr}" password="${tomcat.pwd}" path="/${context-path}" war="file:${war-path}" /> </target>
<target name="undeploy" description="Undeploys a Web application"> <undeploy url="${tomcat.manager}" username="${tomcat.usr}" password="${tomcat.pwd}" path="/${context-path}" /> </target>
<target name="redeploy" description="Undeploys and deploys a Web aplication"> <antcall target="undeploy" /> <antcall target="deploy" /> </target>
<target name="list" description="Lists Web applications"> <echo message="Listing the applications...."/> <list url="${tomcat.manager}" username="${tomcat.usr}" password="${tomcat.pwd}" /> </target>
<target name="start" description="Starts a Web application"> <echo message="Starting the application...."/> <start url="${tomcat.manager}" username="${tomcat.usr}" password="${tomcat.pwd}" path="/${context-path}" /> </target>
<target name="stop" description="Stops a Web application"> <echo message="Stopping the application...."/> <stop url="${tomcat.manager}" username="${tomcat.usr}" password="${tomcat.pwd}" path="/${context-path}" /> </target>
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 3:38 AM To: [EMAIL PROTECTED] Subject: ANT tasks for management console
Hi,
Catalina 4.1.24 contains some ANT-tasks to call the management application to deploy, reload and delete apps. Where can I find these tasks to include them in my build?
Juraj
Mit freundlichen Gr�ssen
Juraj Lenharcik T-Systems International GmbH Systems Integration 1 eFactory Solutions Business Unit Manufacturing Solutions Hausadresse: Fasanenweg 5, 70771 Leinfelden-Echterdingen phone: +49 (711) 972 46185 fax: +49 (711) 972 48109
mailto:[EMAIL PROTECTED] www.t-systems.com <http://www.t-systems.com> www.efactory-solutions.com <http://www.efactory-solutions.com>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
V
. . . . . . . . . tel:+34.918.131.331
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
