ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Mapping files into a JAR, seemingly impossible.
Date Tue, 30 Jul 2002 07:27:09 GMT
On Mon, 29 Jul 2002, Jeremy Kuhnash <jkuhnash@cisco.com> wrote:

> The only other route I considered going was copying files with the
> mapper, then adding those to the JAR

This should work

> but I don't see a way to create a FileSet for the JAR out of the
> mapping set.

Why not?

<mkdir dir="some temp dir" />
<copy todir="some temp dir" preservelastmodified="true">
  <fileset dir="whatever your jar's basedir would have been" />
  <mapper type="glob"  from="*.${environment}" to="*"/>
</copy>
<jar basedir="some temp dir" update="${update_val}"
     destfile="${jproject.build.dir}/resources.${environment}.jar" />
<delete dir="some temp dir" />

should do it.

Stefan

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