views:

28

answers:

1

When build my application with Ant, it produces a ZIP file.

I have a sh file inside this zip, that is included as part of the build process. After each build I have to do chmod +x myFile.sh as ant fails to retain its original executable permissions.

How can I instruct ant to keep executable permissions to this file?

+3  A: 

You can do this with the filemode attribute:

<zip destfile="myapp.zip">
    <zipfileset dir="scripts" includes="myscript.sh" filemode="755" />
    <zipfileset dir="build" includes="myapp.jar" />
</zip>
fabstab