ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Directory list for FOR-EACH Task
Date Mon, 06 Oct 2003 05:23:41 GMT
You can also use the property value. But you have to specify the separator.

    <foreach ... delimiter="${line.separator}"> ...


Jan


> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com]
> Sent: Thursday, October 02, 2003 7:30 PM
> To: Ant Users List; Vikas Phonsa
> Subject: Re: Directory list for FOR-EACH Task
> 
> 
> You can use the path element of foreach:
> 
>   <target name="callee">
>     <echo>${dir.name}</echo>
>   </target>
>   
>   <target name="call">
>     <ac:foreach target="callee" param="dir.name">
>       <path>
>         <dirset dir="${basedir}/.." includes="*"/>
>       </path>
>     </ac:foreach>
> 
> Peter
> On Thursday 02 October 2003 18:20, Vikas Phonsa wrote:
> > I'm using the following target to display a list of 
> directories in a root
> > directory.  It prints out the absolute path of each directory
> >
> >
> > <target name="test"/>
> >  <dirset id="fs" dir="${basedir}/../../" includes="*"/>
> >    <pathconvert property="fs.value" refid="fs"
> > pathsep="${line.separator}"/> <echo>${fs.value}</echo>
> > </target>
> >
> >
> > How can I supply the path of each directory to a foreach task of
> > ant-contrib.
> >
> > Also can I extract just the names of the directories from 
> the absolute
> > paths Generated by the above target.
> >
> > Please guide.
> >
> > Thanks
> >
> > Vikas
> >
> > 
> ---------------------------------------------------------------------
> > 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message