ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Fernandes <rewbs.s...@gmail.com>
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 : https://gist.github.com/792062.
Is this approach worth considering to make Ant's core tasks play
better with file permissions?

Cheers,
Robin

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


Mime
View raw message