0

Are there any API that helps to find dependency of maven packages. I used the examples present in the answer of Programmatically resolving Maven dependencies outside of a plugin - get RepositorySystemSession and RepositorySystem

However the dependency list that I get using aether is different from the list given by APIs

AFAIK. The API did not resolve ranges, I am not sure whether it handles exclusions.

Is there any readily available API that takes care of resolving version ranges, exclusions (simillar to what i get when using "mvn dependency-list/tree)

I am looking for API that exactly returns result provided by mvn dependency:list/tree

Note: My code is running outside mvn plugin

Community
  • 1
  • 1
Sathish
  • 9
  • 1

1 Answers1

0

I recommend to use two tools:

mvn help:effective-pom

This tool provides effective pom - the very detailed pom.xml with all actual dependencies and versions

mvn dependency:tree

Provides the dependency tree

sunny
  • 1,887
  • 3
  • 29
  • 40