ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Murray <mmur...@ptc.com>
Subject Re: <zipfileset> directory not found
Date Wed, 29 May 2002 19:38:32 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message