ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew van Renen" <>
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}"/>

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

Send and receive Hotmail on your mobile device:

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

View raw message