ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gus Heck <gus-ant...@cognition.olin.edu>
Subject Re: Any chance to have <copy> to preserve file permissions?
Date Wed, 04 Dec 2002 20:23:05 GMT

Alexey Solofnenko wrote:
 > functionality. Sometimes I wonder if people really use some products.

Sometimes I wonder if people really read responses :).

Methinks you missed the bit about using exec task and cp. It works just 
fine and is in fact quite a bit faster to exec cp -r if you don't need 
to select a subset of files with a directory but just want the entire 
directory. If you do need to select individual files, there is apply 
task which gives fileset support to exec. There are really no problems 
this way as long as you don't want to move your build file to other 
platforms. A lot of the time this is not neccessary. When it is 
necessary to move the build file around, you can still get by if you do 
some extra work such as setting a property to contain the appropriate 
form of a cp equivalent command or script based on the results of a 
condition task that checks the os.

By the way have you noticed the chmod/chgrp/chown tasks? In many ways it 
is more robust to simply set the permissions after copying things if you 
can know the perms you want ahead of time or can figure them out based 
on file extensions etc. (though slower).

I can think of several other workarounds. It's really not that hard once 
you are used to thinking in an ant-like way. Every tool has it's ups and 
downs.

If you think it is really important to have platform specific JNI code, 
you are quite welcome to pitch in and help.

-Gus


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


Mime
View raw message