ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bemowski, Paul A" <>
Subject Problem/suggesion with replace
Date Thu, 10 Aug 2000 21:42:44 GMT

I've got a fairly small problem with the replace task.  

My situation:

I run idl2java and it generates a ton of .java files.  I then run replace to
get rid of some bad 'extends' lines.  This, in effect, is a 'touch' on every
file.  Then the javac task thinks it needs to re-compile everything, even if
I only re-generate 1 idl file.  Very time consuming.

I would be nice if replace would only touch files that it needs to.  I see 2
ways to do this
1) scan the file read only first, and if it contains the token, do the
replace.  This is expensive, so maybe you'd want it to be an option of the
2) grab the timestamp on the file, then do the replace. Count the number of
occurances of the token you hit.  If the number is 0, re-set the timestamp
of the file back to it's original value.


Paul Bemowski
Z-Tel Communications

View raw message