查找存储依赖项的 Maven 存储库 [英] Find Maven repository where a dependency is stored

查看:44
本文介绍了查找存储依赖项的 Maven 存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个包含多个公司远程 Maven 存储库的项目,每个存储库都托管许多依赖项.整个项目使用了数百个依赖项,我需要一种方法来快速确定依赖项存储在哪个远程存储库.

Maven 是否提供了一种简单的方法来执行此操作,还是我需要自己搜索每个存储库的依赖项列表?

解决方案

项目依赖报告 有你想要的信息.您可以使用

快速生成此报告

mvn project-info-reports:dependencies

并打开 target/site/dependencies.html 文件.查看此报告的最后一部分(依赖库位置)以获取所需信息.

此报告的示例是此处..p>

I'm working on a project with several corporate remote Maven repositories, each hosting many dozens of dependencies. The entire project uses hundreds of dependencies and I need a way to quickly determine which remote repository a dependency is stored on.

Does Maven provide an easy way to do this or do I need to search through each repository's dependency listing myself?

解决方案

The project dependencies report has the information you want. You can quickly generate just this report using

mvn project-info-reports:dependencies

and open the target/site/dependencies.html file. Look at the last section in this report (dependency repository locations) for the info you want.

A sample of this report is here.

这篇关于查找存储依赖项的 Maven 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆