如何找到请求丢失 POM 的 POM?
当我构建项目时,我收到以下警告:
[INFO] ------------------------------------------------------------------------
[INFO] Building XXX
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.update:org.eclipse.update.configurator:jar:3.2.0 is missing, no dependency information available
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.3.2 is missing, no dependency information available
[WARNING] The POM for com.ibm.icu:com.ibm.icu:jar:3.4.4 is missing, no dependency information available
在我的构建中,我覆盖了这些依赖项的版本,并且构建本身成功。
修复警告的最快方法是什么?
编辑:找到包含这些版本的 POM 的最快方法是什么?
注意:我的本地存储库中有 7000 个 POM。
When I build my project, I get these warnings:
[INFO] ------------------------------------------------------------------------
[INFO] Building XXX
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.update:org.eclipse.update.configurator:jar:3.2.0 is missing, no dependency information available
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.3.2 is missing, no dependency information available
[WARNING] The POM for com.ibm.icu:com.ibm.icu:jar:3.4.4 is missing, no dependency information available
In my build, I overwrite the versions of these dependencies and the build itself succeeds.
What is the fastest way to fix the warnings?
Edit: What is the fastest way to locate the POMs which contain these versions?
Note: I have 7000 POMs in my local repo.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试使用 dependency-plugin 中的分析工具,
尤其是
mvn dependency:analyze-dep-管理
try the analyze tools from the dependency-plugin
especially the
mvn dependency:analyze-dep-mgt
一些可能有帮助的事情:
mvn dependency:tree -Dverbose=true
可以吐出未使用的重复项/版本。然而,在我的情况下还不够,由于某种原因它没有显示有问题的罐子的列出[?]。它也没有显示省略的 jar 的后代,这可能有用也可能没用。参考: http://jira.codehaus.org/browse/MDEP-123
Intellij可以列出它认为有问题的 pom 和路径(打开 pom.xml 文件,将鼠标悬停在带下划线的“项目”上:
这些对我来说都不够。
然后我注意到,如果您从 ~/.m2/repository 中删除有问题的目录,它将再次下载并且基本上是空的。所以我想这个错误消息可以做什么有时意思是“你的Nexus列出了一个实际上无法下载的版本。”默认情况下,如果你请求commons-logging 1.1.1,它将尝试下载所有已知版本的pom。那么,就我而言,它会发出该警告,但它是良性的,
所以事实上,除了 nexus 之外,你的项目都不会指向坏 pom(或坏版本等)的警告 。元数据索引。
A few things that might help:
mvn dependency:tree -Dverbose=true
can spit out unused duplicates/versions. Wasn't enough in my case, however, for some reason it didn't show the offending jar's listed [?]. It also doesn't show the ommitted jar's descendants, which may or may not be useful.ref: http://jira.codehaus.org/browse/MDEP-123
Intellij can list what it thinks are offending pom's and paths (open the pom.xml file, hover over the underlined "project":
Unfortunately none of these was enough for me, either.
Then I noticed that if you delete the offending directory from your ~/.m2/repository, it will be downloaded again and basically empty. So I think what this error message can sometimes mean is "your nexus lists a version that it doesn't actually have available for download." It appears that maven by default, if you request for instance commons-logging 1.1.1, will attempt to download the pom's for all known versions of common-logging, then, in my case, it spit out that warning but it was benign. Phew!
So in truth, none of your projects might point to the warned of bad pom (or bad version, etc.) Except nexus' metadata index.
您可以使用 dependency:tree 来查看哪些 pom 引用了您缺少的 pom
You could use dependency:tree to see what pom references the one you're missing