I can't recall when AC last had a release; you might
have to build from the current source, wherein <for>
can handle any type that returns an Iterator.
-Matt
--- mpr <[EMAIL PROTECTED]> wrote:
>
> I get
> The <antlib:net.sf.antcontrib:for> type doesn't
> support the nested
> "antlib:net.sf.antcontrib:tokens" element.
>
> What version ant-contrib.jar should I have?
>
>
>
> Matt Benson wrote:
> >
> >
> > --- mpr <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi,
> >>
> >> Could you provide an example, please?
> >>
> >
> > <project xmlns:ac="antlib:net.sf.antcontrib">
> > <property name="br" value="${line.separator}" />
> > <echo
> file="tokens">foo${br}bar${br}baz${br}</echo>
> > <ac:for param="t">
> > <tokens>
> > <file file="tokens" />
> > </tokens>
> > <sequential>
> > <echo>@@[EMAIL PROTECTED]</echo>
> > </sequential>
> > </ac:for>
> > </project>
> >
> > -Matt
> >
> >>
> >>
> >> Matt Benson wrote:
> >> >
> >> > The <tokens> resourcecollection should be
> directly
> >> > passable to <ac:for>.
> >> >
> >> > HTH,
> >> > Matt
> >> >
> >> > --- mpr <[EMAIL PROTECTED]>
> wrote:
> >> >
> >> >>
> >> >> Hi,
> >> >>
> >> >> I have the file user.properties and inside a
> >> paths
> >> >> to folders are defined
> >> >> e.g.
> >> >> C:\Application\PackagingTools4
> >> >> C:\ApplicationTools2\PackagingTools3
> >> >>
> >> >> For each folder from user.properties I need to
> >> >> perform an Operation (task).
> >> >>
> >> >> What is the simplest way to do that?
> >> >> At this moment I do:
> >> >>
> >> >> [CODE]
> >> >>
> >> >> <target
> description="genericTokenReplacements"
> >> >> name="genericTokenReplacement">
> >> >> <loadfile srcfile="./${src.file}"
> >> >> property="src.file.head">
> >> >> <filterchain>
> >> >> <tokenfilter>
> >> >> <stringtokenizer/>
> >> >> <countfilter
> property="nb.matching.tokens"
> >> >> match="([\w\\/]+)+">
> >> >> <!--Create property
> >> >> with a specific
> name-->
> >> >> <counteach
> >> >> propertyprefix="${prefix}"
> >> >> select="\1"/>
> >> >> </countfilter>
> >> >> </tokenfilter>
> >> >> </filterchain>
> >> >> </loadfile>
> >> >> <echo message="${src.file.head}"/>
> >> >> <echoproperties prefix="${prefix}"/>
> >> >> <ac:propertyselector property="user.files"
> >> >> delimiter="${delimiter}"
> >> >> match="~~(.+)" select="\1"/>
> >> >> <echo message="${user.files}"/>
> >> >> <ac:for list="${user.files}" param="dir">
> >> >> <ac:sequential>
> >> >> <echo message="All files under the
> >> >> folder
> >> @{dir}
> >> >> are going to be
> >> >> replaced"/>
> >> >> <--! OPERATION here-->
> >> >> </ac:sequential>
> >> >> </ac:for>
> >> >> </target>
> >> >>
> >> >> [/CODE]
> >> >>
> >> >> but I have noticed the problem.
> >> >> <ac:propertyselector property="user.files"
> >> >> delimiter="${delimiter}"
> >> >> match="~~(.+)" select="\1"/>
> >> >> trim out (eat) character "\" so i get full
> path
> >> to
> >> >> folder whit out "\"
> >> >>
> >> >> Could you suggest to solve it?
> >> >> Thank you in advance,
> >> >> MR
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> >
> >>
> >
>
http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10221352
> >> >> Sent from the Ant - Users mailing list archive
> at
> >> >> Nabble.com.
> >> >>
> >> >>
> >> >>
> >> >
> >>
> >
>
---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >> For additional commands, e-mail:
> >> >> [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> >
> >> >
> __________________________________________________
> >> > Do You Yahoo!?
> >> > Tired of spam? Yahoo! Mail has the best spam
> >> protection around
> >> > http://mail.yahoo.com
> >> >
> >> >
> >>
> >
>
---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> > For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> >
>
http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10221747
> >> Sent from the Ant - Users mailing list archive at
> >> Nabble.com.
> >>
> >>
> >>
> >
>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10222424
> Sent from the Ant - Users mailing list archive at
> Nabble.com.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]