I spent lot of time today to find how to zip an eclipse directory with ANT WHILE KEEPING the root directory in the archive, thus when unziping, clients get only one directory called eclipse containing all eclipse’s stuff.
Here’s my directories structure:
- buildfolder
- eclipse
- configuration
- config.ini
- eclipse
- …
- configuration
- eclipse
Here is the ant code to zip the eclipse directory into a zip called eclipse.zip containing the eclipse directory as root:
<zip destfile="eclipse.zip">
<zipfileset dir="buildfolder">
<include name="eclipse/**/**" />
</zipfileset>
</zip>