ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Sambin - NeoLogica" <>
Subject "Replace" ANT task overwrites read-only files
Date Thu, 28 Oct 2010 09:51:11 GMT

I am using a <replace> ANT task in my build.xml in order to implement a kind
of "conditional compilation" in my Netbeans Java project.

Replacing works as expected, except for one point: it is able to replace
strings also on read-only files (which then become read-write after
replace). This is not a desired behavior, in my opinion (at least, not by
default), and it causes issues with our source version control system. 


I think <replace> should FAIL on read-only files by default. You may want to
consider adding a "force" attribute, such as for the <copy> task, in order
to force replace on read-only files.


Any comments on this would be greatly appreciated.




Marco Sambin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message