users@jersey.java.net

[Jersey] Re: How to reduce Jersey-Client footprint

From: Gerard Davison <gerard.davison_at_oracle.com>
Date: Fri, 16 Dec 2011 13:43:48 +0000

Our of interest I ran pak200 on the 1.8 jars I have handing around and it got it down to around 140kb for both, might help with your other dependencies.

Gerard

http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/tools/pack200.html

On 12 Dec 2011, at 15:21, Pavel Bucek wrote:

> $ ls -alh ./trunk/jersey/jersey-client/target/jersey-client-1.12-SNAPSHOT.jar
> -rw-r--r-- 1 pavel staff 127K Dec 12 10:28 ./trunk/jersey/jersey-client/target/jersey-client-1.12-SNAPSHOT.jar
> $ ls -alh ./trunk/jersey/jersey-core/target/jersey-core-1.12-SNAPSHOT.jar
> -rw-r--r-- 1 pavel staff 451K Dec 12 10:28 ./trunk/jersey/jersey-core/target/jersey-core-1.12-SNAPSHOT.jar
>
> so 576kB in total. And there is some opportunity to shrink it (excluding some classes from jersey-core). You should be able to create something like "jersey-client-repackaged-bundle" which would contain just classes for your specific purpose..
>
> Pavel
>
> On 12/12/11 3:57 PM, António Mota wrote:
>>
>> My mistake, it's about 15Mb, not 100... and that includes another big lib I'm using, ICEpdf and dependencies, and my own code of course.
>>
>> Nevertheless too big, I'll have to bring that down.
>>
>>
>> Thanks.
>>
>>
>> On 7 December 2011 08:32, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:
>> Hello,
>>
>> 100 MB? That definitely doesn't sound right, Jersey client dependencies shouldn't have more than 3MB in total.. depends on what do you need, but in most common cases it should work with jersey-client and jersey-core. You might want to add jersey-json and jackson libs if you are processing json, but even that is maybe like ~5MB ..
>>
>> Can you post list of your dependencies? (mvn dependency:tree)
>>
>> Pavel
>>
>>
>>
>> On 12/6/11 7:03 PM, António Mota wrote:
>>>
>>> Hi again.
>>>
>>> Now my applet using the Jersey-Client is working quite well, however with all the Jar dependencies is now above 100Mb... Is there a way to reduce this size, besides removing the jars one by one and see if it works?
>>>
>>>
>>> Cheers.
>>>
>>
>>
>