ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: A task as a nested element?
Date Tue, 30 Apr 2002 04:09:31 GMT
So, I didn't go that way (yet, anyway) because I wasn't sure how to go
about doing it. I've modified to have the new
functionality, and it all seems to work, but if I also submit the stuff as
a standalone task (assuming there aren't any objections to it), that'll
mean some replication of code, which is probably better to avoid.

The new functionality allows for string substitution, so you can now do
something like:
  <fileset id="srcfiles" dir="src">
    <include name="**/*.java"/>
  <target name="pc">
    <pathconvert pathsep="," property="classfiles" refid="srcfiles">
      <map from="${basedir}" to="${outdir}"/>
      <subst from=".java" to=".class"/>

As a standalone task, it'd be:
  <subst name="newProp" property="oldProp" from="foo" to="bar"/>
which sets newProp to the value of oldProp, with all occurrences of "foo"
in oldProp replaced with "bar".

What do people think? Do you want the <subst> task as a task itself? And
would you prefer it if I figure out how to make it work (as a task) from
within <pathconvert>, or can you live with the code being in two places
(assuming you want either)? (BTW, FTR: This is mostly more donated code
from Mark McMillan, with some minor modifications by me.)



Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message