You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Teasel <na...@teasel.org> on 2007/02/05 00:28:59 UTC

Re: help! taskdef class.org.apache.catalina.ant.DeployTask cannot be found


Anil Philip wrote:
> 
> I am trying to run the Quartz webapp from Sun Java
> Studio 8.1 using Tomcat. I am using the ant scripts
> that come with Quartz webapp.
> When I try to Run (in Sun Studio 8.1), I get
> "taskdef class.org.apache.catalina.ant.DeployTask
> cannot be found"
> 
> the build.xml for webapp is here:
> https://quartz.dev.java.net/source/browse/quartz/webapp/build.xml
> Any help appreciated.
> thanks,
> Anil

I'm getting the same error trying to compile my first servlet under
Fedora5/Tomcat5.5.15/Ant1.6.5

$ ant
Buildfile: build.xml
BUILD FAILED
/var/lib/tomcat5/webapps/test1/WEB-INF/build.xml:147: taskdef class
org.apache.catalina.ant.DeployTask cannot be found
Total time: 0 seconds

I have copied catalina-ant.jar into /usr/share/ant/lib, as instructed
I have tried jar tvf /usr/share/ant/lib/catalina-ant.jar, and the classes
are definitely there
I have tried ant -lib /usr/share/ant/lib
I have tried exporting ANT_HOME myself, rather than relying on /etc/ant.conf
I have tried banging my fist on the desk

...but nothing seems to work.  If anyone has any suggestions, or pointers to
documentation that doesn't just say "copy in the catalina-ant.jar file and
all will be well, they'd be much appreciated!

Cheers,
Ian

-- 
View this message in context: http://www.nabble.com/help%21-taskdef-class.org.apache.catalina.ant.DeployTask-cannot-be-found-tf2932346.html#a8798930
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: help! taskdef class.org.apache.catalina.ant.DeployTask cannot be found

Posted by James Abley <ja...@volantis.com>.
Probably Sun Java Studio has an embedded instance of ANT, and you've put 
the jars into the wrong place.

Try just defining them according to where the jars are located:


<path id="tomcat.ant.classpath">
             <pathelement 
location="${catalina.home}/server/lib/catalina-ant.jar" />
         </path>

         <taskdef name="catalina-undeploy"
                  classname="org.apache.catalina.ant.UndeployTask"
                  classpathref="tomcat.ant.classpath" />
         <taskdef name="catalina-deploy"
                  classname="org.apache.catalina.ant.DeployTask"
                  classpathref="tomcat.ant.classpath" />

         <catalina-undeploy path="/path"
                            url="${tomcat.url}"
                            username="${tomcat.username}"
                            password="${tomcat.password}" />

         <catalina-deploy war="path.war"
                          path="/path"
                          url="${tomcat.url}"
                          username="${tomcat.username}"
                          password="${tomcat.password}" />


Teasel wrote:
> 
> Anil Philip wrote:
>> I am trying to run the Quartz webapp from Sun Java
>> Studio 8.1 using Tomcat. I am using the ant scripts
>> that come with Quartz webapp.
>> When I try to Run (in Sun Studio 8.1), I get
>> "taskdef class.org.apache.catalina.ant.DeployTask
>> cannot be found"
>>
>> the build.xml for webapp is here:
>> https://quartz.dev.java.net/source/browse/quartz/webapp/build.xml
>> Any help appreciated.
>> thanks,
>> Anil
> 
> I'm getting the same error trying to compile my first servlet under
> Fedora5/Tomcat5.5.15/Ant1.6.5
> 
> $ ant
> Buildfile: build.xml
> BUILD FAILED
> /var/lib/tomcat5/webapps/test1/WEB-INF/build.xml:147: taskdef class
> org.apache.catalina.ant.DeployTask cannot be found
> Total time: 0 seconds
> 
> I have copied catalina-ant.jar into /usr/share/ant/lib, as instructed
> I have tried jar tvf /usr/share/ant/lib/catalina-ant.jar, and the classes
> are definitely there
> I have tried ant -lib /usr/share/ant/lib
> I have tried exporting ANT_HOME myself, rather than relying on /etc/ant.conf
> I have tried banging my fist on the desk
> 
> ...but nothing seems to work.  If anyone has any suggestions, or pointers to
> documentation that doesn't just say "copy in the catalina-ant.jar file and
> all will be well, they'd be much appreciated!
> 
> Cheers,
> Ian
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org