问题
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 grep
s and sed
s. 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