> After replacement, replaceregexp task overrode the permissions.
It does, as do <copy> or <fixcrlf> or any other task where Ant creates a file by itself. Historically this all stems from Java not providing access to permissions of files or directories at all. Neither reading permissions nor writing them. This has changed with Java 7 and thus we could adapt the tasks for Ant 1.10.x (which requires Java 8+) but we haven't done so. One reason for this is the Java API is a pain to work with, in particular if you want to make it work cross platform. I even doubt Java is able to properly capture and restore "permissions" on Windows - or anything else that goes beyond POSIX user/group/other read/write/execute combinations - at all. Many words to say, there isn't anything in Ant that will help you preserving the permissions. Technically this would be possible now and it would be a valid enhancement - even if it just worked for Unix-likes. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org