I would like to be able to perform an analysis on each of my project POMs to determine how many bytes each direct dependency introduces to the resulting package based on the sum
I keep the a small pom.xml
template on my workstation to identify heavy-weight dependencies.
Assuming you want to see the weight of org.eclipse.jetty:jetty-client with all of its transitives create this in a new folder.
4.0.0
not-used
fat
standalone
org.eclipse.jetty
jetty-client
LATEST
maven-shade-plugin
package
shade
Then cd
to the folder and run mvn package
and check the size of the generated fat jar. On Unix-like systems you can use du -h target/fat-standalone.jar
for that.
In order to test another maven artifact just change groupId:artifactId
in the above template.