Your suggestion doesn't work. It seems to me that putting a basedir attribute on the jar task includes anything regardless of what filesets are included. In fact, my earlier surmise that I could get what I want by using excludes is wrong - if basedir is specified the excludes do not work. But without basedir, I do not get the correct pathing information into the jar.
-----Original Message----- From: Mallampati, Suresh [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 1:29 PM To: 'Ant Users List' Subject: RE: jar task question Hi, you could have tried this.. <jar jarfile="${dist.dir}/lib/${project.name}-lite.jar" basedir= ${build.classes} compress="yes"> <fileset dir="${build.classes}" includes="**/somepackage/**/*.*, **/anotherpackage/**/*.*" /> </jar> -----Original Message----- From: Steve Cohen [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 1:25 PM To: [EMAIL PROTECTED] Subject: jar task question I wish to create a jar after a build nested at a particular root, but not including every directory under this root. I know I could probably do this with <excludes> in a fileset but I would rather do it with <includes>; that way if other stuff is added, I don't have to change my build file. However I find this doesn't work as I want. If I define this operation thus <jar jarfile="${dist.dir}/lib/${project.name}-lite.jar" basedir= ${build.classes} compress="yes"> <fileset dir="${build.classes}/com/whatever/somepackage" includes="**/*.*" /> <fileset dir="${build.classes}/com/whatever/anotherpackage" includes="**/*.*" /> </jar> I wind up with a bigger jar than if I specified no filesets. Everything is included, my includes twice. If I do it this way <jar jarfile="${dist.dir}/lib/${project.name}-lite.jar" compress="yes"> <fileset dir="${build.classes}/com/whatever/somepackage" includes="**/*.*" /> <fileset dir="${build.classes}/com/whatever/anotherpackage" includes="**/*.*" /> </jar> I get just the files I want but they are not pathed correctly. This to me is counter-intuitive. I should be able to specify a fileset using either exclude or include syntax and get the same results. Am I doing something wrong. ----------------------------------------------------------------- Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>