jar - Maven reduce bundles size by excluding unneeded dependencies in bulk? -


the project i'm working on has dependencies on few known , big libraries. things working well, transitive dependencies playing nice each other, now. unfortunately total bundle size around 100 megs.

i'm not sure if large or not, there way in maven remove dependencies, without making pom.xml verbose , long?

and pointers me in right direction awesome!

you can remove dependencies declaring exclusions. question post first though .. why want remove them?

unless know dependencies not needed, might not make sense try remove them. not if there no issues e.g. in terms of application performance or startup times.

the maven dependency plugin eclipse integration have tools allow understand dependencies better tools dependency:tree goal or dependnecy hierarchy view of pom.

don't try fix not broken.

but ..

if know needed @ runtime , use tooling maven , m2e can potentially remove lot of bulk of final artifact. have configure in pom using dependency exclusions. newer maven versions allow patterns being used.

another thing can use tool proguard removes unused classes final artifact. can considerably complex effective.

it find right balance between effort , benefit of outcome.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -