getting information about maven dependencies

僤鯓⒐⒋嵵緔 提交于 2019-12-22 05:58:10

问题


I wonder if it is possible to get information about all first level dependencies of my maven project. I need the following information: name, vendor, version, license type, reference URL, description. All this information is stored in pom.xml of each package. The problem is that we have hierarchy of about 20 projects that have several hundreds dependencies that are constantly being changed.

I know about maven dependency plugin. I ran mvn dependency:list and extracted list of packages using combination of greps and seds. But I need license information and URL. I can implement my own parser that parses pom.xml for interesting packages and extracts this information but it seems that something ready to use should exist.


回答1:


The best thing is to create a site with the support of the maven-project-info-report plugin which will create the needed information. See here as an example. The only question is which version of maven are you using? Furthermore i would suggest to take a look at the maven-license-plugin If you need to limit the licenses in any way you can take a look at the maven-license-verifier plugin.




回答2:


The maven dependecy report may be usefull for you: maven-project-info-reports-plugin



来源:https://stackoverflow.com/questions/8121907/getting-information-about-maven-dependencies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!