Thanks, this is exactly what I was looking for, but didn't find myself because the file attribute for fileset is not listed at in the manual at http://ant.apache.org/manual/CoreTypes/fileset.html
Ondrej On Thu, Oct 02, 2003 at 05:22:21AM -0400, Erik Hatcher wrote: > Look at the file="..." attribute on filesets. It allows for > single-file filesets much easier than dealing with dir/includes > attributes. > > <fileset file="${some.absolute.file.property}"/> > > Erik > > > On Wednesday, October 1, 2003, at 05:33 PM, Lopez, William wrote: > > > ...not tested but try this > > > > <jar destfile="goo.jar"> > > <fileset dir="/home/olhotak" > > includes="foo.txt"/> > > <fileset dir="/tmp" > > includes="bar.txt"/> > > </jar> > > > > ...will these directories be relative to your build file's base > > directory? > > If not just copy the files under the main class source dir ( use the > > basedir > > attribute)...see the Ant Manual jar task doco. > > > > HTH, > > -Will > > > > > > -----Original Message----- > > From: Ondrej Lhotak [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, October 01, 2003 10:09 AM > > To: [EMAIL PROTECTED] > > Subject: Adding absolute filenames to a jar > > > > > > I'm using the <jar> task to create a jar file. The absolute pathnames > > of the > > files to be included in the jar are in separate properties. How can I > > get > > the <jar> task to include them? <fileset> requires a dir and a relative > > filename, and I have absolute names. > > > > For example: > > <property name="file1" location="/home/olhotak/foo.txt"/> > > <property name="file2" location="/tmp/bar.txt"/> > > <jar destfile="goo.jar"> > > <!-- How to include ${file1} and ${file2} in the jar? --> </jar> > > > > Ondrej > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]