Author: markt
Date: Tue Jul 28 14:58:28 2015
New Revision: 1693105

URL: http://svn.apache.org/r1693105
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58112
Update docs for importing Ant tasks

Modified:
    tomcat/trunk/webapps/docs/manager-howto.xml

Modified: tomcat/trunk/webapps/docs/manager-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/manager-howto.xml?rev=1693105&r1=1693104&r2=1693105&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/manager-howto.xml (original)
+++ tomcat/trunk/webapps/docs/manager-howto.xml Tue Jul 28 14:58:28 2015
@@ -1147,18 +1147,14 @@ commands, you must perform the following
     You must use version <strong>1.4</strong> or later.</li>
 <li>Install the Ant distribution in a convenient directory (called
     ANT_HOME in the remainder of these instructions).</li>
-<li>Copy the files <code>server/lib/catalina-ant.jar</code> and
-    <code>server/lib/tomcat-util.jar</code> from your Tomcat
-    installation into Ant's library directory (<code>$ANT_HOME/lib</code>).
-    </li>
 <li>Add the <code>$ANT_HOME/bin</code> directory to your <code>PATH</code>
     environment variable.</li>
 <li>Configure at least one username/password combination in your Tomcat
     user database that includes the <code>manager-script</code> role.</li>
 </ul>
 
-<p>To use custom tasks within Ant, you must declare them first with a
-<code>&lt;taskdef&gt;</code> element.  Therefore, your <code>build.xml</code>
+<p>To use custom tasks within Ant, you must declare them first with an
+<code>&lt;import&gt;</code> element.  Therefore, your <code>build.xml</code>
 file might look something like this:</p>
 
 <source><![CDATA[<project name="My Application" default="compile" basedir=".">
@@ -1174,19 +1170,11 @@ file might look something like this:</p>
   <property name="username" value="myusername"/>
   <property name="password" value="mypassword"/>
 
+  <!-- Configure the path to the Tomcat installation -->
+  <property name="catalina.home" value="/usr/local/apache-tomcat"/>
+
   <!-- Configure the custom Ant tasks for the Manager application -->
-  <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
-  <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
-  <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
-  <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
-  <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
-  <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/>
-  <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
-  <typedef name="sessions"  classname="org.apache.catalina.ant.SessionsTask"/>
-  <taskdef name="findleaks" classname="org.apache.catalina.ant.FindLeaksTask"/>
-  <typedef name="vminfo"    classname="org.apache.catalina.ant.VminfoTask"/>
-  <typedef name="threaddump" 
classname="org.apache.catalina.ant.ThreaddumpTask"/>
-  <typedef name="sslConnectorCiphers" 
classname="org.apache.catalina.ant.SslConnectorCiphersTask"/>
+  <import file="${catalina.home}/bin/catalina-tasks.xml"/>
 
   <!-- Executable Targets -->
   <target name="compile" description="Compile web application">
@@ -1213,9 +1201,10 @@ file might look something like this:</p>
 
 </project>]]></source>
 
-<p>Note: The definition of the resources task above will override the resources
-datatype added in Ant 1.7. If you wish to use the resources datatype you will
-need to use Ant's namespace support to assign the Tomcat tasks to their own
+<p>Note: The definition of the resources task via the import above will 
override
+the resources datatype added in Ant 1.7. If you wish to use the resources
+datatype you will need to use Ant's namespace support to modify
+<code>catalina-tasks.xml</code> to assign the Tomcat tasks to their own
 namespace.</p>
 
 <p>Now, you can execute commands like <code>ant deploy</code> to deploy the



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to