Sathish February 2016

APIs for maven dependency

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

Answers


sunny February 2016

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

Post Status

Asked in February 2016
Viewed 2,529 times
Voted 7
Answered 1 times

Search




Leave an answer