ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: executing multiple files one by one
Date Mon, 11 Aug 2003 16:26:53 GMT
You need the ant-contrib jar file.
from:
http://sourceforge.net/projects/ant-contrib/

Example:
<project name="test" default="test">
    <target name="init">
        <taskdef resource="net/sf/antcontrib/antcontrib.properties"
                      classpath="/usr/local/jars/antcontrib.jar"/>
    </target>
    <target name="template">
       <echo>Called with ${myparam}"</echo>
    </target>
    <target name="test" depends="init">
        <foreach param="myparam"
                      target="template">
            <path>
               <fileset dir="sqlfiles" includes="**/*.sql"/>
            </path>
         </foreach>
     </target>
</project>

                     
On Monday 11 August 2003 16:51, Claudio Corsi wrote:
> Nagarajan,
>
> It seems that you are not including the optional task jar within your
> classpath or within the ant lib directory.
>
> I would also recommend that your distribution of ant contains the
> foreach task.
>
> I can not give you an example for the foreach task because I have never
> used it and do not know where the documentation is located. This needs
> to be answer by someone who does.
>
> --Claudio
>
> Nagarajan Murugesan wrote:
> > Ha All,
> >
> > I need a help from you.
> >
> > I need to execute a set of sql files one by one, they all are present in
> > a directory. Is there
> > any way to do that?
> >
> > I experimented with <foreach> task, but I received error message says,
> >
> > Could not create task or type of type: foreach.
> > Ant could not find the task or a class this task relies upon.
> >
> > Apart that I am not clear about amy syntax-code on <foreach> so can you
> > tell me the
> > way to achieve that. and sample code and syntax for that.
> >
> > Thanks & Regards,
> > Nagarajan M.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message