5

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?

Jimmy
  • 16,123
  • 39
  • 133
  • 213

1 Answers1

10

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>
fstab
  • 992
  • 1
  • 11
  • 19