ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew van Renen" <avanre...@hotmail.com>
Subject zipping a single file
Date Fri, 23 Aug 2002 14:42:42 GMT
I want to add a single file to an archive.  Looking through the docs, I 
expected to be able to write:

	<zip includes="${to}" destfile="${backup_zip}"

but this returned the error: "basedir attribute must be set, or at least one 
fileset must be given!".

So I ended up with:

	<dirname property="to.path" file="${to}"/>
	<basename property="to.filename" file="${to}"/>
	<zip destfile="${backup_zip}">
	    <fileset dir="${to.path}" includes="${to.filename}"/>
	</zip>

That seems a little laborious - is there an easier way?

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
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