thank you all for the suggestions. i wish they helped, but unfortunately
they didn't. just to approach the simplified problem systematically:
jar cf test.jar *.class
run from within a directory containing .classes, works fine.
then, i wish to run 'ant', with a simple buildfile:
<project name="test" default="dist">
<target name="dist">
<jar jarfile="test.jar" basedir="."/>
</target>
</project>
which gives the error message (i'll print that below). so, i take babramo's
suggestion:
<project name="test" default="dist">
<target name="dist">
<jar jarfile="./test.jar" basedir="." includes="**"/>
</target>
</project>
and get the same message. so, i take Chandra's suggestion:
<project name="test" default="dist">
<target name="dist">
<jar jarfile="./test.jar" basedir=".">
<fileset dir="." includes "*.class"/>
</jar>
</target>
</project>
and this tells me "attribute name "fileset" must be followed by the '='
character". i'd suspect depricated software but it's version 1.3. isn't
the syntax correct? am i missing something stupid? (it's the same if i
take out the basedir= assignment, by the way, to make it look exactly like
an example)
help?
thank you.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 1:06 PM
To: [EMAIL PROTECTED]
Subject: RE: "jar"/zip problem
try this
<target name="dist" depends="compile">
<jar jarfile="${basedir}/build/it.jar"
basedir="${basedir}/build"
includes="${basedir}/build/**" />
</target>
hope it helps
-----Original Message-----
From: J. Michael Caine [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 6:06 PM
To: [EMAIL PROTECTED]
Subject: "jar"/zip problem
i was running 1.2-1 (the only version for which i found a Debian package).
compilations and such seemed to work fine, but the "jar" task was failing,
giving me:
"Problem creating jar: ZIP file must have at least one entry"
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:294)
<rest of stack trace>
so i just installed 1.3, the latest binaries, and pointed to that. again,
it worked fine, except for the "jar" task. so i suspect there's something
wrong with my syntax, but it sure looks a lot like the example code. i
have:
<target name="dist" depends="compile">
<jar jarfile="${basedir}/build/it.jar" basedir="${basedir}/build"/>
</target>
could it be a problem with my java? i have J2SDK 1.3.0-2.
oh, of course, there are .class files (only) in ${basedir}/build/. i
checked that.