ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Stillwell <>
Subject RE: and finally - <shake/>...
Date Wed, 14 Mar 2001 16:20:59 GMT
This would actually be useful functionality in the RMI world where you
really want different jars for server implementation classes and resources,
client side use, and then stub/proxy downloads.  The Jini distribution comes
with a utility which produces a list of dependencies for a given class.  I
use this output to create my includesfile for the jar task.  See the
com.sun.jini.tool.ClassDep source in the Jini distribution.  You can find it
at  The ClassDep utility also takes into
consideration that you probably don't really want to list all classes on
which you are dependent.  No sense in trying to jar up java.lang.String et.
al. or all those third party classes that you fully intend to be deployed in
separate vendor provided jars.  I would also be inclined to see it as part
of the jar task.


Chris Stillwell

-----Original Message-----
From: Conor MacNeill []
Sent: Wednesday, March 14, 2001 9:27 AM
Subject: Re: and finally - <shake/>...


From: "Julian gosnell" <>
> Has anyone thought about or come across  a predicate/piece-of-code that
> could do this :
> <shake outputjar="yyy" classpath="ccc">
>  <shakeroot name="com.mycom.MyServlet"?>
>  <shakeroot pattern="com.mycom.MyDynamicallyLoadedClass*"/>
> </shake>
> where shake figures out which classes all the shakeroots depend upon and
> copies  these and the shakeroots into the outputjar.
> This would drastically reduce the size of some of the jars that I ship.
> I could take 3rd party jars that I consume, break them open and do this
> by hand, but it would be nicer to be able to do it at deployment.
> If I am dynamically loading classes, then I would have to mention them
> as shakeroots before I shake !
Shake, rattle and roll ?

I have thought about it and I believe I can use the functionality from
<depend> to do it. I would be inclined to make it part of <jar>, though,
rather than a separate task. If it was a separate task, perhaps I might not
call it <shake> either :-)

Maybe you would like to submit some of your ideas to the Ant 2.0
requirements collection discussion on Ant-Dev?


View raw message