You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew Clegg <an...@gmail.com> on 2008/10/15 12:16:30 UTC
Streamlining dependencies for distribution
Morning all,
I'm working on a sample client app (just a command line thing) to
distribute to our collaborators, to demonstrate usage of our services.
To keep things simple, I've built a single jar using Maven's assembly
plugin, which contains all the dependencies. This weighs in at a not
inconsiderable 9.9Mb, which is quite impressive considering the app
essentially just dispatches a single request to a remote service, and
parses the response payload before printing it in a tabular format. It
doesn't even use databinding.
Is this kind of size normal or have I misconfigured something? Is
there an easy way to reduce this?
Unzipping the jar I find 3.5Mb of Spring, a hefty 11Mb in org/apache,
just over half of which is CXF itself, and another 11Mb in com/sun.
I can't help thinking this won't be a particularly good advert for
Java (and/or CXF) if I distribute it to people who'll say, I can get
exactly the same functionality with half a meg of Perl or Python (or
less)...
I know there are tools like ProGuard and Autojar which can strip out
unused classes from jars, but I'm having problems getting them to work
correctly, and I'm a little worried about how they'll deal with
dynamic class loading, dependency injection etc.
Any thoughts?
Andrew.