ant taskdef problem

H

harryos

hi
i wrote an ant target to start tomcat manager with url,usrname,passwd
read from a build.properties file.

<property file="build.properties" />

<taskdef name="start" classname="org.apache.catalina.ant.StartTask"
classpath="${tomcat.dir}/lib/apache-ant.jar" />
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
classpath="${tomcat.dir}/lib/apache-ant.jar" />

<path id="classpath">
<fileset dir="${tomcat.dir}/lib">
<include name="*.jar"/>
</fileset>
</path>

<target name="init" description ="creating build and dist
directories">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<property name="context-path" value="" />
</target>


<target name="start-tomcat" depends="init">
<start url="${url}" username="${username}" password="${password}"
path="${context-path}"/>
</target>

-------------------
in build.properties file i wrote
tomcat.dir=E:/tomcat/apache-tomcat-6.0.18
url=http://localhost:8080/manager
username=admin
password=admin
---------------------------
However ,when i run ant,i get a failed msg 'F:\code\servletapp
\build.xml:4: taskdef class org.apache.catalina.ant.StartTask cannot
be found..

i couldn't understand why this is happening.The path to catalina-
ant.jar is given in the classpath in the taskdef .can anybody advise?
thanks
harry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top