You could use Maven Shade plugin with the option minimizeJar and check the 
resulting Uber-JAR.

Maybe even better is ProGuard (the shrinker part without the obfuscator). It 
will even detect some uses of class.forName if they are not using dynamic 
strings. By trial and error you can exclude some essential classes or packages 
from shrinking and the remaining stuff in your Uber-JAr again tells you how 
many and which dependencies your program is actually using.
-- 
Alexander Kriegisch


> Am 03.02.2014 um 21:28 schrieb Benoît Berthonneau <ben...@berthonneau.com>:
> 
> I'll try...
> 
> Thx
> 
> 
> -----Message d'origine-----
> De : bmat...@gmail.com [mailto:bmat...@gmail.com] De la part de Baptiste 
> Mathus
> Envoyé : lundi 3 février 2014 21:13
> À : Maven Users List
> Objet : Re: Deep dependency analysis
> 
> I'd look at the code behind dependency: analyze I guess the improvement by 
> logging the class level usage might be doable.
> 
> My 2 cents
> Le 3 févr. 2014 20:48, "Benoît Berthonneau" <ben...@berthonneau.com> a écrit :
> 
>> Hi All,
>> 
>> 
>> 
>> Do you know any maven plugin that could say which classes (from
>> dependencies) are used by the maven project (class by class) ?
>> 
>> I looked at the maven dependency plugin but doesn’t seem to provide 
>> this kind of deep analysis…
>> 
>> 
>> 
>> The idea behind my question is to know if a dependency is really 
>> useful or just because of a “little” API (something like StringUtility 
>> class) called by only one class…
>> 
>> 
>> 
>> Thanks,
>> 
>> Benoît.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to