You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Ajitesh <aj...@yahoo.com> on 2011/03/01 12:40:28 UTC
antcontrib settings
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-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: antcontrib settings
Posted by Peter Reilly <pe...@gmail.com>.
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 <aj...@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-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org