On Tue, 20 Dec 2005, Kamal Bhatt <[EMAIL PROTECTED]> wrote: > I used whenempty="fail" and instead of failure I get a stupid > message telling me that a jar file is never empty (because of the > manifest file).
I wouldn't call it stupid ... > Is there a way of making it work the way I expect it to work (ie > failing when there are no files in the file set) instead of this > rather unhelpful way? Ant's svn contains a version of jar that can be made to not build the jar at all - or fail, depending on an attribute. So Ant 1.7 will work as you'd like it to do. This doesn't help you now. The easiest workaround probably is to use the <zip> task instead of the <jar> task and add the MANIFEST.MF in a second step. Something like <tempfile property="zip" suffix=".zip"/> <zip destfile="${zip}" whenempty="fail" encoding="UTF8"> ... </zip> <jar destfile="your-target-archive"> <zipfileset src="${zip}"/> </jar> <delete file="${zip}"/> Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]