Maven-如何验证声明的存储库中的依赖项是否可用? [英] Maven - How do I validate dependencies are available in the declared repositories?

查看:140
本文介绍了Maven-如何验证声明的存储库中的依赖项是否可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚为项目编辑了pom.xml文件的<repositories />部分,删除了一些我认为不需要的回购代码.

I have just edited the <repositories /> section of my pom.xml file for a project, removing a couple of repo's I thought were unneeded.

我想验证声明的依赖项在可用存储库中仍可解析.

I'd like to validate that the declared dependencies are still resolvable in the available repositories.

但是,所有声明的依赖项在我的本地存储库中都是可用的,因此任何构建尝试都将只使用本地的依赖项.

However, all of the declared dependencies are available in my local repo, so any attempt to build will just use the local ones.

我不想简单地核对我的本地存储库,因为从头开始下载所有依赖项要花费很多时间.

I don't want to simply nuke my local repo, as it takes many hours to download all the dependencies from scratch.

类似地,我对Maven尝试下载所有依赖项不感兴趣,我只是希望它确保它们都是可解析的(包括传递性依赖项).

Similarly, I'm not interested in having maven attempt to download all the dependencies, I just want it to ensure that they're all resolvable (including transitive dependencies).

我该怎么做?

推荐答案

运行 mvn dependency:analyze

它将为您检查依赖关系.

it will check dependencies for you.

参考: http://maven.apache.org/plugins/maven-dependency -plugin/analyze-mojo.html

这篇关于Maven-如何验证声明的存储库中的依赖项是否可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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