Home > Blockchain >  How to list all dependencies of a package from maven (including scopes)
How to list all dependencies of a package from maven (including scopes)

Time:06-16

I have a graph with 40K artifacts and I can list all possible dependencies of a package (I do so by parsing a list of effective poms)

For example, I have the following for this package:enter image description here

There's 2 dependencies without taking in mind different versions. I would like to show that this results are valid by showing that maven also lists these dependencies for this package. But when I use mvn dependency:tree after I add the com.google.guava:guava:14.0.1, I get no dependencies listed.

This is the pom file of the package:enter image description here

It clearly has those 2 dependencies, but their scopes are provided. Even if I use -Dinclude=provided or -Dscope=provided as a parameter, I still cannot list them. So, how do I list all dependencies of a package no matter the scope used?

CodePudding user response:

Scope enter image description here

It will show the list of dependencies in the project with their scopes and usages in project:

enter image description here

  • Related