You have not passed in the classpath to the taskdef. You need to do something like: <taskdef classname="net.sf.antcontrib.logic.For" name="for"> <classpath> <pathelement location="lib/ant-contrib-1.0b3.jar"/> </classpath>
</taskdef> On Tue, Mar 1, 2011 at 11:40 AM, Ajitesh <ajites...@yahoo.com> wrote: > hi > I am trying to use the FOR loop present in antcontrib jar file - ant-contrib- > 1.0b3.jar in my build.xml; > but getting below error while running the > > D:\buildFRIDAY>ant > > Buildfile: D:\buildFRIDAY\build.xml > > > > > BUILD FAILED > > D:\buildFRIDAY\build.xml:5: taskdef class net.sf.antcontrib.logic.For cannot > be > > found using the classloader AntClassLoader > > > > MY Build.xml file is as below:- > > <project name="ObieeBuild" default="init" basedir="."> > <description> > obiee copy files build file > </description> > <taskdef classname="net.sf.antcontrib.logic.For" name="for"/> > <classpath> > <pathelement path="${classpath}"/> > <pathelement location="lib/ant-contrib-1.0b3.jar"/> > </classpath> > > <!-- set global properties for this build --> > <property name="test" location="test"/> > > <target name="init" description="copying obiee files" > > <echo message="The first five letters of the alphabet are:"/> > <for list="a,b,c,d,e" param="letter"> > <sequential> > <echo>Letter @{letter}</echo> > </sequential> > </for> > </target> > </project> > > thanks > Ajitesh > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > For additional commands, e-mail: dev-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org