Maven 的意思是:“无法检索依赖项的目标文件名”
我在构建 WAR 时一直在 Google 上搜索以下警告,但找不到解释:
[WARNING] Could not retrieve the target file name of dependency [Dependency {groupId=org.company.xml.jaxbtypes, artifactId=iJaxbtypes, version=1.0.2-SNAPSHOT, type=jar}]
依赖关系已解决并且一切按预期工作,但 WEB-INF/lib 包含:
- iJaxbtypes-1.0.2-20100721.170712-1
如果我不要运行干净,我现在有:
- iJaxbtypes-1.0.2-20100721.170712-1
- iJaxbtypes-1.0.2-20100721.170712-6
这是因为它是 SNAPSHOT 依赖项吗?我已经使用 Maven 好几年了,但还没有遇到过这个。
I have been Googling for the following warning when building a WAR, but can't find an explanation:
[WARNING] Could not retrieve the target file name of dependency [Dependency {groupId=org.company.xml.jaxbtypes, artifactId=iJaxbtypes, version=1.0.2-SNAPSHOT, type=jar}]
The dependency is resolved and everything works as expected, but WEB-INF/lib contains:
- iJaxbtypes-1.0.2-20100721.170712-1
If I don't run a clean, I now have:
- iJaxbtypes-1.0.2-20100721.170712-1
- iJaxbtypes-1.0.2-20100721.170712-6
Is this because it's a SNAPSHOT dependency? I've been using Maven for a couple of years now, but hadn't come across this one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 SNAPSHOT 依赖项时,Maven 将在远程存储库中查找
groupId/artifactId/version/maven-metadata.xml
,通常如下所示:Maven 使用此文件来了解最新的快照工件文件是。
我相信您没有 iJaxbtypes 工件的元数据,或者它们已损坏,并且 Maven 无法正确处理快照并每次下载最新文件而不重命名它。
检查远程存储库中的
maven-metadata.xml
以及部署过程。如果一切看起来都很好,请尝试从本地存储库中删除合并的元数据。另请参见
When using a SNAPSHOT dependency, Maven will look in the remote repository for a
groupId/artifactId/version/maven-metadata.xml
which typically looks like:This file used by Maven to understand what the latest snapshot artifact file is.
I believe that you don't have metadata for your iJaxbtypes artifact, or they are corrupted, and Maven can't handle the SNAPSHOT properly and download the latest file each time without renaming it.
Check the remote repository for the
maven-metadata.xml
and maybe also the deployment procedure. If everything looks fine, try to remove the merged metadata from your local repository.See also