ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Looping number of times
Date Wed, 14 Apr 2010 04:42:40 GMT
Here is the my working example :
<?xml version="1.0" encoding="ISO-8859-15"?>
<project xmlns:ac="antlib:net.sf.antcontrib">
  <echo>${ant.version}</echo>
  <ac:for param="i" end="10">
    <sequential>
      <echo>i is @{i}</echo>
    </sequential>
  </ac:for>
</project>

Buildfile: build.xml
     [echo] Apache Ant version 1.7.0 compiled on December 13 2006
     [echo] i is 0
     [echo] i is 1
     [echo] i is 2
     [echo] i is 3
     [echo] i is 4
     [echo] i is 5
     [echo] i is 6
     [echo] i is 7
     [echo] i is 8
     [echo] i is 9
     [echo] i is 10

BUILD SUCCESSFUL

Tried with ant-contrib-1.0b3.jar


Jan


> -----Urspr√ľngliche Nachricht-----
> Von: Jan [mailto:raghurefer@gmail.com] 
> Gesendet: Dienstag, 13. April 2010 21:38
> An: Ant Users List
> Betreff: Re: Looping number of times
> 
> Hi Jan
> 
> is this ant- conrib stuff really works?
> 
> coz i'm getting the error     --->  The <for> type doesn't 
> support the "end"
> attribute.
> 
> On Tue, Apr 13, 2010 at 2:05 AM, <Jan.Materne@rzf.fin-nrw.de> wrote:
> 
> > or directly from the ac-manual
> >
> >  The following example loops from one to ten.
> >
> >    <ac:for param="i" end="10">
> >      <sequential>
> >        <echo>i is @{i}</echo>
> >      </sequential>
> >    </ac:for>
> >
> >
> > Jan
> >
> > > -----Urspr√ľngliche Nachricht-----
> > > Von: Jan [mailto:raghurefer@gmail.com]
> > > Gesendet: Montag, 12. April 2010 21:08
> > > An: Ant Users List
> > > Betreff: Looping number of times
> > >
> > > Hi All,
> > >
> > > Is there any task available to loop for number of times ?
> > >
> > > I know we can use ant-contrib for loop for the comma
> > > seperated list, instead
> > > of it i want to mention loop it for 10 times
> > >
> > > Any one any idea?
> > >
> >
> > 
> ---------------------------------------------------------------------
> > 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