ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Fernandes <>
Subject Preserving file permissions in copy and zip tasks [patch]
Date Sun, 23 Jan 2011 13:02:23 GMT
Hi all,

A fairly common (and documented) gripe with filesystem tasks is that
they tend to ignore or lose Unix file permissions. I've had a look at
workarounds for this, and have found that the jna-posix library
(originally developed for JRuby) provides useful APIs for interacting
with file permissions as best as possible from current levels of Java.
The library attempts to invoke standard native functions over JNA if
possible, and falls back Java APIs (which can only approximate
permissions) if no suitable linkage is available.

Here's a patch which modifies the Copy and Zip tasks to preserve
permissions, using jna-posix :
Is this approach worth considering to make Ant's core tasks play
better with file permissions?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message