--- Thomas L Roche <[EMAIL PROTECTED]> wrote:
[SNIP]
> I tried it, but it just copies:
>
> <target name="project.jar" depends="init, compile"
> description="Build project.jar">
> <jar
> jarfile="${build.result.folder}/project.jar">
> <fileset dir="${compile.outdir}">
> <include name="**/*.class"/>
> </fileset>
> <zipfileset dir="${lib.dir}">
> <include name="**/*.jar"/>
> </zipfileset>
> <manifest>
> <attribute name="Main-Class"
> value="foo.bar.project"/>
> </manifest>
> </jar>
> </target>
>
Firstly, you're using zipfileset incorrectly.
Next, If you don't know all the jars, you'll have to
iterate. I would suggest you use ant-contrib <for>:
for each file @{f} in <fileset dir="${lib.dir}"
includes="**/*.jar" />, add <zipfileset src="@{f}" />
to ${build.result.folder}/project.jar with <jar
update="true" /> (not tested).
This is an interesting use-case for which we can
hopefully come up with a better solution using
resource collections in Ant 1.7
HTH,
Matt
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]