There are tools that create minimal JARs, calculating which classes are actually used in the application, statically analyzing the code, and then creating a new JAR containing only those classes. (I use Zelix Classmaster for this, but there are many alternatives.)
The problem with using these tools for a DI infrastructure like Spring includes:
. , . DI Spring, , , , .
, JAR, , JAR . JAR , , , , . , Spring.
- , . () , Spring, , XML bean, (, SpringSecurity). . , "" , , - , JAR JAR.
, :
- Maven/Ivy , , , ... , , .
- JAR, ... , , .
- . JAR cruft Webapp, . ( ... . .)