On 11/8/06, Valerio Schiavoni <[EMAIL PROTECTED]> wrote:
hello everyone,
i successfully used the webstart plugin to produce a jnlp file and  bundle
it  (and required jars) within my webapp. works like a charm.

Nice!

the problem is: imported jars are way too big: the whole application
requires the clients to download 2.4Mb, which is not acceptable. To verify
that there's a lot to be saved, i used the minijar mojo on my little
project, and it shows me these values:


Interesting. From these results I would say:

[INFO] [minijar:minijar]
[INFO]myapplication.jar classes:28 dependencies:107 => 100,0% (36840->36849
bytes)
[INFO] commons-logging-1.0.3.jar classes:17 dependencies:61 => 39,0%
(31605->12396 bytes)

Off Topic: You may want to bump your commons-logging version.

[INFO] commons-codec-1.3.jar classes:25 dependencies:34 => 31,0%
(46725->14941 bytes)
[INFO] junit-3.8.1.jar classes:100 dependencies:255 => 3,0% (121070->4534
bytes)

ignored

[INFO] log4j-1.2.8.jar classes:244 dependencies:500 => 18,0% (352668->66364
bytes)

you may want to use a smaller logging package. Especially as you use
commons-logging

[INFO] cglib-nodep-2.1_3.jar classes:258 dependencies:334 => 1,0%
(324238->5276 bytes)

Do you need this ?

[INFO] easymockclassextension-2.2.jar classes:13 dependencies:71 => 3,0%
(15887->498 bytes)

ignored

[INFO] commons-lang-2.2.jar classes:123 dependencies:180 => 4,0%
(243016->10072 bytes)

Do you use this directly ? If so think about packaging a small version
of commons-lang...

[INFO] commons-fileupload-1.1.1.jar classes:22 dependencies:56 => 16,0%
(31909->5213 bytes)
[INFO] oro-2.0.8.jar classes:62 dependencies:90 => 55,0% (65261->35970
bytes)
[INFO] xercesImpl-2.6.2.jar classes:784 dependencies:877 => 3,0%
(1010675->31412 bytes)

1M... Do you need XML ?

[INFO] jmimemagic-0.0.4a.jar classes:9 dependencies:49 => 93,0%
(55241->51475 bytes)
[INFO] easymock-2.2.jar classes:59 dependencies:110 => 0,0% (62696->474
bytes)

ignored

[INFO] commons-io-1.1.jar classes:41 dependencies:98 => 48,0% (61562->29818
bytes)
[INFO] commons-httpclient-3.0.1.jar classes:148 dependencies:242 => 70,0%
(279781->197911 bytes)
[INFO] xmlParserAPIs-2.2.1.jar classes:142 dependencies:121 => 29,0%
(83089->24781 bytes)

(junit and easymock have test scope, so they don't really have to be
counted)

the problem is: how can I use those 'stripped' versions instead of the full
ones ?

how would you handle such a problem?

I would try to reduce the number of dependencies. XML seems to be 40%
of your 2.4 M. Can you do without ? Then log4j and cglib

Then I would repackage some libs, like commons-lang into
commons-lang-reduced. You should easily go below 1M.

J

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to