ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Maryns <qwizv9...@sneakemail.com>
Subject Zip a directory with its contents.
Date Fri, 17 Oct 2008 15:03:23 GMT
Hi,

I want to zip a directory with its contents, such that when the archive
is extracted, the user gets a directory with in there the relevant files.

Right now I do

<zip destfile="${name}-${version}-${os.name}-${os.arch}.zip"
     encoding="UTF-8">
  <fileset dir="${basedir}">
    <include name="MonaSearch" />
    <include name="MonaSearch/*"/>
  </fileset>
</zip>

But this is very clumsy.  I tried

<zip destfile="${name}-${version}-${os.name}-${os.arch}.zip"
     encoding="UTF-8">
  <fileset dir="${basedir}">
    <include name="MonaSearch" />
  </fileset>
</zip>

But then the zipped dir is empty.  Why?  Can I tell it to recursively zip?

What would be the best name to do this?

TIA, H.
-- 
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html


Mime
View raw message