ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <Ste...@ignitesports.com>
Subject jar task question
Date Thu, 20 Dec 2001 19:25:08 GMT
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.
stevec@ignitesports.com


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message