ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mallampati, Suresh" <SMallamp...@erac.com>
Subject RE: jar task question
Date Thu, 20 Dec 2001 19:29:07 GMT
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:SteveC@ignitesports.com]
Sent: Thursday, December 20, 2001 1:25 PM
To: ant-user@jakarta.apache.org
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.
stevec@ignitesports.com


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message