Home > Net >  How to get maven dependency tree programmatically
How to get maven dependency tree programmatically

Time:01-07

want to print maven dependency tree (all the dependencies including transitive dependencies) programmatically by just reading pom.xml file without connecting to remote repository.

CodePudding user response:

Not really possible, sorry. Also, have you checked the answer and comments here? How can you display the Maven dependency tree for the *plugins* in your project?

CodePudding user response:

I can recommend to take a look at the maven resolver project which has some example code which might be sufficient as a starting point:

https://github.com/apache/maven-resolver/tree/master/maven-resolver-demos/maven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples

  •  Tags:  
  • Related