ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject ?
Date Sat, 14 Oct 2000 21:35:03 GMT
I don't see that was ever committed (either to taskdefs
or taskdefs/optional). I have a copy of one that was authored by Jeremy
Mawson, and another one by Nico (which I haven't tried using yet, and
which I'm not sure was ever posted to the list). I believe the thinking
(even by Nico) was that since <echo> was changed to take a "file"
attribute shortly after this was offered, that it obviated the need for
it. But I am now <propertyFile> (forgot I even had it till just now), and
the reason it's nicer than just using the <echo file="somefile"> is
because it can change the value of a property already in the file, rather
than either just overwriting (or appending to) the file itself. I'm now
using it to save state information about my build tree. For example (yep,
here's the sane/insane thing again), I have a "sanity" property that I can
toggle in the file if I use <propertyFile>, whereas I
wouldn't be able to do that just using <echo>. I can then use the value of
the "sanity" property from the file to (and I know this
will make some of you cringe) test against the value of the "sane"
property that gets passed in -- if the two are equal, then the target that
gen's the file doesn't get run, and if it's not, then the
target does get run (and is -updated- with the new
value). This is exceedingly useful. I also expect to use it to save things
like build numbers, and other TBD state values. If I had to rely on
<echo>, and the state of some property changed, I'd need to re-create the
properties file that contained that property -- which means I'd need to
have lots of individual properties files instead of just one (and I'd need
to deal with them all individually, etc. etc.)

I can continue to have the <propertyFile> task just for myself, but I
think it would be nicer to see it offered as an optional task for general
consumption. Even if no one else wants to use it to do equality-checking,
they could still find it useful in other ways (eg., it does incrementing,
so you could use it for the type of build-number incrementing that Alex
asked about the other day on ant-user, and not have to have any <script>
stuff to do that).



Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.

View raw message