ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janusz Dalecki \(TYCO\)" <>
Subject RE: zipping a single file
Date Tue, 03 Sep 2002 22:34:44 GMT
Eric, I have watched this topic and experimented with the solution you
suggested. I put in my ant script this:
<zip includes="./working/message/*.*" destfile="./ear/"/>
... and that still displays this message:
" basedir attribute must be set, or at least one fileset must be given!"
Have I missed something else?
-----Original Message-----
From: Erik Hatcher []
Sent: Monday, 2 September 2002 5:10 PM
To: Ant Users List
Subject: Re: zipping a single file

Andrew van Renen wrote:
>> includes/excludes attributes are merged together with the ones
>> >specified by <include>/<exclude> elements.  They require no further
>> definition, and is a matter of preference to some extent or necessity
>> if you're using if/unless on the elements.
> So then why did '<zip includes="${to}" destfile="${backup_zip}"' not work?

It would work if your ${to} refered to patterns relative to your
project's base directory.  You cannot make ${to} be an absolute path.
To respond to another post from you - FileSet's are not new and there is
nothing in the works to change how they work.  Some tasks that operate
on files have been implemented to form an implicit fileset, but that is

FileSet's operate from a base directory, and all includes/excludes
patterns are relative to that base directory.  For the <zip> family of
tasks, that has been mapped to the basedir attribute - tasks that
implicitly form a FileSet have to supply their own attribute for the
base directory, so its not just 'dir'.

Does that clear things up?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message