ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: how do you get ant's tar task to preserve execute permissions?
Date Wed, 04 Oct 2000 06:47:39 GMT
>>>>> "j" == jtnews  <jtnews@bellatlantic.net> writes:

 j> how do you get ant's tar task to preserve execute permissions?

Basically you can't. Java doesn't have the slightest idea of file
permissions (well, apart from isReadable and such) so there is no API
to get or set them.

If you really wanted Ant to do this, <tar> would need to exec a stat
and parse its result for every file - and untar would need to exec a
chmod for each file.

In this particular situation I'd take one of the following two
options:

(1) use <exec> to invoke the OS's tar utility.

(2) use <chmod> after <untar> - only possible if the number of files
whose permissions need to be adjusted is fixed and known.

Stefan

Mime
View raw message