I figured it out, after shifting my thinking. Use the common root as the "dir", since I know it exists, and filter the subdirs using includes.
<zipfileset dir="${sqldir}" prefix="${sqlbase}/${pkg1dir}"> <include name="${pkg1dir}/*"/> </zipfileset> Mike Murray wrote: > I am attempting to <jar> a subset of directories under a common root with > the target below. The problem is that it throws a failure exception if the > "dir" does not exist for one of the specified <zipfileset>s. It would be > nice if the <jar>'s (via <zip>) whenempty attribute would preempt > <fileset>'s desire to ensure that "dir" exists. > > In any case, does anyone have a straightforward suggestion for how to > accomplish this? > > Thanks, Mike > > <target name="cfg_jar" depends="mdata,rbinfo,sql"> > <mkdir dir="${distdir}/lib"/> > <jar destfile="${distdir}/lib/${base_unit}_cfg.jar"> > <zipfileset dir="${srcdir}/${pkg1dir}" prefix="${srcbase}/${pkg1dir}"> > <patternset refid="mdata.pattern"/> > <patternset refid="rbinfo.pattern"/> > </zipfileset> > <zipfileset dir="${sqldir}/${pkg1dir}" prefix="${sqlbase}/${pkg1dir}"> > <patternset refid="sql.pattern"/> > </zipfileset> > <zipfileset dir="${srcdir}/${pkg2dir}" prefix="${srcbase}/${pkg2dir}"> > <patternset refid="mdata.pattern"/> > <patternset refid="rbinfo.pattern"/> > </zipfileset> > <zipfileset dir="${sqldir}/${pkg2dir}" prefix="${sqlbase}/${pkg2dir}"> > <patternset refid="sql.pattern"/> > </zipfileset> > <zipfileset dir="${srcdir}/${pkg3dir}" prefix="${srcbase}/${pkg3dir}"> > <patternset refid="mdata.pattern"/> > <patternset refid="rbinfo.pattern"/> > </zipfileset> > </jar> > </target> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>