Skip to content

Dependency tree with recursive size #1544

@fbeaufume

Description

@fbeaufume

New feature, improvement proposal

I often need to get the size of all the jars braught by a given dependency from a project.

I'd like to be able to use mvn dependency:tree for that matter.

The output could be something like:

[INFO] com.mycompany:myapp:jar:1.0.0-SNAPSHOT
[INFO] +- org.foo:foo-all:jar:2.0:compile (200k, total 1.5m)
[INFO] |  +- org.foo:foo-a:jar:2.0:compile (600k)
[INFO] |  +- org.foo:foo-b:jar:2.0:compile (700k)
[INFO] +- org.bar:bar:jar:3.1:compile (300k)

The total size for "foo-all" is 1.5m = 200k + 600k + 700k.

It could require a specific command line parameter (show-size ?), in order to remain retro-compatible.

We could also restrict to selected scopes (for example only compile instead of all scopes) using a dedicated command line parameter.

I think this is not supported yet by neither the dependency plugin nor the project-info-reports plugin.

Can this be achieved? Can you share some implementation pointers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions