Hi Christoph, Thanks a lot for the reply!
Yes, I have tried specifying the complete path as well. I copied and pasted the <taskdef> that you mailed but that too didn't work for me. I get the same error message as before. Any more pointers on this one? Thanks again, Ritu *******code***************************************************************************************************************** <taskdef uri="antlib:net.sf.contrib" resource="net/sf/antcontrib/antlib.xml"> <classpath> <fileset dir="C:/apache-ant-1.8.0/lib" includes="ant-contrib.jar" /> </classpath> </taskdef> *******error**************************************************************************************************************** BUILD FAILED C:\AMMA\Eclipse3.3\FORANT\forant.xml:31: The following error occurred while executing this line: jar:file:C:/apache-ant-1.8.0/lib/ant-contrib.jar!/net/sf/antcontrib/antlib.xml:3: taskdef A class needed by class net.sf.antcontrib.platform.ShellScriptTask cannot be found: ExecTask using the classloader AntClassLoader[C:\apache-ant-1.8.0\lib\ant-contrib.jar] ----- Original Message ----- From: "christoph grothaus" <christoph.groth...@isr.de> To: "Ant Users List" <user@ant.apache.org> Sent: Tuesday, March 23, 2010 2:09:35 AM Subject: Re: Error message while using ant-contrib.jar - "taskdef A class needed by class net.sf.antcontrib.platform.ShellScriptTask cannot be found: ExecTask" > P.S. I have already tried the following: > > 1) copying ant-contrib.jar in the \apache-ant-1.8.0\lib folder > > 2) removing the namespace xmlns:ac="antlib:net.sf.antcontrib" and > specifying "for" instead of "ac:for" > > 3) specifying the complete path for "resource" in the "typedef" tag. > > Hello Ritu, have you already tried to explicitly define the classpath where the ant-contrib.jar can be found? And could you try to give the path to "net/sf/antcontrib/antlib.xml" without the leading slash? For me, the following works fine: <taskdef uri="antlib:net.sf.contrib" resource="net/sf/antcontrib/antlib.xml"> <classpath> <fileset dir="lib" includes="ant-contrib-1.0b3.jar" /> </classpath> </taskdef> Regards Christoph --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org