I have been asked to put the contents of my resources directory at the
top level. What makes this hard is that the resources dirctory may not
exist.
If I do:
<jar
jarfile="${jar.dist}/${jar.baseName}.jar"
compress="${jar.compress}">
<zipfileset dir="${project.work.dir}">
<include name="resources/*" />
</zipfileset>
on
foo
-resources
--blah.gif
the jar has
foo.jar
-resources
--blah.gif
when what i want it to have is
foo.jar
-blah.gif
I had thought I could resolve this via a clever dirset:
<dirset id="jar.source.dirs" dir="${project.work.dir}">
<include name="resources"/>
</dirset>
<target name="jar">
<jar
jarfile="${jar.dist}/${jar.baseName}.jar"
compress="${jar.compress}" >
<zipfileset dir="jar.source.dirs"/>
</jar>
but zipfileset does not seem to accept an idref, complaining that this
is actually a dirset. I suppose that it is right, but my goal is to
have zipfileset, or a plain old fileset, put my resources at the top
level so getResource can find them, without requiring the resources
directory to exist.
I note that
<zipfileset dir="${project.work.dir}" prefix="..">
<include name="resources/*" />
</zipfileset>
puts the resources in
foo.jar
-..
--resources
---blah.gif
not quite what I had in mind...
Scott
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>