You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steph Richardson <st...@kvasar.com> on 2003/08/05 18:46:14 UTC
RE: ANT tasks for management console
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: Juraj.Lenharcik@t-systems.com
> [mailto:Juraj.Lenharcik@t-systems.com]
> Sent: Thursday, July 31, 2003 3:38 AM
> To: tomcat-user@jakarta.apache.org
> 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:juraj.lenharcik@t-systems.com
> www.t-systems.com <http://www.t-systems.com>
> www.efactory-solutions.com <http://www.efactory-solutions.com>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
Re: ANT tasks for management console
Posted by Aurele Venet <Au...@esa.int>.
note you can also define the classpath to the catalina-ant.jar from the
taskdef itself:
<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: Juraj.Lenharcik@t-systems.com
>>[mailto:Juraj.Lenharcik@t-systems.com]
>>Sent: Thursday, July 31, 2003 3:38 AM
>>To: tomcat-user@jakarta.apache.org
>>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:juraj.lenharcik@t-systems.com
>>www.t-systems.com <http://www.t-systems.com>
>>www.efactory-solutions.com <http://www.efactory-solutions.com>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>
--
V
. . . . . . . . .
tel:+34.918.131.331
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: ANT tasks for management console
Posted by Aurele Venet <Au...@esa.int>.
note you can also define the classpath to the catalina-ant.jar from the
taskdef itself:
<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: Juraj.Lenharcik@t-systems.com
>>[mailto:Juraj.Lenharcik@t-systems.com]
>>Sent: Thursday, July 31, 2003 3:38 AM
>>To: tomcat-user@jakarta.apache.org
>>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:juraj.lenharcik@t-systems.com
>>www.t-systems.com <http://www.t-systems.com>
>>www.efactory-solutions.com <http://www.efactory-solutions.com>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>
--
V
. . . . . . . . .
tel:+34.918.131.331