You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by li...@bitfaeule.net on 2005/08/09 15:40:26 UTC
zip- task on osx breaks permissions
Hello all,
I need to zip a the contents of a folder on Mac OSX (10.[3|4]) Unfortunatly permissions are broken (executables are no longer executable) after I unpack my zipped components and empty directories are gone. This breaks my deliverables.
If I call zip on the command line I have no such poblems. Can I use the ant zip task and keep the original permissions or do I need to wrap teh zip task in an exec-task?
Is this a bug in the zip-task?
here is my cpde:
<zip destfile="${archiveFullPath}${buildNumber}.zip" basedir="${feature.base}" excludes=".DS_Store,**/*test*/**"/>
thanks for help.
jacques
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: zip- task on osx breaks permissions
Posted by Steve Loughran <st...@apache.org>.
Jeffrey E Care wrote:
> If you need to preserve existing permissions then it's probably easiest to
> use <exec> to run the native zip/tar on your platform.
>
> If you only need to set permissions on certain files then you can use a
> nested <zipfileset> to manually set permissions on those files in the
> archive.
>
> Given that Java does not (currently) have a notion of file permissions,
> it's unreasonable to expect Java code for *any* archive format to preserve
> permissions. Ant makes a decent compromise with <zipfileset>, but until
> JSR 203 is delivered (http://www.jcp.org/en/jsr/detail?id=203) I don't
> know what else Ant can do.
>
I didnt know about JSR203...interesting. but even then, I fear that
whatever cygwin does to mimic unix permissions out of NTFS ACLs will
still raise endless bugreps, unless a version of Java ships with cygwin
awareness.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: zip- task on osx breaks permissions
Posted by Jeffrey E Care <ca...@us.ibm.com>.
If you need to preserve existing permissions then it's probably easiest to
use <exec> to run the native zip/tar on your platform.
If you only need to set permissions on certain files then you can use a
nested <zipfileset> to manually set permissions on those files in the
archive.
Given that Java does not (currently) have a notion of file permissions,
it's unreasonable to expect Java code for *any* archive format to preserve
permissions. Ant makes a decent compromise with <zipfileset>, but until
JSR 203 is delivered (http://www.jcp.org/en/jsr/detail?id=203) I don't
know what else Ant can do.
--
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)
EJ Ciramella <ec...@archivas.com> wrote on 08/09/2005 09:41:13 AM:
> At the top of the zip task definition, it says this:
>
> "Note that file permissions will not be stored in the resulting
> zipfile."
>
> If you need to store permissions, try tar or exec to use "zip".
>
>
> On Aug 9, 2005, at 9:40 AM, lists@bitfaeule.net wrote:
>
> > Hello all,
> >
> > I need to zip a the contents of a folder on Mac OSX (10.[3|4])
> > Unfortunatly permissions are broken (executables are no longer
> > executable) after I unpack my zipped components and empty
> > directories are gone. This breaks my deliverables.
> >
> > If I call zip on the command line I have no such poblems. Can I use
> > the ant zip task and keep the original permissions or do I need to
> > wrap teh zip task in an exec-task?
> >
> > Is this a bug in the zip-task?
> >
> > here is my cpde:
> > <zip destfile="${archiveFullPath}${buildNumber}.zip" basedir="$
> > {feature.base}" excludes=".DS_Store,**/*test*/**"/>
> >
> > thanks for help.
> >
> > jacques
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
>
Re: zip- task on osx breaks permissions
Posted by EJ Ciramella <ec...@archivas.com>.
At the top of the zip task definition, it says this:
"Note that file permissions will not be stored in the resulting
zipfile."
If you need to store permissions, try tar or exec to use "zip".
On Aug 9, 2005, at 9:40 AM, lists@bitfaeule.net wrote:
> Hello all,
>
> I need to zip a the contents of a folder on Mac OSX (10.[3|4])
> Unfortunatly permissions are broken (executables are no longer
> executable) after I unpack my zipped components and empty
> directories are gone. This breaks my deliverables.
>
> If I call zip on the command line I have no such poblems. Can I use
> the ant zip task and keep the original permissions or do I need to
> wrap teh zip task in an exec-task?
>
> Is this a bug in the zip-task?
>
> here is my cpde:
> <zip destfile="${archiveFullPath}${buildNumber}.zip" basedir="$
> {feature.base}" excludes=".DS_Store,**/*test*/**"/>
>
> thanks for help.
>
> jacques
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>