ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: zipping a single file
Date Tue, 03 Sep 2002 23:20:52 GMT
I hate to state the obvious, but you need to set the basedir or provide 
at least one fileset.

As I said before, includes are *relative*.  Relative to what?  Well, 
basedir.

	Erik


Janusz Dalecki (TYCO) wrote:
> Hi,
> 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/message.zip"/>
> ... and that still displays this message:
> " basedir attribute must be set, or at least one fileset must be given!"
> Have I missed something else?
> Janusz
> -----Original Message-----
> From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
> 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
> task-specific.
> 
> 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?
> 
> 	Erik
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message