Hi Jon,

please consider that I am making a minimal usage of this "conditional
compilation" facility in my project. In those limited cases, it is extremely
practical to use, as I can maintain some source files as "shared" across two
projects, even though they need some very small variations in each project.

In any case, the issue of the <replace> task is there: it shall NOT act on
read-only files.

Regards,
        Marco


-----Original Message-----
From: Jon Stevens [mailto:latch...@gmail.com] 
Sent: giovedì 28 ottobre 2010 22:44
To: Ant Developers List
Subject: Re: "Replace" ANT task overwrites read-only files

Sounds like an overcomplicated, brittle and error prone way to develop code.

jon


On Thu, Oct 28, 2010 at 2:51 AM, Marco Sambin - NeoLogica <
marco.sam...@neologica.it> wrote:

> Hi.
>
> 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.
>
>
>
> Regards,
>
>
>
> Marco Sambin
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to