ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ellsworth <>
Subject Can a jar fileset/zipfileset refer to a nonexistent directory?
Date Thu, 01 Aug 2002 22:30:51 GMT
Our developers want to include the contents of the "images" directory 
into produced zip files if it exists.

The code is simple enough:

   <property name="compile.images" value="${}/images"/>

   <target name="jar" >
     <mkdir dir="${jar.dist}"/>
       <zipgroupfileset dir="${compile.product.dir}" 
       <zipgroupfileset dir="${compile.library.dir}" 
       <zipfileset dir="${compile.images}" prefix="images"/>
       <fileset dir="${compile.classes}"/>

The problem comes if the "images" directory does not exist.  The build 
will then fail with

images not found.

I could create it in every one of our hundred or so projects with a one 
line mkdir, but the developers have already said that they do not want 
that.  They feel that the directory should only exist in the file system 
if there are actually images to process, and thus making a zillion such 
directories just in case they may exist some day.

So, any suggestions?


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

View raw message