1

我正在使用基于 Eclipse 3.6 (Helios) 和内置 m2eclipse 0.10.0 的 STS 2.5.2。我还使用 Archiva 作为我的“远程”存储库管理器(它托管在同一台机器上)。

我已经更改了我的 Maven 配置设置文件以将我的 Archiva 实例指定为 * 的镜像,并且 Archiva 也是 Central 的代理。在我所有的 pom 中,我都将我的 Archiva 内部存储库指定为存储库和插件存储库。

设置是这样的,当 Maven 命令行 (CLI) 请求工件时,例如 junit:junit:3.8.1:jar,请求转到 Archiva,如果它还没有工件,它反过来从 Central 检索工件,然后将其提供给 Maven CLI。

这一切都适用于 Maven CLI。我的问题是从 Eclipse 构建我的项目时,m2eclipse 无法从 Archiva下载某些工件。相反,我只得到可怕的 .lastUpdated 文件(pom 和 jar)。即使这些文物在 Archiva 中。大多数工件不会发生此错误,只是 Archiva 中的某些工件,例如 org.apache.maven.doxia:doxia-sink-api:1.0-alpha-9:jar,它依赖于我的一个项目依赖。我尝试从 Archiva 中删除有问题的工件,删除我的 .m2 存储库并重建,但问题仍然存在。

有任何想法吗?这是记录在案的 m2eclipse 错误吗?作为一种解决方法,我创建了一个特殊的子模块,它除了从 Maven CLI 的存档中下载缺失的工件之外什么都不做。

提前致谢,

史蒂夫所罗门

4

2 回答 2

0

I use artifactory and received the .lastUpdated file when the wrong URL was specified. To troubleshoot this I ran mvn with the -X option and saw that it was not downloading the jar from the repository I was expecting to be downloaded from.

I'm guessing you would also have problems if you specified an incorrect artifact, weather it be the name or the version.

于 2011-04-22T20:01:38.600 回答
0

在这种情况下,最好的办法是删除附加了 .lastUpdated 的工件。并运行 mvn -U (强制更新开关 -U )

于 2016-12-07T12:44:52.410 回答