You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Julian gosnell <Ju...@ubsw.com> on 2001/03/14 12:58:45 UTC

and finally - ...

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 !


Anyone care to comment,



Jules



Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


RE: and finally - ...

Posted by Chris Stillwell <Ch...@wcom.com>.
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 http://www.sun.com/jini.  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.

Regards,

Chris Stillwell


-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Wednesday, March 14, 2001 9:27 AM
To: ant-user@jakarta.apache.org
Subject: Re: and finally - <shake/>...


Julian,

From: "Julian gosnell" <Ju...@ubsw.com>
>
> 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?

Conor



Re: and finally - ...

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Julian,

From: "Julian gosnell" <Ju...@ubsw.com>
>
> 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?

Conor



AW: and finally - ...

Posted by Sean Ogle <se...@syslog.at>.
JAX from IBM does this. Check out their Alphaworks site. Not sure what the
license is.

-----Ursprungliche Nachricht-----
Von: gosnelju@ubsw.com [mailto:gosnelju@ubsw.com]Im Auftrag von Julian
gosnell
Gesendet: Mittwoch, 14. Marz 2001 12:59
An: ant-user@jakarta.apache.org
Betreff: and finally - <shake/>...



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 !


Anyone care to comment,



Jules



Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.